Test Failed
Push — master ( 22b809...326de4 )
by Brent
05:15 queued 39s
created

StitcherException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Stitcher\Exception;
4
5
use Exception;
6
7
class StitcherException extends Exception
8
{
9
    protected $title;
10
    protected $body;
11
12 2
    public function __construct(string $title, ?string $body = null)
13
    {
14 2
        parent::__construct($title);
15
16 2
        $this->title = $title;
17 2
        $this->body = $body;
18 2
    }
19
20
    public function title(): string
21
    {
22
        return $this->title;
23
    }
24
25
    public function body(): ?string
26
    {
27
        return $this->body;
28
    }
29
}
30