1 | <?php |
||
26 | abstract class AbstractRepository |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * @var ClientInterface |
||
31 | */ |
||
32 | protected $client; |
||
33 | |||
34 | /** |
||
35 | * @var SerializerInterface |
||
36 | */ |
||
37 | private $serializer; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $versionFolder; |
||
43 | |||
44 | /** |
||
45 | * @var RepositoryClassMap |
||
46 | */ |
||
47 | protected $repositoryClassMap; |
||
48 | |||
49 | /** |
||
50 | * @var RequestRepositoryFactoryInterface |
||
51 | */ |
||
52 | private $requestRepositoryFactory; |
||
53 | |||
54 | /** |
||
55 | * @param ClientInterface $client |
||
56 | * @param SerializerInterface $serializer |
||
57 | * @param RepositoryClassMapInterface $repositoryClassMap |
||
58 | * @param string $versionFolder |
||
59 | * @param RequestRepositoryFactoryInterface $requestRepositoryFactory |
||
60 | */ |
||
61 | 42 | public function __construct( |
|
84 | |||
85 | /** |
||
86 | * creates an request instance |
||
87 | * |
||
88 | * @param string $requestName |
||
89 | * @param string $index |
||
90 | * @param string $type |
||
91 | * |
||
92 | * @return RequestInterface |
||
93 | * @author Daniel Wendlandt |
||
94 | */ |
||
95 | 33 | protected function createRequestInstance($requestName, $index, $type) |
|
103 | |||
104 | /** |
||
105 | * gets the right class string of a version |
||
106 | * |
||
107 | * @param string $class |
||
108 | * |
||
109 | * @return string |
||
110 | * @author Daniel Wendlandt |
||
111 | */ |
||
112 | 32 | protected function getClass($class) |
|
116 | } |
||
117 |
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.