Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Columns | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Schema; |
| 6 | |
| 7 | use Attribute; |
| 8 | |
| 9 | /** |
| 10 | * Turns a Blocks field into a grid of `$columns` columns. Without the |
| 11 | * attribute a blocks field is a stacked list without layout controls. |
| 12 | */ |
| 13 | #[Attribute(Attribute::TARGET_PROPERTY)] |
| 14 | readonly class Columns |
| 15 | { |
| 16 | public function __construct( |
| 17 | public int $columns, |
| 18 | public int $min = 1, |
| 19 | public Responsive $responsive = Responsive::Stack, |
| 20 | ) {} |
| 21 | } |