Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 4.0466 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | 6 | public function pass(FuncCall $funcCall, Context $context) |
|
15 | { |
||
16 | 6 | $functionName = $this->resolveFunctionName($funcCall, $context); |
|
17 | 6 | if ($functionName === "func_get_args") { |
|
18 | 1 | $scopePointer = $context->scopePointer->getObject(); |
|
19 | |||
20 | 1 | if ($scopePointer instanceof ClassMethod) { |
|
21 | 1 | if (count($scopePointer->getParams()) === 0) { |
|
22 | 1 | $context->notice( |
|
23 | 1 | 'fcall.argumentunpacking', |
|
24 | 1 | sprintf('Please use argument unpacking (...) instead of func_get_args().'), |
|
25 | $funcCall |
||
26 | 1 | ); |
|
27 | 1 | return; |
|
28 | } |
||
29 | } |
||
30 | } |
||
31 | 5 | } |
|
32 | } |
||
33 |