| 1 | <?php |
||
| 13 | class InvalidPointTypeException extends \InvalidArgumentException |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @param string $expected_type |
||
| 17 | * @param mixed $point |
||
| 18 | * |
||
| 19 | * @return self |
||
| 20 | */ |
||
| 21 | public static function type($expected_type, $point) |
||
| 22 | { |
||
| 23 | return new static(sprintf( |
||
| 24 | 'The point value must be of "%s" type. Actual type is "%s".', |
||
| 25 | $expected_type, |
||
| 26 | gettype($point) |
||
| 27 | )); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $expected_type |
||
| 32 | * @param string $point |
||
| 33 | * |
||
| 34 | * @return self |
||
| 35 | */ |
||
| 36 | 4 | public static function point($expected_type, $point) |
|
| 44 | } |
||
| 45 |