Completed
Push — master ( faad6e...37d694 )
by Jürg
07:54
created

DinersClub   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPattern() 0 4 1
1
<?php
2
3
namespace Jgxvx\Common\Validator\CreditCardNumber;
4
5
/**
6
 * Credit card number regex found on Stack Overflow.
7
 *
8
 * @link http://stackoverflow.com/a/23231321
9
 */
10
class DinersClub extends AbstractValidator
11
{
12
13 1
    protected function getPattern() : string
14
    {
15 1
        return '/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/';
16
    }
17
}