MissingDataException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 23
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * MissingConfigException
6
 */
7
8
namespace Fr3nch13\Jira\Exception;
9
10
/**
11
 * Missing Config Exception
12
 *
13
 * Throw when a config variable is missing.
14
 */
15
class MissingDataException extends JiraBaseException
16
{
17
    /**
18
     * @var int Throw a 500 when config variable is missing.
19
     */
20
    protected $_defaultCode = 500;
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 4
    public function __construct($message = '', $code = null, $previous = null)
34
    {
35 4
        $this->_messageTemplate = __('Missing Data: %s');
36
37 4
        parent::__construct($message, $code, $previous);
38
    }
39
}
40