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

FileSizeTester   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A test() 0 4 1
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