MissingIssueException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
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 3
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * MissingIssueException
6
 */
7
8
namespace Fr3nch13\Jira\Exception;
9
10
/**
11
 * Missing Issue Exception
12
 *
13
 * Throw when a Project's Issue can't be found.
14
 */
15
class MissingIssueException extends JiraBaseException
16
{
17
    /**
18
     * @var int Throw a 404 when an issue is missing.
19
     */
20
    protected $_defaultCode = 404;
21
22
    /**
23
     * Constructor.
24
     *
25
     * Allows you to create exceptions that are treated as framework errors and disabled
26
     * when debug mode is off.
27
     *
28
     * @param string|array<int, string> $message Either the string of the error message, or an array of attributes
29
     *   that are made available in the view, and sprintf()'d into Exception::$_messageTemplate
30
     * @param int|null $code The code of the error, is also the HTTP status code for the error.
31
     * @param \Exception|null $previous the previous exception.
32
     */
33 3
    public function __construct($message = '', $code = null, $previous = null)
34
    {
35 3
        $this->_messageTemplate = __('Unable to find the issue: %s');
36
37 3
        parent::__construct($message, $code, $previous);
38
    }
39
}
40