1 | <?php |
||
10 | class Search |
||
11 | { |
||
12 | /** |
||
13 | * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface |
||
14 | */ |
||
15 | protected $eventDispatcher; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $term; |
||
21 | |||
22 | /** |
||
23 | * @var \SumoCoders\FrameworkSearchBundle\Entity\IndexItemRepository |
||
24 | */ |
||
25 | protected $repository; |
||
26 | |||
27 | /** |
||
28 | * @param IndexItemRepository $repository |
||
29 | * @param EventDispatcherInterface $eventDispatcher |
||
30 | * @param string $term |
||
|
|||
31 | */ |
||
32 | 4 | public function __construct( |
|
41 | |||
42 | /** |
||
43 | * Executes the real search |
||
44 | */ |
||
45 | 4 | public function search() |
|
66 | |||
67 | /** |
||
68 | * Sort the results |
||
69 | * |
||
70 | * @param array $idsAndWeightsPerClass |
||
71 | * @param array $results |
||
72 | * @return array |
||
73 | */ |
||
74 | 4 | protected function sortResults(array $idsAndWeightsPerClass, array $results) |
|
106 | } |
||
107 |
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.