Completed
Pull Request — master (#25)
by
unknown
03:19
created

FileSizeTester::test()   A

Complexity

Conditions 4
Paths 3

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 0
Metric Value
cc 4
eloc 5
nc 3
nop 3
dl 0
loc 9
ccs 0
cts 8
cp 0
crap 20
rs 9.2
c 0
b 0
f 0
1
<?php
2
3
namespace Wandu\Validator\Testers;
4
5
class FileSizeTester extends PropertyTesterAbstract
6
{
7
    
8
    /**
9
	 * [test :: check the file size]
10
	 * @param  [type] $data   [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
11
	 * @param  [type] $origin [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
12
	 * @param  [type] $keys   [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
13
	 * @return bool           [a]
14
	 */
15
    public function test(array $data = [], $origin = null, array $keys = []): bool
16
    {
17
        if ( !$data['max'] || $data['mix'] ) {
18
            return false;
19
        }
20
        
21
        $checkIsMax = ( $data['max'] );
22
        return (  $checkIsMax ? ( $data['max'] > $data['value']  ) :  ( $data['min'] < $data['value'] ) );
23
    }
24
}
25
26
/* End of file FileSizeTester.php */
27
/* Location: /src/Wandu/Validator/Testers/FileSizeTester.php */
28