| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class ToInteger implements UnaryFunction |
||
| 14 | { |
||
| 15 | /** @var int */ |
||
| 16 | private $default; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * ToInteger constructor. |
||
| 20 | * |
||
| 21 | * @param int $default |
||
| 22 | */ |
||
| 23 | 29 | public function __construct($default = 0) |
|
| 26 | 29 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param mixed $input |
||
| 30 | * |
||
| 31 | * @return int |
||
| 32 | */ |
||
| 33 | 31 | public function __invoke($input) |
|
| 46 |