InvalidWorkSheetNameException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 21
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A __construct() 0 5 1
A getReason() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Eclipxe\XlsxExporter\Exceptions;
6
7
use LogicException;
8
9
final class InvalidWorkSheetNameException extends LogicException implements XlsxException
10
{
11
    private string $name;
12
13
    private string $reason;
14
15 14
    public function __construct(string $name, string $reason)
16
    {
17 14
        parent::__construct("Invalid worksheet name '$name': $reason");
18 14
        $this->name = $name;
19 14
        $this->reason = $reason;
20
    }
21
22
    public function getName(): string
23
    {
24
        return $this->name;
25
    }
26
27
    public function getReason(): string
28
    {
29
        return $this->reason;
30
    }
31
}
32