Completed
Push — master ( bd5ff6...90c2c7 )
by Bernhard
07:04
created

Alignment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 35
ccs 4
cts 6
cp 0.6667
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A all() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of the webmozart/console 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 Webmozart\Console\UI\Style;
13
14
/**
15
 * Constants for text alignment.
16
 *
17
 * @since  1.0
18
 *
19
 * @author Bernhard Schussek <[email protected]>
20
 */
21
final class Alignment
22
{
23
    /**
24
     * Alignment: Align a cell to the left.
25
     */
26
    const LEFT = 0;
27
28
    /**
29
     * Alignment: Align a cell to the right.
30
     */
31
    const RIGHT = 1;
32
33
    /**
34
     * Alignment: Align a cell to the center.
35
     */
36
    const CENTER = 2;
37
38
    /**
39
     * Returns all possible alignments.
40
     *
41
     * @return int[] A list of valid alignment constants.
42
     */
43 3
    public static function all()
44
    {
45
        return array(
46 3
            self::LEFT,
47 3
            self::RIGHT,
48 3
            self::CENTER,
49
        );
50
    }
51
52
    private function __construct()
53
    {
54
    }
55
}
56