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.

Composer::download()   A
last analyzed

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 0
1
<?php
2
3
namespace Application\Tool;
4
5
/**
6
 * @author Borut Balažek <[email protected]>
7
 */
8
class Composer
9
{
10
    /**
11
     * Post install composer commands.
12
     */
13
    public static function postInstallCmd()
14
    {
15
        Storage::prepare();
16
        Environment::prepare();
17
        Console::updateDatabaseSchema();
18
    }
19
20
    /**
21
     * Post update composer commands.
22
     */
23
    public static function postUpdateCmd()
24
    {
25
        self::postInstallCmd();
26
    }
27
28
    /**
29
     * Downloads composer.
30
     */
31
    public static function download()
32
    {
33
        return Console::execute('curl -sS https://getcomposer.org/installer | php -- --install-dir=bin');
34
    }
35
36
    /**
37
     * Updates composer.
38
     */
39
    public static function update()
40
    {
41
        return Console::execute('php bin/composer.phar update');
42
    }
43
44
    /**
45
     * @return bool
46
     */
47
    public static function isInstalled()
48
    {
49
        if (`which composer`) {
50
            return true;
51
        }
52
53
        return false;
54
    }
55
}
56