| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | private static function resolve(): array |
||
| 19 | 12 | { |
|
| 20 | 1 | $class = static::class; |
|
| 21 | // reflection instead of property_exists because of PHP 7.4 bug #78632 |
||
| 22 | // @see https://bugs.php.net/bug.php?id=78632 |
||
| 23 | 11 | if(false === (new \ReflectionClass($class))->hasProperty('mapping')) { |
|
| 24 | throw PlatenumException::fromMissingMappingProperty($class); |
||
| 25 | } |
||
| 26 | |||
| 27 | return static::$mapping; |
||
|
|
|||
| 28 | } |
||
| 30 |