Completed
Push — master ( 562528...e703ac )
by Sebastian
02:26
created

RuleSet::beams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 8
nc 1
nop 2
crap 1
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace SebastianFeldmann\CaptainHook\Hook\Message\RuleBook;
11
12
use SebastianFeldmann\CaptainHook\Hook\Message\Rule;
13
14
/**
15
 * Class RuleSet
16
 *
17
 * @package CaptainHook
18
 * @author  Sebastian Feldmann <[email protected]>
19
 * @link    https://github.com/sebastianfeldmann/captainhook
20
 * @since   Class available since Release 2.1.0
21
 */
22
abstract class RuleSet
23
{
24
    /**
25
     * Return Beams rule set.
26
     *
27
     * @param  int $subjectLength
28
     * @param  int $bodyLineLength
29
     * @return \SebastianFeldmann\CaptainHook\Hook\Message\Rule[]
30
     */
31 3
    public static function beams(int $subjectLength = 50, int $bodyLineLength = 72) : array
32
    {
33
        return [
34 3
            new Rule\CapitalizeSubject(),
35 3
            new Rule\LimitSubjectLength($subjectLength),
36 3
            new Rule\NoPeriodOnSubjectEnd(),
37 3
            new Rule\UseImperativeMood(),
38 3
            new Rule\LimitBodyLineLength($bodyLineLength),
39 3
            new Rule\SeparateSubjectFromBodyWithBlankLine()
40
        ];
41
    }
42
}
43