1 | <?php |
||
16 | class MediaAdmin extends AbstractAdmin |
||
17 | { |
||
18 | /** |
||
19 | * @var ProviderPool |
||
20 | */ |
||
21 | private $providerPool; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $originalProviderReference; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $baseRouteName = 'admin_mediamonks_sonatamedia_media'; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $baseRoutePattern = 'mediamonks/sonatamedia/media'; |
||
37 | |||
38 | /** |
||
39 | * @param string $code |
||
40 | * @param string $class |
||
41 | * @param string $baseControllerName |
||
42 | * @param ProviderPool $providerPool |
||
43 | */ |
||
44 | public function __construct($code, $class, $baseControllerName, ProviderPool $providerPool) |
||
50 | |||
51 | /** |
||
52 | * @param ListMapper $listMapper |
||
53 | */ |
||
54 | protected function configureListFields(ListMapper $listMapper) |
||
76 | |||
77 | /** |
||
78 | * @param FormMapper $formMapper |
||
79 | */ |
||
80 | protected function configureFormFields(FormMapper $formMapper) |
||
101 | |||
102 | /** |
||
103 | * @param AbstractMedia $media |
||
104 | */ |
||
105 | public function prePersist($media) |
||
109 | |||
110 | /** |
||
111 | * @param AbstractMedia $media |
||
112 | */ |
||
113 | public function preUpdate($media) |
||
117 | |||
118 | /** |
||
119 | * @param $media |
||
120 | * @return bool |
||
121 | */ |
||
122 | protected function isProviderReferenceUpdated(AbstractMedia $media) |
||
126 | |||
127 | /** |
||
128 | * @param AbstractMedia $media |
||
129 | * @return ProviderInterface |
||
130 | */ |
||
131 | protected function getProvider(AbstractMedia $media) |
||
142 | |||
143 | /** |
||
144 | * @return MediaInterface |
||
145 | */ |
||
146 | public function getNewInstance() |
||
164 | |||
165 | /** |
||
166 | * @param mixed $object |
||
167 | * @return string |
||
168 | */ |
||
169 | public function toString($object) |
||
173 | |||
174 | /** |
||
175 | * @param RouteCollection $collection |
||
176 | */ |
||
177 | public function configureRoutes(RouteCollection $collection) |
||
182 | |||
183 | /** |
||
184 | * @param DatagridMapper $datagridMapper |
||
185 | */ |
||
186 | protected function configureDatagridFilters(DatagridMapper $datagridMapper) |
||
194 | |||
195 | /** |
||
196 | * {@inheritdoc} |
||
197 | */ |
||
198 | public function validate(ErrorElement $errorElement, $object) |
||
202 | } |
||
203 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.