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

InvalidInitialProcessor   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A given() 0 6 1
1
<?php
2
/**
3
 * PHP version 7.1
4
 *
5
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
6
 */
7
namespace PhUml\Processors;
8
9
use plProcessor;
10
use RuntimeException;
11
12
class InvalidInitialProcessor extends RuntimeException
13
{
14
    /**
15
     * @param plProcessor $processor
16
     * @return InvalidInitialProcessor
17
     */
18 6
    public static function given(plProcessor $processor)
19
    {
20 6
        return new InvalidInitialProcessor(sprintf(
21 6
            'Given processor does not support input type "%s", input type "%s" found',
22 6
            plProcessor::INITIAL_INPUT_TYPE,
23 6
            $processor->getInputType()
24
        ));
25
    }
26
}