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

Improvement: Bump phpstan level 8 => 9 #191

Open
frank9999 opened this issue Apr 28, 2024 · 0 comments
Open

Improvement: Bump phpstan level 8 => 9 #191

frank9999 opened this issue Apr 28, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers Priority: Low Low priority issue

Comments

@frank9999
Copy link
Member

vendor/bin/phpstan
Note: Using configuration file /home/frank/projects/UltimateWarfare/phpstan.neon.dist.
250/250 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


Line src/Command/User/MakeAdminCommand.php


30 Parameter #1 $username of method
FrankProjects\UltimateWarfare\Command\User\AbstractUserCommand::getUserByUsername() expects string, mixed
given.
32 Part $username (mixed) of encapsed string cannot be cast to string.



Line src/Command/User/RemoveAdminCommand.php


30 Parameter #1 $username of method
FrankProjects\UltimateWarfare\Command\User\AbstractUserCommand::getUserByUsername() expects string, mixed
given.
32 Part $username (mixed) of encapsed string cannot be cast to string.



Line src/Command/User/SendRegisterMailCommand.php


30 Parameter #1 $username of method
FrankProjects\UltimateWarfare\Command\User\AbstractUserCommand::getUserByUsername() expects string, mixed
given.
32 Part $username (mixed) of encapsed string cannot be cast to string.



Line src/Controller/Game/AttackController.php


98 Parameter #5 $unitData of method
FrankProjects\UltimateWarfare\Service\Action\FleetActionService::sendGameUnits() expects array<int, string>,
mixed given.



Line src/Controller/Game/BaseGameController.php


58 Method FrankProjects\UltimateWarfare\Controller\Game\BaseGameController::getPlayerIdFromSession() should
return int|null but returns mixed.



Line src/Controller/Game/ConstructionController.php


98 Parameter #4 $constructionData of method
FrankProjects\UltimateWarfare\Service\Action\ConstructionActionService::constructGameUnits() expects
array<int, string>, mixed given.
155 Parameter #4 $destroyData of method
FrankProjects\UltimateWarfare\Service\Action\ConstructionActionService::removeGameUnits() expects array<int,
string>, mixed given.



Line src/Controller/Game/FederationApplicationController.php


81 Parameter #3 $application of method
FrankProjects\UltimateWarfare\Service\Action\FederationApplicationActionService::sendFederationApplication()
expects string, mixed given.



Line src/Controller/Game/FederationBankController.php


27 Parameter #2 $resources of method
FrankProjects\UltimateWarfare\Service\Action\FederationBankActionService::deposit() expects array<string,
string>, mixed given.
47 Parameter #2 $resources of method
FrankProjects\UltimateWarfare\Service\Action\FederationBankActionService::withdraw() expects array<string,
string>, mixed given.



Line src/Controller/Game/FederationController.php


96 Cannot cast mixed to string.
148 Parameter #1 $value of function intval expects array|bool|float|int|resource|string|null, mixed given.
149 Parameter #3 $resources of method
FrankProjects\UltimateWarfare\Service\Action\FederationActionService::sendAid() expects array<string,
string>, mixed given.
191 Parameter #2 $federationName of method
FrankProjects\UltimateWarfare\Service\Action\FederationActionService::changeFederationName() expects string,
mixed given.
245 Parameter #2 $message of method
FrankProjects\UltimateWarfare\Service\Action\FederationActionService::updateLeadershipMessage() expects
string, mixed given.
272 Parameter #2 $playerId of method
FrankProjects\UltimateWarfare\Service\Action\FederationActionService::changePlayerHierarchy() expects int,
mixed given.
273 Parameter #3 $role of method
FrankProjects\UltimateWarfare\Service\Action\FederationActionService::changePlayerHierarchy() expects int,
mixed given.



Line src/Controller/Game/FleetController.php


114 Parameter #5 $unitData of method
FrankProjects\UltimateWarfare\Service\Action\FleetActionService::sendGameUnits() expects array<int, string>,
mixed given.



Line src/Controller/Game/MarketController.php


