| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Closures |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Filters $value to a Closure strictly. |
||
| 14 | * The return value is \Closure, as expected by the \TraderInteractive\Filterer class. |
||
| 15 | * |
||
| 16 | * @param mixed $value the value to filter to a closure function |
||
| 17 | * @param bool $allowNull Set to true if NULL values are allowed. The filtered result of a NULL value is NULL |
||
| 18 | * |
||
| 19 | * @return Closure|null the filtered $value |
||
| 20 | * |
||
| 21 | * @throws FilterException |
||
| 22 | */ |
||
| 23 | public static function filter($value, bool $allowNull = false) |
||
| 40 |