IllegalMoveException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 33
c 1
b 0
f 0
wmc 2
lcom 0
cbo 0
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getMove() 0 4 1
1
<?php
2
3
namespace MiniGame\Exceptions;
4
5
use MiniGame\Move;
6
7
class IllegalMoveException extends \Exception
8
{
9
    /**
10
     * @var Move
11
     */
12
    private $move;
13
14
    /**
15
     * Constructor
16
     *
17
     * @param Move       $move
18
     * @param string     $message
19
     * @param int        $code
20
     * @param \Exception $previous
21
     */
22 6
    public function __construct(
23
        Move $move = null,
24
        $message = "",
25
        $code = 0,
26
        \Exception $previous = null
27
    ) {
28 6
        $this->move = $move;
29 6
        parent::__construct($message, $code, $previous);
30 6
    }
31
32
    /**
33
     * @return string
34
     */
35 3
    public function getMove()
36
    {
37 3
        return $this->move;
38
    }
39
}
40