Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2.0023 |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
35 | public function handle(Client $client, $index, $type) |
||
36 | { |
||
37 | 1 | $config = $this->configurationRepository->get($index); |
|
38 | |||
39 | 1 | if ($this->isInvalid($config, $type)) { |
|
40 | throw new \InvalidArgumentException(); |
||
41 | } |
||
42 | |||
43 | 1 | $client |
|
44 | 1 | ->indices() |
|
45 | 1 | ->putMapping([ |
|
46 | 1 | 'index' => $index, |
|
47 | 1 | 'type' => $type, |
|
48 | 'body' => [ |
||
49 | 1 | $type => $config['mappings'][$type], |
|
50 | 1 | ], |
|
51 | 1 | ]) |
|
52 | ; |
||
53 | 1 | } |
|
54 | |||
64 |
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.