Completed
Push — master ( 82906d...60674b )
by Hannes
02:52
created

Number   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 12
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 4 1
A isMatch() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace byrokrat\autogiro\Matcher;
6
7
/**
8
 * Matcher for numeric content
9
 */
10
class Number extends BaseMatcher
11
{
12
    protected function getDescription(): string
13
    {
14
        return 'number';
15
    }
16
17
    protected function isMatch(string $str): bool
18
    {
19
        return ctype_digit($str);
20
    }
21
}
22