| 1 | <?php |
||
| 25 | class ColumnConsistency |
||
| 26 | { |
||
| 27 | use ValidatorTrait; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * The number of column per record |
||
| 31 | * |
||
| 32 | * @var int |
||
| 33 | */ |
||
| 34 | protected $columns_count; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * New Instance |
||
| 38 | * |
||
| 39 | * @param int $columns_count |
||
| 40 | */ |
||
| 41 | 6 | public function __construct(int $columns_count = -1) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Returns the column count |
||
| 48 | * |
||
| 49 | * @return int |
||
| 50 | */ |
||
| 51 | 2 | public function getColumnCount() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * Tell whether the submitted record is valid |
||
| 58 | * |
||
| 59 | * @param array $record |
||
| 60 | * |
||
| 61 | * @return bool |
||
| 62 | */ |
||
| 63 | 4 | public function __invoke(array $record): bool |
|
| 74 | } |
||
| 75 |