| 1 | <?php |
||
| 14 | class Url |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $url; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Url constructor. |
||
| 23 | * @param $url |
||
| 24 | */ |
||
| 25 | public function __construct($url) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getWebUrl() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return mixed |
||
| 47 | */ |
||
| 48 | public function getHost() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return mixed |
||
| 55 | */ |
||
| 56 | public function getSchema() |
||
| 60 | |||
| 61 | } |
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.