Failed Conditions
Pull Request — master (#16)
by Adrien
05:43
created

OtpTypeTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 11
c 1
b 0
f 0
dl 0
loc 22
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createType() 0 3 1
A providerValues() 0 10 1
A getTypeName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace EcodevTests\Felix\Api\Scalar;
6
7
use Ecodev\Felix\Api\Scalar\OtpType;
8
9
final class OtpTypeTest extends AbstractStringBasedType
10
{
11
    public function createType(): \Ecodev\Felix\Api\Scalar\AbstractStringBasedType
12
    {
13
        return new OtpType();
14
    }
15
16
    public function getTypeName(): string
17
    {
18
        return 'Otp';
19
    }
20
21
    public function providerValues(): iterable
22
    {
23
        return [
24
            ['', '', false],
25
            ['3', '3', false],
26
            ['1234', '1234', true],
27
            ['949358', '949358', true],
28
            [null, null, false],
29
            [' ', ' ', false],
30
            ['123456789', '123456789', false],
31
        ];
32
    }
33
}
34