| Total Complexity | 4 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class ScalarTypeConverter { |
||
| 19 | public static function toInt( mixed $value ): int { |
||
| 20 | return intval( self::assertScalarType( $value ) ); |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function toString( mixed $value ): string { |
||
| 24 | return strval( self::assertScalarType( $value ) ); |
||
| 25 | } |
||
| 26 | |||
| 27 | private static function assertScalarType( mixed $value ): int|string|bool|float { |
||
| 32 | } |
||
| 33 | } |
||
| 34 |