| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 8 | public function __construct($methodName, $className = null) |
|
| 19 | { |
||
| 20 | 8 | $this->methodName = $methodName; |
|
| 21 | 8 | $this->className = $className; |
|
| 22 | 8 | $message = "cannot call {$methodName}"; |
|
| 23 | 8 | if ($className) { |
|
|
|
|||
| 24 | 8 | $message .= " in {$className}"; |
|
| 25 | } |
||
| 26 | 8 | parent::__construct($message); |
|
| 27 | 8 | } |
|
| 28 | |||
| 45 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: