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 ( 99078a...9605c1 )
by Oanh
02:49
created

TemplateNotFoundException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 6
nc 1
nop 4
crap 1
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Initializer\Exception;
9
10
/**
11
 * Control template not found errors
12
 *
13
 * @author Vitaliy Zhuk <[email protected]>
14
 */
15
class TemplateNotFoundException extends \Exception
16
{
17
    /**
18
     * Create a new exception via template name
19
     *
20
     * @param string     $template
21
     * @param array      $availableTemplates
22
     * @param int        $code
23
     * @param \Exception $prev
24
     *
25
     * @return TemplateNotFoundException
26
     */
27 1
    public static function create($template, array $availableTemplates, $code = 0, \Exception $prev = null)
28
    {
29 1
        return new static(sprintf(
30 1
            'Not found template with name "%s". Available templates: "%s"',
31 1
            $template,
32 1
            implode('", "', $availableTemplates)
33 1
        ), $code, $prev);
34
    }
35
}
36