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

WrongAnswerException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 4
dl 0
loc 8
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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\Exception;
12
13
use PROCERGS\LoginCidadao\CpfVerificationBundle\Model\ChallengeInterface;
14
use Throwable;
15
16
class WrongAnswerException extends \RuntimeException
17
{
18
    /** @var ChallengeInterface */
19
    private $challenge;
20
21
    /**
22
     * @inheritDoc
23
     */
24 1
    public function __construct(
25
        ChallengeInterface $challenge,
26
        string $message = "",
27
        int $code = 0,
28
        Throwable $previous = null
29
    ) {
30 1
        $this->challenge = $challenge;
31 1
        parent::__construct($message, $code, $previous);
32 1
    }
33
34
    /**
35
     * @return ChallengeInterface
36
     */
37 1
    public function getChallenge(): ChallengeInterface
38
    {
39 1
        return $this->challenge;
40
    }
41
}
42