| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Modules\Media\Validators; |
||
| 9 | public function validateMaxSize($attribute, UploadedFile $value, $parameters) |
||
| 10 | { |
||
| 11 | $mediaPath = public_path(config('asgard.media.config.files-path')); |
||
| 12 | $folderSize = $this->getDirSize($mediaPath); |
||
| 13 | |||
| 14 | preg_match('/([0-9]+)/', $folderSize, $match); |
||
| 15 | |||
| 16 | return ($match[0] + $value->getSize()) < config('asgard.media.config.max-total-size'); |
||
| 17 | } |
||
| 18 | |||
| 34 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.