Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Pull Request — crud-uploads-with-dropzone (#5037)
by Pedro
13:50
created

UploadedFile::minFiles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Backpack\CRUD\app\Library\Uploaders\Support\Validation;
4
5
use Illuminate\Validation\Rules\File;
6
7
class UploadedFile extends File
8
{
9
    public ?int $maxFiles = null;
10
    public ?int $minFiles = null;
11
    public bool $shouldValidateFiles = false;
12
13
    public function maxFiles(int $maxFiles): self
14
    {
15
        $this->maxFiles = $maxFiles;
16
17
        return $this;
18
    }
19
20
    public function minFiles(int $minFiles): self
21
    {
22
        $this->minFiles = $minFiles;
23
24
        return $this;
25
    }
26
27
    public function passes($attribute, $value)
28
    {
29
        if (! $this->shouldValidateFiles) {
30
            return true;
31
        }
32
33
        return parent::passes($attribute, $value);
34
    }
35
}
36