1 | <?php |
||
19 | class UpdateOrganizationType extends UpdateRecord |
||
20 | { |
||
21 | use PopulateOrganizationTypeTrait; |
||
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | */ |
||
26 | public function run($type) |
||
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | * @param OrganizationType $record |
||
34 | * @return OrganizationType |
||
35 | */ |
||
36 | protected function populate(ActiveRecord $record): ActiveRecord |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | * @return OrganizationType|null |
||
49 | */ |
||
50 | protected function find($identifier) |
||
54 | } |
||
55 |
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.