Completed
Push — symfony-console-application ( 3187e2...c3ee2a )
by Luis
10:39
created

InvalidInitialProcessor   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 12
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 RuntimeException;
10
11
class InvalidInitialProcessor extends RuntimeException
12
{
13
    /**
14
     * @param Processor $processor
15
     * @return InvalidInitialProcessor
16
     */
17
    public static function given(Processor $processor)
18
    {
19
        return new InvalidInitialProcessor(sprintf(
20
            'Given processor does not support input type "%s", input type "%s" found',
21
            Processor::INITIAL_INPUT_TYPE,
22
            $processor->getInputType()
23
        ));
24
    }
25
}