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 — develop ( a5be90...e1de2b )
by David
11:29
created

WorkflowNotFound::forEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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