Total Complexity | 1 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | #[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] |
||
12 | final class HasMany implements SchemaAttribute |
||
13 | { |
||
14 | /** |
||
15 | * @param class-string<ActiveRecord> $associate |
||
|
|||
16 | * The associate ActiveRecord class. |
||
17 | * @param non-empty-string|null $foreign_key |
||
18 | * Column key on the associate model, defaults to the local primary key (which might be wrong). |
||
19 | * @param class-string|null $through |
||
20 | * The pivot ActiveRecord class. |
||
21 | * @param non-empty-string|null $as |
||
22 | * The name of the accessor, defaults to the associate model's id. |
||
23 | */ |
||
24 | public function __construct( |
||
32 |