Conditions | 5 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | public function visitPhpFunctionCall(FuncCall $funcCall, Context $context) |
||
19 | { |
||
20 | $name = false; |
||
21 | |||
22 | if ($funcCall->name instanceof Name && !$funcCall->name->isFullyQualified()) { |
||
23 | $name = $funcCall->name->getFirst(); |
||
24 | } |
||
25 | |||
26 | if ($name && isset($this->map[$name])) { |
||
|
|||
27 | $context->notice( |
||
28 | 'fcall.alias', |
||
29 | sprintf('%s() is an alias of function. Use %s(...).', $name, $this->map[$name]), |
||
30 | $funcCall |
||
31 | ); |
||
32 | } |
||
33 | } |
||
34 | } |
||
35 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: