Conditions | 2 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2.0145 |
Changes | 0 |
1 | <?php |
||
37 | 2 | public function execute() |
|
38 | { |
||
39 | 2 | $root = $this->vars['root']; |
|
40 | |||
41 | try { |
||
42 | 2 | $finder = Finder::create() |
|
43 | 2 | ->files() |
|
44 | 2 | ->in($root) |
|
45 | 2 | ->exclude(basename($this->vars['skeleton'])) |
|
46 | 2 | ->depth(0) |
|
47 | 2 | ->ignoreDotFiles(false); |
|
48 | 2 | $this->fs->remove($finder); |
|
|
|||
49 | 2 | $this->fs->remove([$root.'/src', $root.'/tests']); |
|
50 | } catch (\Exception $e) { |
||
51 | throw new RuntimeException($e->getMessage(), $e->getCode(), $e); |
||
52 | } |
||
53 | 2 | } |
|
54 | |||
63 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: