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.
Completed
Push — master ( d16b40...478306 )
by David
14:10
created

WorkflowNotFound   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A withName() 0 4 1
A forEntity() 0 4 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\Exception;
16
17
use Exception;
18
use Netzmacht\Workflow\Data\EntityId;
19
20
/**
21
 * Class WorkflowNotFound
22
 *
23
 * @package Netzmacht\Workflow\Exception
24
 */
25
class WorkflowNotFound extends \RuntimeException implements WorkflowException
26
{
27
    /**
28
     * Create exception with the workflow name.
29
     *
30
     * @param string    $workflowName Current workflow name.
31
     * @param int       $code         Error code.
32
     * @param Exception $previous     Previous thrown exception.
33
     *
34
     * @return self
35
     */
36
    public static function withName(string $workflowName, int $code = 0, Exception $previous = null)
37
    {
38
        return new self(sprintf('Workflow "%s" not found.', $workflowName), $code, $previous);
39
    }
40
41
    /**
42
     * Create exception with the workflow name.
43
     *
44
     * @param EntityId  $entityId Entity id.
45
     * @param int       $code     Error code.
46
     * @param Exception $previous Previous thrown exception.
47
     *
48
     * @return self
49
     */
50
    public static function forEntity(EntityId $entityId, int $code = 0, Exception $previous = null)
51
    {
52
        return new self(sprintf('No workflow found for entity "%s".', $entityId), $code, $previous);
53
    }
54
}
55