| Conditions | 5 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 5 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 24 | 5 | public function pass(FuncCall $funcCall, Context $context) |
|
| 25 | { |
||
| 26 | 5 | $functionName = $this->resolveFunctionName($funcCall, $context); |
|
| 27 | 5 | if ($functionName && isset($this->map[$functionName])) { |
|
| 28 | 2 | if ($funcCall->getDocComment()) { |
|
| 29 | 1 | $phpdoc = new \phpDocumentor\Reflection\DocBlock($funcCall->getDocComment()->getText()); |
|
| 30 | 1 | if ($phpdoc->hasTag('expected')) { |
|
| 31 | 1 | return true; |
|
| 32 | } |
||
| 33 | 1 | } |
|
| 34 | |||
| 35 | 2 | $context->notice( |
|
| 36 | 2 | 'debug.code', |
|
| 37 | 2 | sprintf('Function %s() is a debug code, please don`t use it in production.', $functionName), |
|
| 38 | $funcCall |
||
| 39 | 2 | ); |
|
| 40 | 2 | } |
|
| 41 | 5 | } |
|
| 42 | } |
||
| 43 |