| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 14 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 42 | 32 | public function __construct(string $classname)  | 
            |
| 43 |     { | 
            ||
| 44 | 32 |         preg_match('/(.+)\\\\([a-z_A-Z0-9]+)/', $classname, $matches); | 
            |
| 45 | |||
| 46 | 32 | if (!$matches)  | 
            |
| 
                                                                                                    
                        
                         | 
                |||
| 47 |         { | 
            ||
| 48 | 7 | $this->classname = $classname;  | 
            |
| 49 | }  | 
            ||
| 50 | else  | 
            ||
| 51 |         { | 
            ||
| 52 | 27 | $this->classname = $matches[2];  | 
            |
| 53 | 27 | $this->namespace = $matches[1];  | 
            |
| 54 | }  | 
            ||
| 55 | 32 | }  | 
            |
| 56 | |||
| 69 | 
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.