Completed
Push — image-processors-refactoring ( dcd98f )
by Luis
05:57
created

InvalidProcessorChain   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A with() 0 6 1
1
<?php
2
namespace PhUml\Processors;
3
4
use plProcessor;
5
use RuntimeException;
6
7
class InvalidProcessorChain extends RuntimeException
8
{
9 12
    public static function with(plProcessor $last, plProcessor $next)
10
    {
11 12
        return new InvalidProcessorChain(sprintf(
12 12
            'Two processors in the chain are incompatible. The first processor\'s output is "%s". The next Processor in the queue does only support the following input type: %s.',
13 12
            $last->getOutputType(),
14 12
            $next->getInputType()
15
        ));
16
    }
17
}
18