Illegible::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 4
dl 0
loc 9
ccs 0
cts 9
cp 0
crap 2
rs 9.6666
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Minotaur
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7
 * use this file except in compliance with the License. You may obtain a copy of
8
 * the License at
9
 *
10
 * http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
 * License for the specific language governing permissions and limitations under
16
 * the License.
17
 *
18
 * @copyright 2015-2017 Appertly
19
 * @license   Apache-2.0
20
 */
21
namespace Minotaur\Net\Exception;
22
23
/**
24
 * Exception for translation problems (e.g. json_decode on non-JSON).
25
 */
26
class Illegible extends \InvalidArgumentException implements \Minotaur\Net\Exception
27
{
28
    /**
29
     * @var mixed
30
     */
31
    private $argument;
32
33
    /**
34
     * Creates a new Illegible.
35
     */
36
    public function __construct(
37
        $argument = "",
38
        string $message = "",
39
        int $code = 0,
40
        \Exception $cause = null
41
    ) {
42
        $this->argument = $argument;
43
        parent::__construct($message, $code, $cause);
44
    }
45
46
    /**
47
     * Gets the illegible argument
48
     *
49
     * @return mixed The illegible argument
50
     */
51
    public function getArgument()
52
    {
53
        return $this->argument;
54
    }
55
}
56