1 | <?php |
||
9 | class DiscovererSet implements \IteratorAggregate |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var Discoverer[] |
||
14 | */ |
||
15 | private $discoverers = array(); |
||
16 | |||
17 | /** @var Filter[] */ |
||
18 | private $filters = array(); |
||
19 | |||
20 | public function __construct(array $discoverers = array()) |
||
26 | |||
27 | /** |
||
28 | * @param Resource $resource |
||
29 | * @return UriInterface[] |
||
30 | */ |
||
31 | public function discover(Resource $resource) |
||
46 | |||
47 | /** |
||
48 | * Sets a discoverer. |
||
49 | * |
||
50 | * @param discovererInterface $discoverer The discoverer instance |
||
51 | * @param string $alias An alias |
||
|
|||
52 | */ |
||
53 | public function set(DiscovererInterface $discoverer, $alias = null) |
||
62 | |||
63 | /** |
||
64 | * @param PreFetchFilter $filter |
||
65 | */ |
||
66 | public function addFilter(PreFetchFilter $filter) |
||
70 | |||
71 | /** |
||
72 | * Returns true if the discoverer is defined. |
||
73 | * |
||
74 | * @param string $name The discoverer name |
||
75 | * |
||
76 | * @return bool true if the discoverer is defined, false otherwise |
||
77 | */ |
||
78 | public function has($name) |
||
82 | |||
83 | /** |
||
84 | * Gets a discoverer. |
||
85 | * |
||
86 | * @param string $name The discoverer name |
||
87 | * |
||
88 | * @return Discoverer The discoverer instance |
||
89 | * |
||
90 | * @throws InvalidArgumentException if the discoverer is not defined |
||
91 | */ |
||
92 | public function get($name) |
||
100 | |||
101 | public function getIterator() |
||
105 | |||
106 | /** |
||
107 | * @param UriInterface[] $discoveredUris |
||
108 | */ |
||
109 | private function normalize(array &$discoveredUris) |
||
115 | |||
116 | /** |
||
117 | * @param UriInterface[] $discoveredUris |
||
118 | */ |
||
119 | private function filter(array &$discoveredUris) |
||
130 | |||
131 | /** |
||
132 | * @param UriInterface[] $discoveredUris |
||
133 | */ |
||
134 | private function removeDuplicates(array &$discoveredUris) |
||
153 | } |
||
154 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.