| Total Complexity | 4 | 
| Total Lines | 48 | 
| Duplicated Lines | 0 % | 
| Changes | 3 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 8 | class ZipContent implements Rule | ||
| 9 | { | ||
| 10 | /** | ||
| 11 | * @var Validator | ||
| 12 | */ | ||
| 13 | private $validator; | ||
| 14 | /** | ||
| 15 | * @var \Illuminate\Support\Collection | ||
| 16 | */ | ||
| 17 | private $failedFiles; | ||
| 18 | |||
| 19 | /** | ||
| 20 | * Create a new rule instance. | ||
| 21 | * | ||
| 22 | * @param array|string $files | ||
| 23 | * @param bool|string $allowEmpty | ||
| 24 | */ | ||
| 25 | public function __construct($files, $allowEmpty = true) | ||
| 26 |     { | ||
| 27 | $this->validator = new Validator( | ||
| 28 | is_bool($allowEmpty) ? $files : func_get_args(), | ||
| 29 | $allowEmpty | ||
| 30 | ); | ||
| 31 | } | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Determine if the validation rule passes. | ||
| 35 | * | ||
| 36 | * @param string $attribute | ||
| 37 | * @param \Illuminate\Http\UploadedFile $zipFile | ||
| 38 | * @return bool | ||
| 39 | */ | ||
| 40 | public function passes($attribute, $zipFile): bool | ||
| 45 | } | ||
| 46 | |||
| 47 | /** | ||
| 48 | * Get the validation error message. | ||
| 49 | * | ||
| 50 | * @return string | ||
| 51 | */ | ||
| 52 | public function message(): string | ||
| 56 | ]); | ||
| 57 | } | ||
| 59 |