Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function passes($attribute, $value) |
||
34 | { |
||
35 | $values = Arr::wrap($value); |
||
36 | |||
37 | // Before we can validate the size we need to make sure that all values |
||
38 | // are a base64 string. |
||
39 | if (! parent::passes($attribute, $values)) { |
||
40 | return false; |
||
41 | } |
||
42 | |||
43 | $size = array_reduce($values, function ($carry, $value) { |
||
44 | return $carry + $this->getSize($value); |
||
45 | }); |
||
46 | |||
47 | return $size <= $this->size; |
||
48 | } |
||
62 |