Failed Conditions
Pull Request — master (#200)
by Hura
02:41
created

InvalidWidthException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Box\Spout\Writer\Exception\Border;
4
5
use Box\Spout\Writer\Exception\WriterException;
6
use Box\Spout\Writer\Style\BorderPart;
7
8
class InvalidWidthException extends WriterException
9
{
10
11 3
    public function __construct($name)
12
    {
13 3
        $msg = '%s is not a valid width identifier for a border. Valid identifiers are: %s.';
14
15 3
        parent::__construct(sprintf($msg, $name, implode(',', BorderPart::getAllowedWidths())));
16
17 3
    }
18
}
19