1 | <?php |
||
22 | class ColumnConsistency |
||
23 | { |
||
24 | /** |
||
25 | * The number of column per record. |
||
26 | * |
||
27 | * @var int |
||
28 | */ |
||
29 | protected $columns_count; |
||
30 | |||
31 | /** |
||
32 | * New Instance. |
||
33 | * |
||
34 | * @throws Exception if the column count is lesser than -1 |
||
35 | */ |
||
36 | 9 | public function __construct(int $columns_count = -1) |
|
44 | |||
45 | /** |
||
46 | * Returns the column count. |
||
47 | */ |
||
48 | 3 | public function getColumnCount(): int |
|
52 | |||
53 | /** |
||
54 | * Tell whether the submitted record is valid. |
||
55 | */ |
||
56 | 6 | public function __invoke(array $record): bool |
|
67 | } |
||
68 |