1 | <?php |
||
13 | class Manager |
||
14 | { |
||
15 | /** @var \Wandu\Database\Contracts\Entity\MetadataReaderInterface */ |
||
16 | protected $reader; |
||
17 | |||
18 | /** @var \Wandu\Caster\Caster */ |
||
19 | protected $caster; |
||
20 | |||
21 | /** @var \Wandu\Event\DispatcherInterface */ |
||
22 | protected $dispatcher; |
||
23 | |||
24 | /** @var \Wandu\Database\Contracts\ConnectionInterface[] */ |
||
25 | protected $connections = []; |
||
26 | |||
27 | /** @var \Wandu\Database\Repository\Repository[] */ |
||
28 | protected $repositories = []; |
||
29 | |||
30 | 20 | public function __construct( |
|
37 | |||
38 | /** |
||
39 | * @param \Wandu\Event\DispatcherInterface $dispatcher |
||
40 | */ |
||
41 | 18 | public function setEventDispatcher(DispatcherInterface $dispatcher) |
|
45 | |||
46 | /** |
||
47 | * @param array|\Wandu\Database\Configuration|\Wandu\Database\Contracts\ConnectionInterface $connection |
||
48 | * @param string $name |
||
49 | * @return \Wandu\Database\Contracts\ConnectionInterface |
||
50 | */ |
||
51 | 20 | public function connect($connection, $name = 'default') |
|
68 | |||
69 | /** |
||
70 | * @param string $name |
||
71 | * @return \Wandu\Database\Contracts\ConnectionInterface |
||
72 | */ |
||
73 | 16 | public function connection($name = 'default') |
|
77 | |||
78 | /** |
||
79 | * @param string $class |
||
80 | * @param string $connection |
||
81 | * @return \Wandu\Database\Repository\Repository |
||
82 | */ |
||
83 | 16 | public function repository(string $class, string $connection = 'default'): Repository |
|
91 | } |
||
92 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.