| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | class LimitSubjectLength extends Base |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Length limit |
||
| 28 | * |
||
| 29 | * @var int |
||
| 30 | */ |
||
| 31 | protected $maxLength; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Constructor |
||
| 35 | * |
||
| 36 | * @param int $length |
||
| 37 | */ |
||
| 38 | 8 | public function __construct(int $length = 50) |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Check if commit message doesn't exceeed the max length |
||
| 46 | * |
||
| 47 | * @param \SebastianFeldmann\Git\CommitMessage $msg |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | 8 | public function pass(CommitMessage $msg): bool |
|
| 60 |