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

FileSizeTester   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

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