GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — analysis-YjgDMd ( da7263 )
by butschster
07:45
created

FileSize::minSize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 2
b 1
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace SleepingOwl\Admin\Traits;
4
5
trait FileSize
6
{
7
    use MaxFileSizeTrait;
8
9
    /**
10
     * @var number
11
     */
12
    protected $min;
13
14
    /**
15
     * @var number
16
     */
17
    protected $max;
18
19
    /**
20
     * @param int $size Max size in kilobytes
21
     *
22
     * @return $this
23
     */
24
    public function maxSize($size)
25
    {
26
        if ((int) $size > (int) $this->getMaxFileSize()) {
27
            $this->addValidationRule('max:'.(int) $this->getMaxFileSize());
0 ignored issues
show
Bug introduced by
It seems like addValidationRule() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
            $this->/** @scrutinizer ignore-call */ 
28
                   addValidationRule('max:'.(int) $this->getMaxFileSize());
Loading history...
28
        } else {
29
            $this->addValidationRule('max:'.(int) $size);
30
        }
31
32
        return $this;
33
    }
34
35
    /**
36
     * @param int $size Max size in kilobytes
37
     *
38
     * @return $this
39
     */
40
    public function minSize($size)
41
    {
42
        $this->addValidationRule('min:'.(int) $size);
43
44
        return $this;
45
    }
46
}
47