Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix PHPStan errors on level 9 #336

Open
wants to merge 2 commits into
base: 1.2.x
Choose a base branch
from

Conversation

siketyan
Copy link
Contributor

Fixed some errors on PHPStan level 9.

As Is:

❯ vendor/bin/phpstan analyse src --level 9
Note: Using configuration file /Users/siketyan/.local/src/github.com/phpstan/phpstan-symfony/phpstan.neon.
 54/54 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------------------------------------ 
  Line   Symfony/Configuration.php                                                                                         
 ------ ------------------------------------------------------------------------------------------------------------------ 
  21     Method PHPStan\Symfony\Configuration::getContainerXmlPath() should return string|null but returns mixed.          
  26     Method PHPStan\Symfony\Configuration::hasConstantHassers() should return bool but returns mixed.                  
  31     Method PHPStan\Symfony\Configuration::getConsoleApplicationLoader() should return string|null but returns mixed.  
 ------ ------------------------------------------------------------------------------------------------------------------ 

 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   Type/Symfony/ParameterDynamicReturnTypeExtension.php                                                                                                                 
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  166    Parameter #2 $value of method PHPStan\Type\Symfony\ParameterDynamicReturnTypeExtension::generalizeTypeFromValue() expects array|bool|float|int|string, mixed given.  
  177    Parameter #2 $value of method PHPStan\Type\Symfony\ParameterDynamicReturnTypeExtension::generalizeTypeFromValue() expects array|bool|float|int|string, mixed given.  
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 5 errors                                                                                                 
                                                                                                                        

To Be:

❯ vendor/bin/phpstan analyse src --level 9
Note: Using configuration file /Users/siketyan/.local/src/github.com/phpstan/phpstan-symfony/phpstan.neon.
 54/54 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


                                                                                                                        
 [OK] No errors                                                                                                         

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant