Completed
Push — master ( 6037d1...425a08 )
by Michał
02:10
created

Exception::getCollection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace nyx\core\collections;
2
3
/**
4
 * Collection Exception
5
 *
6
 * @version     0.1.0
7
 * @author      Michal Chojnacki <[email protected]>
8
 * @copyright   2012-2017 Nyx Dev Team
9
 * @link        https://github.com/unyx/nyx
10
 */
11
class Exception extends \RuntimeException
12
{
13
    /**
14
     * @var interfaces\Collection   The Collection in which this Exception occurred.
15
     */
16
    private $collection;
17
18
    /**
19
     * {@inheritdoc}
20
     *
21
     * @param   interfaces\Collection   $collection     The Collection in which this Exception occurred.
22
     */
23
    public function __construct(interfaces\Collection $collection, string $message, $code = 0, $previous = null)
24
    {
25
        parent::__construct($message, $code, $previous);
26
    }
27
28
    /**
29
     * Returns the Collection in which this Exception occurred.
30
     *
31
     * @return  interfaces\Collection
32
     */
33
    public function getCollection() : interfaces\Collection
34
    {
35
        return $this->collection;
36
    }
37
}
38