GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

TransitionNotFound   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A withName() 0 12 1
1
<?php
2
3
/**
4
 * Workflow library.
5
 *
6
 * @package    workflow
7
 * @author     David Molineus <[email protected]>
8
 * @copyright  2014-2017 netzmacht David Molineus
9
 * @license    LGPL 3.0 https://github.com/netzmacht/workflow
10
 * @filesource
11
 */
12
13
declare(strict_types=1);
14
15
namespace Netzmacht\Workflow\Flow\Exception;
16
17
use Exception;
18
19
/**
20
 * Class TransitionNotFoundException is thrown then transition was not found.
21
 *
22
 * @package Netzmacht\Workflow\Flow\Exception
23
 */
24
class TransitionNotFound extends FlowException
25
{
26
    /**
27
     * Construct.
28
     *
29
     * @param string    $transitionName The not found transition name.
30
     * @param string    $workflowName   Current workflow name.
31
     * @param int       $code           Error code.
32
     * @param Exception $previous       Previous thrown exception.
33
     *
34
     * @return TransitionNotFound
35
     */
36
    public static function withName(
37
        string $transitionName,
38
        string $workflowName,
39
        int $code = 0,
40
        Exception $previous = null
41
    ) {
42
        return new self(
43
            sprintf('Transition "%s" not found in workflow "%s"', $transitionName, $workflowName),
44
            $code,
45
            $previous
46
        );
47
    }
48
}
49