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.

Config   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 11
lcom 1
cbo 0
dl 0
loc 47
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A removeBinDirectory() 0 10 3
A makeBinDirectory() 0 6 2
A binExists() 0 4 1
A binDirectoryExists() 0 9 3
A getBinDirectory() 0 6 1
A getBinFile() 0 4 1
1
<?php
2
3
namespace Youtubedl;
4
5
class Config
6
{
7
    public static function removeBinDirectory()
8
    {
9
        if (self::binExists()) {
10
            unlink(self::getBinFile());
11
            unlink(self::getBinFile().'.exe');
12
        }
13
        if (self::binDirectoryExists()) {
14
            rmdir(self::getBinDirectory());
15
        }
16
    }
17
18
    public static function makeBinDirectory()
19
    {
20
        if (!self::binDirectoryExists()) {
21
            mkdir(self::getBinDirectory());
22
        }
23
    }
24
25
    public static function binExists()
26
    {
27
        return file_exists(self::getBinFile());
28
    }
29
30
    public static function binDirectoryExists()
31
    {
32
        $binDirectory = self::getBinDirectory();
33
        if (file_exists($binDirectory) && is_dir($binDirectory)) {
34
            return true;
35
        }
36
37
        return false;
38
    }
39
40
    public static function getBinDirectory()
41
    {
42
        $rootDirectory = realpath(__DIR__.'/../../');
43
44
        return "{$rootDirectory}/bin";
45
    }
46
47
    public static function getBinFile()
48
    {
49
        return self::getBinDirectory().'/Youtubedl';
50
    }
51
}
52