BindingState::all()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
crap 2
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