| 1 | <?php |
||
| 6 | class CannotCallMethodException extends RuntimeException |
||
| 7 | { |
||
| 8 | /** @var string */ |
||
| 9 | protected $methodName; |
||
| 10 | |||
| 11 | /** @var string */ |
||
| 12 | protected $className; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param string $methodName |
||
| 16 | * @param string $className |
||
| 17 | */ |
||
| 18 | 8 | public function __construct($methodName, $className = null) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | 8 | public function getMethodName() |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getClassName() |
||
| 44 | } |
||
| 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: