TableValidatorCollection   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 6

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 14 1
1
<?php
2
/**
3
 * @author stev leibelt <[email protected]>
4
 * @since 2013-08-12 
5
 */
6
7
namespace Example\Validator;
8
9
use Net\Bazzline\Component\Requirement\AndCondition;
10
use Net\Bazzline\Component\Requirement\Requirement;
11
12
/**
13
 * Class TableValidatorCollection
14
 *
15
 * @method TableValidatorCollection setTable(Table $table) sets the current table instance
16
 *
17
 * @package Example\Validator
18
 * @author stev leibelt <[email protected]>
19
 * @since 2013-08-12
20
 */
21
class TableValidatorCollection extends Requirement
22
{
23
    /**
24
     * @return TableValidatorCollection
25
     * @author stev leibelt <[email protected]>
26
     * @since 2012-08-12
27
     */
28
    public static function create()
29
    {
30
        $self = new self();
31
32
        $andCondition = new AndCondition();
33
        $andCondition->addItem(new ColorValidator());
34
        $andCondition->addItem(new HeightValidator());
35
        $andCondition->addItem(new LengthValidator());
36
        $andCondition->addItem(new WidthValidator());
37
38
        $self->addCondition($andCondition);
39
40
        return $self;
41
    }
42
}