1 | <?php |
||
7 | final class InvokableFilterer implements FiltererInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var Filterer |
||
11 | */ |
||
12 | private $filterer; |
||
13 | |||
14 | /** |
||
15 | * @param FiltererInterface $filterer The base filterer. |
||
16 | */ |
||
17 | public function __construct(FiltererInterface $filterer) |
||
21 | |||
22 | /** |
||
23 | * Executes and returns the filtered value. |
||
24 | * |
||
25 | * @param array $value The value to filter. |
||
26 | * |
||
27 | * @return array The filtered value. |
||
28 | * |
||
29 | * @throws FilterException Thrown if an error is encountered during filtering. |
||
30 | */ |
||
31 | public function __invoke(array $value) : array |
||
40 | |||
41 | /** |
||
42 | * @param mixed $input The input to filter. |
||
43 | * |
||
44 | * @return FilterResponse |
||
45 | * |
||
46 | * @see FiltererInterface::execute |
||
47 | */ |
||
48 | public function execute(array $input) : FilterResponse |
||
52 | |||
53 | /** |
||
54 | * @return array |
||
55 | * |
||
56 | * @see FiltererInterface::getAliases |
||
57 | */ |
||
58 | public function getAliases() : array |
||
62 | |||
63 | /** |
||
64 | * @return array |
||
65 | * |
||
66 | * @see FiltererInterface::getSpecification |
||
67 | */ |
||
68 | public function getSpecification() : array |
||
72 | |||
73 | /** |
||
74 | * @param array $filterAliases |
||
75 | * |
||
76 | * @return FiltererInterface |
||
77 | * |
||
78 | * @see FiltererInterface::withAliases |
||
79 | */ |
||
80 | public function withAliases(array $filterAliases) : FiltererInterface |
||
84 | |||
85 | /** |
||
86 | * @param array $specification |
||
87 | * |
||
88 | * @return FiltererInterface |
||
89 | * |
||
90 | * @see FiltererInterface::withSpecification |
||
91 | */ |
||
92 | public function withSpecification(array $specification) : FiltererInterface |
||
96 | } |
||
97 |
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.