| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Fastspring |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Instance of Fastspring class. |
||
| 22 | * |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | public static $instance; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Static method. |
||
| 29 | * |
||
| 30 | * It is not useful to construct this Fastspring class everytime. This helps |
||
| 31 | * to construct this class with the current config. if there is not any |
||
| 32 | * constructed instance then construct and save it to self::$instance |
||
| 33 | * |
||
| 34 | * @param string $method The method |
||
| 35 | * @param array $parameters The parameters for username and password |
||
| 36 | * |
||
| 37 | * @return self |
||
| 38 | */ |
||
| 39 | 21 | public static function __callStatic($method, $parameters) |
|
| 51 |
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.