BindingState   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 2 Features 0
Metric Value
wmc 2
c 2
b 2
f 0
lcom 0
cbo 0
dl 0
loc 50
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A all() 0 10 1
1
<?php
2
3
/*
4
 * This file is part of the puli/manager package.
5
 *
6
 * (c) Bernhard Schussek <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Puli\Manager\Api\Discovery;
13
14
/**
15
 * Contains constants representing the state of a binding.
16
 *
17
 * @since  1.0
18
 *
19
 * @author Bernhard Schussek <[email protected]>
20
 */
21
final class BindingState
22
{
23
    /**
24
     * State: The binding is enabled.
25
     */
26
    const ENABLED = 1;
27
28
    /**
29
     * State: The binding is disabled.
30
     */
31
    const DISABLED = 2;
32
33
    /**
34
     * State: The binding's type does not exist.
35
     */
36
    const TYPE_NOT_FOUND = 3;
37
38
    /**
39
     * State: The binding's type does not exist.
40
     */
41
    const TYPE_NOT_ENABLED = 4;
42
43
    /**
44
     * State: The binding does not match the constraints of the binding type.
45
     */
46
    const INVALID = 5;
47
48
    /**
49
     * Returns all binding states.
50
     *
51
     * @return int[] The binding states.
52
     */
53
    public static function all()
54
    {
55
        return array(
56
            self::ENABLED,
57
            self::DISABLED,
58
            self::TYPE_NOT_FOUND,
59
            self::TYPE_NOT_ENABLED,
60
            self::INVALID,
61
        );
62
    }
63
64
    /**
65
     * Must not be instantiated.
66
     */
67
    private function __construct()
68
    {
69
    }
70
}
71