little-island-16971
07/06/2023, 1:17 PMcode:sniff:style and code:sniff:architecture are working well. But when I run phpstan I have some errors that I think it should not be there. For instance in the following file from the b2b-demo-shop https://github.com/spryker-shop/b2b-demo-shop/blob/master/src/Pyz/Zed/CustomerAccess/Persistence/CustomerAccessRepository.php phpstan shows the following errors
Line Pyz/Zed/CustomerAccess/Persistence/CustomerAccessRepository.php
------ ----------------------------------------------------------------------------------------------------------------------
52 Parameter #1 $customerAccessEntities of method
Pyz\Zed\CustomerAccess\Persistence\Propel\Mapper\CustomerAccessMapper::mapEntitiesToCustomerAccessTransfer() expects
Propel\Runtime\Collection\ObjectCollection, Propel\Runtime\Collection\Collection given.
67 Parameter #1 $customerAccessEntities of method
Pyz\Zed\CustomerAccess\Persistence\Propel\Mapper\CustomerAccessMapper::mapEntitiesToCustomerAccessTransfer() expects
Propel\Runtime\Collection\ObjectCollection, Propel\Runtime\Collection\Collection given.
82 Parameter #1 $customerAccessEntities of method
Pyz\Zed\CustomerAccess\Persistence\Propel\Mapper\CustomerAccessMapper::mapEntitiesToCustomerAccessTransfer() expects
Propel\Runtime\Collection\ObjectCollection, Propel\Runtime\Collection\Collection given.
------ ----------------------------------------------------------------------------------------------------------------------
This is the code for the first error, the others are because of the same:
$unauthenticatedCustomerAccessEntity = $this->getFactory()
->getPyzUnauthenticatedCustomerAccessQuery()
->filterByIsRestricted(false)
->find();
return $this->getFactory()
->createPyzCustomerAccessMapper()
->mapEntitiesToCustomerAccessTransfer($unauthenticatedCustomerAccessEntity, new CustomerAccessTransfer());
Why phpstan complains about Collection, when the find function is really returning an ObjectCollection and not a Collection. Thanks in advance.quick-baker-99786
07/07/2023, 7:41 AM- vendor/bin/console propel:model:build?quick-baker-99786
07/07/2023, 7:43 AMObjectCollection?