| 1 | <?php |
||
| 29 | class ColumnConsistency |
||
| 30 | { |
||
| 31 | /** |
||
| 32 | * The number of column per record. |
||
| 33 | * |
||
| 34 | * @var int |
||
| 35 | */ |
||
| 36 | protected $columns_count; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * New Instance. |
||
| 40 | 6 | * |
|
| 41 | * @throws OutOfRangeException if the column count is lesser than -1 |
||
| 42 | 6 | */ |
|
| 43 | 2 | public function __construct(int $columns_count = -1) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Returns the column count. |
||
| 54 | 2 | */ |
|
| 55 | public function getColumnCount(): int |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Tell whether the submitted record is valid. |
||
| 62 | */ |
||
| 63 | public function __invoke(array $record): bool |
||
| 74 | } |
||
| 75 |