Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
46 | 4 | protected function addRelationship(ModelsCommand $command, ReflectionMethod $method, Relation $relationship): void |
|
47 | { |
||
48 | 4 | $type = '\\' . Collection::class . '|\\' . $relationship->getRelated()::class . '[]'; |
|
49 | |||
50 | 4 | $command->setProperty( |
|
51 | 4 | $method->getName(), |
|
52 | 4 | $type, |
|
53 | 4 | true, |
|
54 | 4 | false |
|
55 | 4 | ); |
|
56 | |||
57 | 4 | $command->setProperty( |
|
58 | 4 | Str::snake($method->getName()) . '_count', |
|
59 | 4 | 'int', |
|
60 | 4 | true, |
|
61 | 4 | false, |
|
62 | 4 | null, |
|
63 | 4 | true |
|
64 | 4 | ); |
|
67 |