shopsys/demoshop

PHPStan level 4 weird issue

Closed this issue · 0 comments

What is happening

When I use phpstan with level 4, on of the errors is the following:

Line   CountryRepository.php                                                                                                                                   
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------- 
  24     Method Shopsys\ShopBundle\Model\Country\CountryRepository::getByCode() should return Shopsys\FrameworkBundle\Model\Country\Country but returns object.

This is very weird as the same works fine in framework (we use Doctrine extesion for phpstan for that). I thought it might be connected to a class extension, however, the same problem is in PickUpPlaceRepository - this class has no parents in framework, so I am really confused about what can be wrong.

Expected result

PHPStan on level understands Doctrine in demoshop