Conditions | 2 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function writeConfig(array $config, string $filePath) : bool |
||
29 | { |
||
30 | try { |
||
31 | $env = new DotenvEditor; |
||
32 | $env->load($filePath); |
||
33 | } catch (InvalidArgumentException $e) { |
||
34 | return false; |
||
35 | } |
||
36 | |||
37 | collect($config)->each(function ($value, $key) use ($env) { |
||
38 | $env->set($key, $value); |
||
39 | }); |
||
40 | |||
41 | return $env->save(); |
||
42 | } |
||
43 | |||
68 |
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.