Completed
Push — master ( ec1659...c4a35f )
by Billie
03:02
created

getMessageValidator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace PurpleBooth\GitLintValidators;
6
7
use PurpleBooth\GitLintValidators\Validator\CapitalizeTheSubjectLineValidator;
8
use PurpleBooth\GitLintValidators\Validator\DoNotEndTheSubjectLineWithAPeriodValidator;
9
use PurpleBooth\GitLintValidators\Validator\LimitTheBodyWrapLengthTo72CharactersValidator;
10
use PurpleBooth\GitLintValidators\Validator\LimitTheTitleLengthTo69CharactersValidator;
11
use PurpleBooth\GitLintValidators\Validator\SeparateSubjectFromBodyWithABlankLineValidator;
12
use PurpleBooth\GitLintValidators\Validator\SoftLimitTheTitleLengthTo50CharactersValidator;
13
14
/**
15
 * Class ValidatorFactoryImplementation
16
 *
17
 * @package PurpleBooth\GitLintValidators
18
 */
19
class ValidatorFactoryImplementation implements ValidatorFactory
20
{
21
    public function getMessageValidator() : ValidateMessage
22
    {
23
        $messageValidator = new ValidateMessageImplementation(
24
            [
25
                new CapitalizeTheSubjectLineValidator(),
26
                new DoNotEndTheSubjectLineWithAPeriodValidator(),
27
                new LimitTheBodyWrapLengthTo72CharactersValidator(),
28
                new LimitTheTitleLengthTo69CharactersValidator(),
29
                new SeparateSubjectFromBodyWithABlankLineValidator(),
30
                new SoftLimitTheTitleLengthTo50CharactersValidator(),
31
            ]
32
        );
33
34
        return $messageValidator;
35
    }
36
}
37