We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 2 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
9 | public function __construct(private array $rules) |
||
10 | { |
||
11 | $this->rules = collect($rules)->mapWithKeys(function ($rule, $attribute) { |
||
|
|||
12 | if (is_a($rule, AttributeInterface::class, true)) { |
||
13 | return [$rule::getAttributeName() => $rule::getValidationRules()]; |
||
14 | } |
||
15 | |||
16 | return [$attribute => $rule]; |
||
17 | })->toArray(); |
||
18 | } |
||
30 |