WidthValidator::isMet()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @author stev leibelt <[email protected]>
4
 * @since 2013-08-12 
5
 */
6
7
namespace Example\Validator;
8
9
/**
10
 * Class WidthValidator
11
 *
12
 * @package Example\Validator
13
 * @author stev leibelt <[email protected]>
14
 * @since 2013-08-12
15
 */
16
class WidthValidator extends AbstractTableValidator
17
{
18
    /**
19
     * @return bool
20
     * @author stev leibelt <[email protected]>
21
     * @since 2013-08-12
22
     */
23
    public function isMet()
24
    {
25
        $width = $this->table->getWidth();
26
        $maxWidth = 160;
27
        $minWidth = 70;
28
29
        return (($width >= $minWidth) && ($width <= $maxWidth));
30
    }
31
}