Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4
env:
- dependencies=lowest
- dependencies=highest
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"phpstan/phpstan": "^0.12.40"
},
"require-dev": {
"consistence/coding-standard": "^3.7",
"consistence/coding-standard": "^3.10",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"ergebnis/composer-normalize": "^2.0.2",
"jakub-onderka/php-parallel-lint": "^1.0",
"phing/phing": "^2.16.0",
"phing/phing": "^2.16.2",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan-phpunit": "^0.12.6",
"phpstan/phpstan-strict-rules": "^0.12.1",
"phpunit/phpunit": "^7.5.18",
"slevomat/coding-standard": "^4.5.2",
"slevomat/coding-standard": "^6.4",
"webmozart/assert": "^1.7.0"
},
"config": {
Expand Down
16 changes: 14 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<property name="newlinesCountBetweenOpenTagAndDeclare" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
<properties>
<property name="usefulAnnotations" type="array" value="
@dataProvider,
Expand All @@ -28,8 +28,20 @@
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
<properties>
<property name="enableNativeTypeHint" value="false"/>
</properties>
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<properties>
<property name="enableObjectTypeHint" value="false"/>
</properties>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
Expand Down
8 changes: 6 additions & 2 deletions src/Type/WebMozartAssert/AssertTypeSpecifyingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,9 @@ function (Type $type): Type {
return TypeCombinator::removeNull($type);
}
);
} elseif ($methodName === 'allNotInstanceOf') {
}

if ($methodName === 'allNotInstanceOf') {
$classType = $scope->getType($node->args[1]->value);
if (!$classType instanceof ConstantStringType) {
return new SpecifiedTypes([], []);
Expand All @@ -417,7 +419,9 @@ function (Type $type) use ($objectType): Type {
return TypeCombinator::remove($type, $objectType);
}
);
} elseif ($methodName === 'allNotSame') {
}

if ($methodName === 'allNotSame') {
$valueType = $scope->getType($node->args[1]->value);
return $this->arrayOrIterable(
$scope,
Expand Down