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

DinersClub::getPattern()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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
}