AbstractType   A
last analyzed

Complexity

Total Complexity 15

Size/Duplication

Total Lines 80
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 13

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
dl 0
loc 80
wmc 15
lcom 0
cbo 13
ccs 31
cts 31
cp 1
rs 10
c 2
b 0
f 2

15 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
A equal() 0 4 1
A different() 0 4 1
A like() 0 4 1
A notLike() 0 4 1
A greaterThan() 0 4 1
A greaterOrEqualThan() 0 4 1
A lowerThan() 0 4 1
A lowerOrEqualThan() 0 4 1
A between() 0 4 1
A in() 0 4 1
A isNull() 0 4 1
A isNotNull() 0 4 1
A notIn() 0 4 1
1
<?php
2
3
namespace Muffin\Types;
4
5
use Muffin\Type;
6
use Muffin\Conditions;
7
8
abstract class AbstractType implements Type
9
{
10
    private
11
        $name;
12
13 81
    public function __construct($name)
14
    {
15 81
        $this->name = (string) $name;
16 81
    }
17
18 240
    public function getName()
19
    {
20 240
        return $this->name;
21
    }
22
23 1
    public function equal($value)
24
    {
25 1
        return new Conditions\Equal($this, $value);
26
    }
27
28 1
    public function different($value)
29
    {
30 1
        return new Conditions\Different($this, $value);
31
    }
32
33 1
    public function like($value)
34
    {
35 1
        return new Conditions\Like($this, $value);
36
    }
37
38 1
    public function notLike($value)
39
    {
40 1
        return new Conditions\NotLike($this, $value);
41
    }
42
43 1
    public function greaterThan($value)
44
    {
45 1
        return new Conditions\Greater($this, $value);
46
    }
47
48 1
    public function greaterOrEqualThan($value)
49
    {
50 1
        return new Conditions\GreaterOrEqual($this, $value);
51
    }
52
53 1
    public function lowerThan($value)
54
    {
55 1
        return new Conditions\Lower($this, $value);
56
    }
57
58 1
    public function lowerOrEqualThan($value)
59
    {
60 1
        return new Conditions\LowerOrEqual($this, $value);
61
    }
62
63 1
    public function between($start, $end)
64
    {
65 1
        return new Conditions\Between($this, $start, $end);
66
    }
67
68 1
    public function in($value)
69
    {
70 1
        return new Conditions\In($this, $value);
71
    }
72
73 1
    public function isNull()
74
    {
75 1
        return new Conditions\IsNull($this);
76
    }
77
78 1
    public function isNotNull()
79
    {
80 1
        return new Conditions\IsNotNull($this);
81
    }
82
83 1
    public function notIn($value)
84
    {
85 1
        return new Conditions\NotIn($this, $value);
86
    }
87
}
88