| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 68 | protected function resolveAttributeDefaults() |
|
| 25 | { |
||
| 26 | 68 | $defaults = collect($this->rules()) |
|
|
|
|||
| 27 | 68 | ->filter(function ($rule, $key) { |
|
| 28 | 23 | return $rule instanceof Attribute && $rule->hasDefault(); |
|
| 29 | 68 | }) |
|
| 30 | 68 | ->map(function (Attribute $attribute) { |
|
| 31 | 4 | return $attribute->getDefault(); |
|
| 32 | 68 | }) |
|
| 33 | 68 | ->toArray(); |
|
| 34 | |||
| 35 | 68 | return $defaults; |
|
| 36 | } |
||
| 38 |