155 Parameter #1 $value of function intval expects array|bool|float|int|resource|string|null, mixed given.
156 Parameter #1 $value of function intval expects array|bool|float|int|resource|string|null, mixed given.
161 Parameter #2 $gameResource of method
FrankProjects\UltimateWarfare\Service\Action\MarketActionService::placeOffer() expects string, mixed given.
161 Parameter #5 $action of method FrankProjects\UltimateWarfare\Service\Action\MarketActionService::placeOffer()
expects string, mixed given.



Line src/Controller/Game/MessageController.php


163 Parameter #2 $subject of method
FrankProjects\UltimateWarfare\Service\Action\MessageActionService::sendMessage() expects string, mixed given.
164 Parameter #3 $message of method
FrankProjects\UltimateWarfare\Service\Action\MessageActionService::sendMessage() expects string, mixed given.
198 Argument of an invalid type mixed supplied for foreach, only iterables are supported.
199 Parameter #1 $value of function intval expects array|bool|float|int|resource|string|null, mixed given.



Line src/Controller/Game/OperationController.php


190 Parameter #1 $value of function intval expects array|bool|float|int|resource|string|null, mixed given.



Line src/Controller/Game/SurrenderController.php


28 Parameter #2 $plainPassword of method
Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::isPasswordValid() expects string, mixed
given.



Line src/Controller/Game/UserController.php


82 Parameter #2 $plainPassword of method
Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::isPasswordValid() expects string, mixed
given.
86 Parameter #2 $plainPassword of method
Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::hashPassword() expects string, mixed
given.
124 Cannot call method guessExtension() on mixed.
127 Cannot call method move() on mixed.



Line src/Entity/AbstractGameResources.php


95 Method FrankProjects\UltimateWarfare\Entity\AbstractGameResources::getValueByName() should return int but
returns mixed.



Line src/Entity/User.php


213 Parameter #1 $stream of function fstat expects resource, mixed given.
432 Parameter #1 $data of method FrankProjects\UltimateWarfare\Entity\User::__unserialize() expects
array<bool|int|string>, mixed given.



Line src/EventSubscriber/GameEngineSubscriber.php


58 Parameter #1 $id of method FrankProjects\UltimateWarfare\Repository\PlayerRepository::find() expects int,
mixed given.



Line src/EventSubscriber/LocaleSubscriber.php


39 Parameter #1 $locale of method Symfony\Component\HttpFoundation\Request::setLocale() expects string, mixed
given.



Line src/Form/ReCaptchaType.php


38 Parameter #1 $message of method
FrankProjects\UltimateWarfare\Form\EventListener\ReCaptchaValidationListener::setInvalidMessage() expects
string, mixed given.



Line src/Repository/Doctrine/DoctrineConstructionRepository.php


59 Cannot access offset 'id' on mixed.

59 Cannot access offset 'total' on mixed.

79 Cannot access offset 'id' on mixed.

79 Cannot access offset 'total' on mixed.

92 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineConstructionRepository::findByPlayerAndGameUnitType()

     should return array<FrankProjects\UltimateWarfare\Entity\Construction> but returns mixed.

112 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineConstructionRepository::getCompletedConstructions()

     should return array<FrankProjects\UltimateWarfare\Entity\Construction> but returns mixed.


Line src/Repository/Doctrine/DoctrineGameNewsRepository.php


45 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineGameNewsRepository::findActiveMainPageNews()
should return array<FrankProjects\UltimateWarfare\Entity\GameNews> but returns mixed.



Line src/Repository/Doctrine/DoctrineMarketItemRepository.php


48 Method
FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineMarketItemRepository::findByWorldMarketItemType()
should return array<FrankProjects\UltimateWarfare\Entity\MarketItem> but returns mixed.



Line src/Repository/Doctrine/DoctrineMessageRepository.php


40 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineMessageRepository::findNonDeletedMessagesToPlayer()

     should return array<FrankProjects\UltimateWarfare\Entity\Message> but returns mixed.

59 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineMessageRepository::findNonDeletedMessagesFromPlayer()

     should return array<FrankProjects\UltimateWarfare\Entity\Message> but returns mixed.


Line src/Repository/Doctrine/DoctrineOperationRepository.php


