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

Alignment::all()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4286
cc 1
eloc 5
nc 1
nop 0
crap 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