Completed
Pull Request — master (#27)
by
unknown
03:47
created

FileSizeTester::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Wandu\Validator\Testers;
4
5
use Wandu\Validator\Contracts\Tester;
6
7
class FileSizeTester implements Tester
8
{
9
    /** @var int */
10
    protected $max;
11
    
12
	/**
13
     * @param int $max
14
     */
15
    public function __construct($max)
16
    {
17
        $this->max = $max;
18
    }
19
	
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function test($data, $origin = null, array $keys = []): bool
24
    {
25
        return (  $this->max > $data );
26
    }
27
}
28
29