WorkBookCreateZipFileException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getReturnCode() 0 3 1
A __construct() 0 5 1
A getPath() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Eclipxe\XlsxExporter\Exceptions;
6
7
use RuntimeException;
8
9
final class WorkBookCreateZipFileException extends RuntimeException implements XlsxException
10
{
11
    private string $path;
12
13
    private int $returnCode;
14
15
    public function __construct(string $path, int $returnCode)
16
    {
17
        parent::__construct(sprintf('Unable to create zip file %s (err: %d)', $path, $returnCode));
18
        $this->path = $path;
19
        $this->returnCode = $returnCode;
20
    }
21
22
    public function getPath(): string
23
    {
24
        return $this->path;
25
    }
26
27
    public function getReturnCode(): int
28
    {
29
        return $this->returnCode;
30
    }
31
}
32