| 1 | <?php |
||
| 18 | class Logger extends MonoLogger |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @param $levelCode |
||
| 22 | * |
||
| 23 | * @return int |
||
| 24 | */ |
||
| 25 | 9 | protected function convertStatusCodeToLevel($levelCode) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @param int $level |
||
| 32 | * @param string $message |
||
| 33 | * @param array $context |
||
| 34 | * |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | 9 | public function addRecord($level, $message, array $context = array()) |
|
| 45 | } |
||
| 46 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.