GenericAttribute   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isRequired() 0 6 1
A isNotNull() 0 6 1
1
<?php
2
/**
3
 * Author: Nil Portugués Calderó <[email protected]>
4
 * Date: 9/20/14
5
 * Time: 11:22 AM
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace NilPortugues\Validator\Attribute;
12
13
use NilPortugues\Validator\AbstractValidator;
14
15
/**
16
 * Class GenericAttribute
17
 * @package NilPortugues\Validator\Attribute
18
 */
19
class GenericAttribute extends AbstractValidator
20
{
21
    /**
22
     * @return $this
23
     */
24
    public function isRequired()
25
    {
26
        $this->addCondition(__METHOD__);
27
28
        return $this;
29
    }
30
31
    /**
32
     * @return $this
33
     */
34
    public function isNotNull()
35
    {
36
        $this->addCondition(__METHOD__);
37
38
        return $this;
39
    }
40
}
41