Passed
Push — develop ( d944ff...2efefd )
by Stone
07:19 queued 10s
created

RedirectException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Exception;
4
5
use Symfony\Component\Config\Definition\Exception\Exception;
6
use Symfony\Component\HttpFoundation\RedirectResponse;
7
use Throwable;
8
9
class RedirectException extends Exception
10
{
11
    /**
12
     * @var RedirectResponse
13
     */
14
    private $redirectResponse;
15
16
    public function __construct(
17
        string $redirectResponse,
18
        string $message = "",
19
        int $code = 0,
20
        Throwable $previous = null
21
    ) {
22
        $this->redirectResponse = $redirectResponse;
0 ignored issues
show
Documentation Bug introduced by
It seems like $redirectResponse of type string is incompatible with the declared type Symfony\Component\HttpFoundation\RedirectResponse of property $redirectResponse.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
23
        parent::__construct($message, $code, $previous);
24
    }
25
26
    public function getRedirectResponse()
27
    {
28
        return $this->redirectResponse;
29
    }
30
31
32
}