1 | <?php |
||
26 | class Resetter implements ResetterInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var AliasProcessor |
||
30 | */ |
||
31 | private $aliasProcessor; |
||
32 | |||
33 | /*** |
||
34 | * @var ManagerInterface |
||
35 | */ |
||
36 | private $configManager; |
||
37 | |||
38 | /** |
||
39 | * @var EventDispatcherInterface |
||
40 | */ |
||
41 | private $dispatcher; |
||
42 | |||
43 | /** |
||
44 | * @var IndexManager |
||
45 | */ |
||
46 | private $indexManager; |
||
47 | |||
48 | /** |
||
49 | * @var MappingBuilder |
||
50 | */ |
||
51 | private $mappingBuilder; |
||
52 | |||
53 | /** |
||
54 | * @param ManagerInterface $configManager |
||
55 | * @param IndexManager $indexManager |
||
56 | * @param AliasProcessor $aliasProcessor |
||
57 | * @param MappingBuilder $mappingBuilder |
||
58 | * @param EventDispatcherInterface $eventDispatcher |
||
59 | * @param Client $client |
||
|
|||
60 | */ |
||
61 | 20 | public function __construct( |
|
62 | ManagerInterface $configManager, |
||
63 | IndexManager $indexManager, |
||
64 | AliasProcessor $aliasProcessor, |
||
65 | MappingBuilder $mappingBuilder, |
||
66 | EventDispatcherInterface $eventDispatcher |
||
67 | ) { |
||
68 | 20 | $this->aliasProcessor = $aliasProcessor; |
|
69 | 20 | $this->configManager = $configManager; |
|
70 | 20 | $this->dispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher); |
|
71 | 20 | $this->indexManager = $indexManager; |
|
72 | 20 | $this->mappingBuilder = $mappingBuilder; |
|
73 | 20 | } |
|
74 | |||
75 | /** |
||
76 | * Deletes and recreates all indexes. |
||
77 | * |
||
78 | * @param bool $populating |
||
79 | * @param bool $force |
||
80 | */ |
||
81 | 1 | public function resetAllIndexes($populating = false, $force = false) |
|
87 | |||
88 | /** |
||
89 | * Deletes and recreates the named index. If populating, creates a new index |
||
90 | * with a randomised name for an alias to be set after population. |
||
91 | * |
||
92 | * @param string $indexName |
||
93 | * @param bool $populating |
||
94 | * @param bool $force If index exists with same name as alias, remove it |
||
95 | * |
||
96 | * @throws \InvalidArgumentException if no index exists for the given name |
||
97 | */ |
||
98 | 12 | public function resetIndex($indexName, $populating = false, $force = false) |
|
119 | |||
120 | /** |
||
121 | * Deletes and recreates a mapping type for the named index. |
||
122 | * |
||
123 | * @param string $indexName |
||
124 | * @param string $typeName |
||
125 | * |
||
126 | * @throws \InvalidArgumentException if no index or type mapping exists for the given names |
||
127 | * @throws ResponseException |
||
128 | */ |
||
129 | 5 | public function resetIndexType($indexName, $typeName) |
|
150 | |||
151 | /** |
||
152 | * A command run when a population has finished. |
||
153 | * |
||
154 | * @param string $indexName |
||
155 | * |
||
156 | * @deprecated |
||
157 | */ |
||
158 | public function postPopulate($indexName) |
||
162 | |||
163 | /** |
||
164 | * Switching aliases. |
||
165 | * |
||
166 | * @param string $indexName |
||
167 | * @param bool $delete Delete or close index |
||
168 | * |
||
169 | * @throws \FOS\ElasticaBundle\Exception\AliasIsIndexException |
||
170 | */ |
||
171 | 2 | public function switchIndexAlias($indexName, $delete = true) |
|
180 | } |
||
181 |
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.