diff --git a/.travis.yml b/.travis.yml index 6a87477..8d45050 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,3 @@ before_script: script: - vendor/bin/phpspec run -f pretty - - vendor/bin/phpstan analyse -l 7 -c phpstan.neon . diff --git a/Controller/ReorderController.php b/Controller/ReorderController.php index 6d3801f..a46a211 100644 --- a/Controller/ReorderController.php +++ b/Controller/ReorderController.php @@ -89,7 +89,7 @@ private function dispatchEvent(AdminEvent $event): void && true === $this->eventDispatcher instanceof PsrEventDispatcherInterface ) { $this->eventDispatcher->dispatch($event); - } elseif (true === $this->eventDispatcher instanceof EventDispatcherInterface) { + } else { $this->eventDispatcher->dispatch(get_class($event), $event); } } diff --git a/composer.json b/composer.json index bc2dff8..2df63a9 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,7 @@ }, "require-dev": { "phpspec/phpspec": "^5.0|^6.0", - "phpdocumentor/reflection-docblock": "^3.1", - "phpstan/phpstan": "^0.12.11", - "phpstan/phpstan-doctrine": "^0.12.9", - "phpstan/phpstan-strict-rules": "^0.12.2", - "psr/event-dispatcher": "^1.0" + "phpdocumentor/reflection-docblock": "^3.1" }, "config": { "bin-dir": "vendor/bin" diff --git a/phpstan.neon b/phpstan.neon deleted file mode 100644 index d02f784..0000000 --- a/phpstan.neon +++ /dev/null @@ -1,61 +0,0 @@ -includes: - - vendor/phpstan/phpstan-doctrine/extension.neon -parameters: - polluteScopeWithLoopInitialAssignments: false - polluteScopeWithAlwaysIterableForeach: false - checkAlwaysTrueCheckTypeFunctionCall: true - checkAlwaysTrueInstanceof: true - checkAlwaysTrueStrictComparison: true - checkFunctionNameCase: true - reportMaybesInMethodSignatures: true - reportStaticMethodSignatures: true - checkGenericClassInNonGenericObjectType: false - checkMissingIterableValueType: false - autoload_files: - - %currentWorkingDirectory%/vendor/autoload.php - excludes_analyse: - - '%currentWorkingDirectory%/Resources' - - '%currentWorkingDirectory%/spec' - - '%currentWorkingDirectory%/vendor' -rules: - - PHPStan\Rules\BooleansInConditions\BooleanInBooleanAndRule - - PHPStan\Rules\BooleansInConditions\BooleanInBooleanNotRule - - PHPStan\Rules\BooleansInConditions\BooleanInBooleanOrRule - - PHPStan\Rules\BooleansInConditions\BooleanInElseIfConditionRule - - PHPStan\Rules\BooleansInConditions\BooleanInIfConditionRule - - PHPStan\Rules\BooleansInConditions\BooleanInTernaryOperatorRule - - PHPStan\Rules\DisallowedConstructs\DisallowedEmptyRule - - PHPStan\Rules\DisallowedConstructs\DisallowedImplicitArrayCreationRule - - PHPStan\Rules\ForeachLoop\OverwriteVariablesWithForeachRule - - PHPStan\Rules\Methods\WrongCaseOfInheritedMethodRule - - PHPStan\Rules\Operators\OperandInArithmeticPostDecrementRule - - PHPStan\Rules\Operators\OperandInArithmeticPostIncrementRule - - PHPStan\Rules\Operators\OperandInArithmeticPreDecrementRule - - PHPStan\Rules\Operators\OperandInArithmeticPreIncrementRule - - PHPStan\Rules\Operators\OperandsInArithmeticAdditionRule - - PHPStan\Rules\Operators\OperandsInArithmeticDivisionRule - - PHPStan\Rules\Operators\OperandsInArithmeticExponentiationRule - - PHPStan\Rules\Operators\OperandsInArithmeticModuloRule - - PHPStan\Rules\Operators\OperandsInArithmeticMultiplicationRule - - PHPStan\Rules\Operators\OperandsInArithmeticSubtractionRule - - PHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsRule - - PHPStan\Rules\StrictCalls\StrictFunctionCallsRule - - PHPStan\Rules\SwitchConditions\MatchingTypeInSwitchCaseConditionRule - -services: - - - class: PHPStan\Rules\BooleansInConditions\BooleanRuleHelper - - - class: PHPStan\Rules\Cast\UselessCastRule - arguments: - treatPhpDocTypesAsCertain: %treatPhpDocTypesAsCertain% - tags: - - phpstan.rules.rule - - - class: PHPStan\Rules\Operators\OperatorRuleHelper - - - class: PHPStan\Rules\VariableVariables\VariablePropertyFetchRule - arguments: - universalObjectCratesClasses: %universalObjectCratesClasses% - tags: - - phpstan.rules.rule