Completed
Push — develop ( 264d47...05a799 )
by Barry
02:39
created

PdfcrowdException::__toString()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 0
crap 2
1
<?php
2
3
namespace Swis\PdfcrowdClient\Exceptions;
4
5
class PdfcrowdException extends \Exception
6
{
7 4
    public function __toString()
8
    {
9 4
        if ($this->code) {
10 2
            return "[{$this->code}] {$this->message}\n";
11
        } else {
12 2
            return "{$this->message}\n";
13
        }
14
    }
15
}
16