| 1 | <?php |
||
| 20 | final class JsonFileServiceAuth extends ServiceAuth |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private $json; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * {@inheritdoc} |
||
| 29 | */ |
||
| 30 | protected function getIss() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | * @throws \Nekland\YoutubeApi\Exception\AuthException |
||
| 40 | */ |
||
| 41 | protected function getPrivateKey() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | private function loadFile() |
||
| 62 | } |
||
| 63 |
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.