diff --git a/composer.json b/composer.json index 02d8b0f3e1c..3d43489b9ed 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "composer/xdebug-handler": "^3.0.5", "doctrine/inflector": "^2.1", "illuminate/container": "12.39.*", - "nette/utils": "^4.1", + "nette/utils": "4.1.2", "nikic/php-parser": "^5.7", "ondram/ci-detector": "^4.2", "phpstan/phpdoc-parser": "^2.3", diff --git a/phpstan.neon b/phpstan.neon index 45b7b6f6f54..326a1c7045c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -467,3 +467,11 @@ parameters: - rules/TypeDeclaration/Rector/FunctionLike/AddClosureParamTypeForArrayMapRector.php - rules/TypeDeclaration/Rector/FunctionLike/AddClosureParamTypeForArrayReduceRector.php - src/NodeTypeResolver/PHPStan/Type/TypeFactory.php + + - + message: '#Parameter \#1 \$value of static method Webmozart\\Assert\\Assert\:\:isInstanceOfAny\(\) expects object, PhpParser\\Node\\ComplexType\|PhpParser\\Node\\Identifier\|PhpParser\\Node\\Name\|null given#' + path: rules/DeadCode/Rector/FunctionLike/NarrowWideUnionReturnTypeRector.php + + - + message: '#Unable to resolve the template type T in call to static method Webmozart\\Assert\\Assert\:\:isInstanceOfAny\(\)#' + path: rules/DeadCode/Rector/FunctionLike/NarrowWideUnionReturnTypeRector.php diff --git a/rules/Carbon/NodeFactory/CarbonCallFactory.php b/rules/Carbon/NodeFactory/CarbonCallFactory.php index 3d0180a2ee2..f5c9c92f26c 100644 --- a/rules/Carbon/NodeFactory/CarbonCallFactory.php +++ b/rules/Carbon/NodeFactory/CarbonCallFactory.php @@ -37,8 +37,8 @@ public function createFromDateTimeString( $methodCall = $this->createModifyMethodCall( $carbonCall, new Int_((int) $match['count']), - $match['unit'], - $match['operator'] + (string) $match['unit'], + (string) $match['operator'] ); if ($methodCall instanceof MethodCall) { $carbonCall = $methodCall; diff --git a/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php b/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php index 7864ddde1ca..aefa965e17b 100644 --- a/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php +++ b/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php @@ -170,7 +170,7 @@ private function resolveNewVariableName(string $typeShortName): string lcfirst($typeShortName), self::STARTS_WITH_ABBREVIATION_REGEX, static function (array $matches): string { - $output = isset($matches[1]) ? strtolower((string) $matches[1]) : ''; + $output = isset($matches[1]) ? strtolower($matches[1]) : ''; $output .= $matches[2] ?? ''; return $output . ($matches[3] ?? '');