| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 39 | private function determineType(Const_ $constant): ?string |
|
| 46 | { |
||
| 47 | 39 | if ($constant->value instanceof Scalar) { |
|
| 48 | 36 | return self::$types[\gettype($constant->value->value)]; |
|
| 49 | } |
||
| 50 | 6 | if ($constant->value instanceof ConstFetch |
|
| 51 | 6 | && \in_array($constant->value->name->parts[0], ['true', 'false'], true)) { |
|
| 52 | 3 | return 'bool'; |
|
| 53 | } |
||
| 54 | 3 | return null; // It's an expression |
|
| 55 | } |
||
| 57 |