Completed
Push — issue#804 ( 62fcb8 )
by Guilherme
04:14
created

AbstractChallenge   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 33
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAttemptsLeft() 0 3 1
A getCpf() 0 3 1
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace PROCERGS\LoginCidadao\CpfVerificationBundle\Model;
12
13
abstract class AbstractChallenge implements ChallengeInterface
14
{
15
    /** @var string */
16
    private $cpf;
17
18
    /** @var int */
19
    private $attemptsLeft;
20
21
    /**
22
     * Challenge constructor.
23
     * @param string $cpf
24
     * @param int $attemptsLeft
25
     */
26 15
    public function __construct(int $attemptsLeft, string $cpf)
27
    {
28 15
        $this->cpf = $cpf;
29 15
        $this->attemptsLeft = $attemptsLeft;
30 15
    }
31
32
    /**
33
     * @return string
34
     */
35 9
    public function getCpf(): string
36
    {
37 9
        return $this->cpf;
38
    }
39
40
    /**
41
     * @return int
42
     */
43 8
    public function getAttemptsLeft(): int
44
    {
45 8
        return $this->attemptsLeft;
46
    }
47
}
48