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.
Passed
Pull Request — master (#1061)
by Maxim
04:23 queued 01:35
created

FrameworkTemplate::getTemplateContent()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 43
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 43
ccs 0
cts 32
cp 0
crap 2
rs 8.8571
c 0
b 0
f 0
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\Template;
9
10
abstract class FrameworkTemplate extends Template
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    protected function getTemplateContent()
16
    {
17
        return <<<PHP
18
<?php
19
namespace Deployer;
20
require 'recipe/{$this->getRecipe()}.php';
21
22
// Configuration
23
24
set('ssh_type', 'native');
25
set('ssh_multiplexing', true);
26
27
set('repository', '[email protected]:username/repository.git');
28
29
add('shared_files', []);
30
add('shared_dirs', []);
31
32
add('writable_dirs', []);
33
34
// Servers
35
36
server('production', 'domain.com')
37
    ->user('username')
38
    ->identityFile()
39
    ->set('deploy_path', '/var/www/domain.com')
40
    ->pty(true);
41
42
43
// Tasks
44
45
desc('Restart PHP-FPM service');
46
task('php-fpm:restart', function () {
47
    // The user must have rights for restart service
48
    // /etc/sudoers: username ALL=NOPASSWD:/bin/systemctl restart php-fpm.service
49
    run('sudo systemctl restart php-fpm.service');
50
});
51
after('deploy:symlink', 'php-fpm:restart');
52
53
// [Optional] if deploy fails automatically unlock.
54
after('deploy:failed', 'deploy:unlock');
55
{$this->getExtraContent()}
56
PHP;
57
    }
58
59
    abstract protected function getRecipe();
60
61
    protected function getExtraContent()
62
    {
63
        return '';
64
    }
65
}
66