1 | <?php |
||
25 | class RepositoryManager implements RepositoryManagerInterface |
||
26 | { |
||
27 | /** @var array */ |
||
28 | protected $entities = []; |
||
29 | |||
30 | /** @var array */ |
||
31 | protected $repositories = []; |
||
32 | |||
33 | /** @var ManagerRegistry */ |
||
34 | protected $managerRegistry; |
||
35 | |||
36 | /** |
||
37 | * @var RepositoryManagerInterface |
||
38 | */ |
||
39 | private $repositoryManager; |
||
40 | |||
41 | 3 | public function __construct(ManagerRegistry $managerRegistry, RepositoryManagerInterface $repositoryManager) |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function addIndex(string $indexName, FinderInterface $finder, ?string $repositoryName = null): void |
||
54 | |||
55 | 3 | public function addEntity($entityName, $indexName) |
|
59 | |||
60 | /** |
||
61 | * Returns custom repository if one specified otherwise returns a basic repository. |
||
62 | * |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | 3 | public function getRepository(string $entityName): Repository |
|
79 | |||
80 | public function hasRepository(string $indexName): bool |
||
84 | } |
||
85 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.