1 | <?php |
||
12 | abstract class AbstractSuggest extends Param implements NameableInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var string the name of this suggestion |
||
16 | */ |
||
17 | protected $_name; |
||
18 | |||
19 | /** |
||
20 | * @param string $name |
||
21 | * @param string $field |
||
22 | */ |
||
23 | public function __construct($name, $field) |
||
28 | |||
29 | /** |
||
30 | * Suggest text must be set either globally or per suggestion. |
||
31 | * |
||
32 | * @param string $text |
||
33 | * |
||
34 | * @return $this |
||
35 | */ |
||
36 | public function setText($text) |
||
40 | |||
41 | /** |
||
42 | * Suggest prefix must be set either globally or per suggestion. |
||
43 | * |
||
44 | * @param string $text |
||
|
|||
45 | * |
||
46 | * @return $this |
||
47 | */ |
||
48 | public function setPrefix($prefix) |
||
52 | |||
53 | /** |
||
54 | * Suggest regex must be set either globally or per suggestion. |
||
55 | * |
||
56 | * @param string $text |
||
57 | * |
||
58 | * @return $this |
||
59 | */ |
||
60 | public function setRegex($regex) |
||
64 | |||
65 | /** |
||
66 | * Expects one of the next params: max_determinized_states - defaults to 10000, |
||
67 | * flags are ALL (default), ANYSTRING, COMPLEMENT, EMPTY, INTERSECTION, INTERVAL, or NONE. |
||
68 | * |
||
69 | * @param array $value |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | public function setRegexOptions(array $value) |
||
77 | |||
78 | /** |
||
79 | * @param string $field |
||
80 | * |
||
81 | * @return $this |
||
82 | */ |
||
83 | public function setField($field) |
||
87 | |||
88 | /** |
||
89 | * @param int $size |
||
90 | * |
||
91 | * @return $this |
||
92 | */ |
||
93 | public function setSize($size) |
||
97 | |||
98 | /** |
||
99 | * @param int $size maximum number of suggestions to be retrieved from each shard |
||
100 | * |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function setShardSize($size) |
||
107 | |||
108 | /** |
||
109 | * Sets the name of the suggest. It is automatically set by |
||
110 | * the constructor. |
||
111 | * |
||
112 | * @param string $name The name of the suggest |
||
113 | * |
||
114 | * @throws \Elastica\Exception\InvalidException If name is empty |
||
115 | * |
||
116 | * @return $this |
||
117 | */ |
||
118 | public function setName($name) |
||
127 | |||
128 | /** |
||
129 | * Retrieve the name of this suggestion. |
||
130 | * |
||
131 | * @return string |
||
132 | */ |
||
133 | public function getName() |
||
137 | } |
||
138 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.