1 | <?php |
||
14 | abstract class AbstractProvider |
||
15 | { |
||
16 | /** |
||
17 | * @var EntityManager|DocumentManager |
||
18 | */ |
||
19 | protected $manager; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $dataClass; |
||
25 | |||
26 | /** |
||
27 | * @var RepositoryInterface |
||
28 | */ |
||
29 | protected $repository; |
||
30 | |||
31 | /** |
||
32 | * @var FactoryInterface |
||
33 | */ |
||
34 | protected $factory; |
||
35 | |||
36 | public function __construct(RepositoryInterface $repository, FactoryInterface $factory) |
||
43 | |||
44 | /** |
||
45 | * @return ResourceInterface |
||
46 | */ |
||
47 | public function createNew() |
||
51 | |||
52 | /** |
||
53 | * @param ResourceInterface $resource |
||
54 | */ |
||
55 | public function persist(ResourceInterface $resource) |
||
59 | |||
60 | /** |
||
61 | * @param ResourceInterface|null $resource |
||
62 | */ |
||
63 | public function flush(ResourceInterface $resource = null) |
||
67 | |||
68 | /** |
||
69 | * @param ResourceInterface $resource |
||
70 | * @param bool $single |
||
71 | */ |
||
72 | public function save(ResourceInterface $resource, $single = false) |
||
77 | |||
78 | /** |
||
79 | * @param $id |
||
80 | * |
||
81 | * @return ResourceInterface |
||
82 | */ |
||
83 | public function find($id) |
||
87 | |||
88 | /** |
||
89 | * @return ResourceInterface[] |
||
90 | */ |
||
91 | public function findAll() |
||
95 | |||
96 | /** |
||
97 | * @param array $criteria |
||
98 | * @param array|null $orderBy |
||
99 | * @param null $limit |
||
100 | * @param null $offset |
||
101 | * |
||
102 | * @return ResourceInterface[] |
||
103 | */ |
||
104 | public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) |
||
108 | |||
109 | /** |
||
110 | * @param array $criteria |
||
111 | * |
||
112 | * @return ResourceInterface[] |
||
113 | */ |
||
114 | public function findOneBy(array $criteria) |
||
118 | } |
||
119 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..