48 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineOperationRepository::findEnabled() should
return array<FrankProjects\UltimateWarfare\Entity\Operation> but returns mixed.
56 Method
FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineOperationRepository::findAvailableForPlayer()
should return array<FrankProjects\UltimateWarfare\Entity\Operation> but returns array.



Line src/Repository/Doctrine/DoctrinePlayerRepository.php


46 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrinePlayerRepository::findByWorldAndRegions()
should return array<FrankProjects\UltimateWarfare\Entity\Player> but returns mixed.
68 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrinePlayerRepository::findByWorldAndNetworth()
should return array<FrankProjects\UltimateWarfare\Entity\Player> but returns mixed.



Line src/Repository/Doctrine/DoctrinePostRepository.php


35 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrinePostRepository::getLastPostByUser() should
return FrankProjects\UltimateWarfare\Entity\Post|null but returns mixed.



Line src/Repository/Doctrine/DoctrineReportRepository.php


49 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineReportRepository::findReportsByType() should
return array<FrankProjects\UltimateWarfare\Entity\Report> but returns mixed.
74 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineReportRepository::findReports() should
return array<FrankProjects\UltimateWarfare\Entity\Report> but returns mixed.



Line src/Repository/Doctrine/DoctrineResearchPlayerRepository.php


28 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineResearchPlayerRepository::getNonActiveCompletedResearch()
     should return array<FrankProjects\UltimateWarfare\Entity\ResearchPlayer> but returns mixed.

45 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineResearchPlayerRepository::findFinishedByPlayer()

     should return array<FrankProjects\UltimateWarfare\Entity\ResearchPlayer> but returns mixed.


Line src/Repository/Doctrine/DoctrineResearchRepository.php


48 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineResearchRepository::findOngoingByPlayer()
should return array<FrankProjects\UltimateWarfare\Entity\Research> but returns mixed.
65 Method
FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineResearchRepository::findUnresearchedByPlayer()
should return array<FrankProjects\UltimateWarfare\Entity\Research> but returns mixed.



Line src/Repository/Doctrine/DoctrineTopicRepository.php


37 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineTopicRepository::getLastTopicByUser() should

     return FrankProjects\UltimateWarfare\Entity\Topic|null but returns mixed.

51 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineTopicRepository::findLastAnnouncements()

     should return array<FrankProjects\UltimateWarfare\Entity\Topic> but returns mixed.

65 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineTopicRepository::getByCategorySortedByStickyAndDate()

     should return array<FrankProjects\UltimateWarfare\Entity\Topic> but returns mixed.


Line src/Repository/Doctrine/DoctrineUserRepository.php


87 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineUserRepository::findByLastLogin() should
return array<FrankProjects\UltimateWarfare\Entity\User> but returns mixed.
97 Method FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineUserRepository::loadUserByUsername() should
return FrankProjects\UltimateWarfare\Entity\User|null but returns mixed.



Line src/Repository/Doctrine/DoctrineWorldRegionRepository.php


80 Cannot access offset 'id' on mixed.

80 Cannot access offset 'total' on mixed.

88 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineWorldRegionRepository::getPreviousWorldRegionForPlayer()
     should return FrankProjects\UltimateWarfare\Entity\WorldRegion|null but returns mixed.

103 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineWorldRegionRepository::getNextWorldRegionForPlayer()

     should return FrankProjects\UltimateWarfare\Entity\WorldRegion|null but returns mixed.


Line src/Repository/Doctrine/DoctrineWorldRegionUnitRepository.php


42 Method

     FrankProjects\UltimateWarfare\Repository\Doctrine\DoctrineWorldRegionUnitRepository::findAmountAndNetworthByPlayer()
     should return array<int, array<string, int>> but returns mixed.

75 Cannot access offset 'id' on mixed.

75 Cannot access offset 'total' on mixed.



Line src/Twig/Base64EncodeExtension.php


24 Parameter #1 $stream of function stream_get_contents expects resource, mixed given.
25 Cannot cast mixed to string.


[ERROR] Found 76 errors

@frank9999 frank9999 added enhancement New feature or request good first issue Good for newcomers Priority: Low Low priority issue labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Priority: Low Low priority issue
Projects
None yet
Development

No branches or pull requests

1 participant