InvalidArguments   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getArguments() 0 4 1
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