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

InvalidInitialProcessor::given()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
c 1
b 0
f 0
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
}