| Total Complexity | 2 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Cast |
||
| 8 | { |
||
| 9 | const INT = 'type_int'; |
||
| 10 | const BOOL = 'type_bool'; |
||
| 11 | const FLOAT = 'type_float'; |
||
| 12 | const STRING = 'type_string'; |
||
| 13 | const BINARY = 'type_binary'; |
||
| 14 | const OBJECT = 'type_object'; |
||
| 15 | const UNSET = 'type_unset'; |
||
| 16 | const ARRAY = 'type_array'; |
||
| 17 | |||
| 18 | const TYPES = [self::INT, self::BOOL, self::FLOAT, self::STRING, |
||
| 19 | self::BINARY, self::OBJECT, self::UNSET, self::ARRAY]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var CastInterface |
||
| 23 | */ |
||
| 24 | protected $type; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param CastInterface $type |
||
| 28 | */ |
||
| 29 | public function __construct(CastInterface $type) |
||
| 30 | { |
||
| 31 | $this->type = $type; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param $value |
||
| 36 | * |
||
| 37 | * @return mixed|null |
||
| 38 | */ |
||
| 39 | public function process($value) |
||
| 42 | } |
||
| 43 | } |
||
| 44 |