diff --git a/src/Domain/AbstractRepository.php b/src/Domain/AbstractRepository.php index ed802ac..0055005 100644 --- a/src/Domain/AbstractRepository.php +++ b/src/Domain/AbstractRepository.php @@ -11,7 +11,8 @@ * @phpstan-template T of StorableEntity * @template T of StorableEntity * @implements EntityRepository - * @phpstan-type ResultArray array + * //phpstan-type ResultArray array + * ^ this is not currently possible in phpstan and can not be imported: https://github.com/phpstan/phpstan/issues/6099 */ abstract class AbstractRepository extends Singleton implements EntityRepository, @@ -20,7 +21,7 @@ abstract class AbstractRepository extends Singleton implements /** @var string */ public static $metaKey; - /** @var ResultArray */ + /** @var array */ protected $entities = []; /** @var class-string FQCN of an entity class implementing StorableEntity */ @@ -125,7 +126,7 @@ public function refresh(): EntityRepository * Retrieve all posts fetched by getPosts() directly from the database and * instantiate them into StorableEntities using entityFromPostId(). * - * @return ResultArray + * @return array */ protected static function getAllFromDB(): array { @@ -214,7 +215,7 @@ abstract protected static function getPosts(): array; /** * @param array $posts * - * @return ResultArray + * @return array */ protected static function mapPostsToEntities(array $posts): array {