UnknownTrackTypeException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTrackType() 0 4 1
1
<?php
2
3
namespace Mhor\MediaInfo\Exception;
4
5
class UnknownTrackTypeException extends \Exception
6
{
7
    /**
8
     * @var null|string
9
     */
10
    private $trackType = null;
11
12
    /**
13
     * @param string $trackType
14
     * @param int    $code
15
     */
16 4
    public function __construct(string $trackType, $code = 0)
17
    {
18 4
        parent::__construct(sprintf('Type doesn\'t exist: %s', $trackType), $code, null);
19 4
        $this->trackType = $trackType;
20 4
    }
21
22
    /**
23
     * @return null|string
24
     */
25 1
    public function getTrackType()
26
    {
27 1
        return $this->trackType;
28
    }
29
}
30