Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function createSchemata(Collection $collection, array $schemata) |
||
22 | { |
||
23 | foreach ($schemata as $schema) { |
||
24 | if (!isset($schema['keys']) || empty($schema['keys'])) { |
||
25 | throw new \InvalidArgumentException('Cannot create an index with no keys defined.'); |
||
26 | } |
||
27 | $schema['options']['background'] = true; |
||
28 | $collection->ensureIndex($schema['keys'], $schema['options']); |
||
29 | } |
||
30 | } |
||
31 | |||
47 |
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.