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   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
eloc 11
c 3
b 1
f 0
dl 0
loc 27
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A maxFiles() 0 5 1
A minFiles() 0 5 1
A passes() 0 7 2
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