InvalidArguments::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 4
1
<?php namespace nyx\console\input\exceptions;
2
3
// Internal dependencies
4
use nyx\console\input\parameter\values\Arguments;
5
6
/**
7
 * Invalid Arguments Exception
8
 *
9
 * @version     0.1.0
10
 * @author      Michal Chojnacki <[email protected]>
11
 * @copyright   2012-2017 Nyx Dev Team
12
 * @link        https://github.com/unyx/nyx
13
 */
14
class InvalidArguments extends InvalidParameters
15
{
16
    /**
17
     * @var Arguments    The Input Arguments which caused the Exception.
18
     */
19
    private $arguments;
20
21
    /**
22
     * {@inheritDoc}
23
     *
24
     * @param   Arguments    $arguments  The Input Arguments which caused the Exception.
25
     */
26
    public function __construct(Arguments $arguments, string $message = null, int $code = 0, \Exception $previous = null)
27
    {
28
        $this->arguments = $arguments;
29
30
        // Proceed to create the base Exception.
31
        parent::__construct($message, $code, $previous);
32
    }
33
34
    /**
35
     * Returns the Input Arguments which caused the Exception.
36
     *
37
     * @return  Arguments
38
     */
39
    public function getArguments() : Arguments
40
    {
41
        return $this->arguments;
42
    }
43
}
44