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.

FilesFixeds::getInstance()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 15
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 15
rs 9.4285
cc 3
eloc 7
nc 4
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: pedro
5
 * Date: 18/11/16
6
 * Time: 14:01
7
 */
8
9
namespace Classes\AdapterMakerFile;
10
11
12
class FilesFixeds
13
{
14
    /**
15
     * @type string
16
     */
17
    private $tpl;
18
    /**
19
     * @type string
20
     */
21
    private $fileName;
22
23
    private function __construct (){ }
24
25
    public static function getInstance ( $args = array () )
26
    {
27
        $obj = new FilesFixeds();
28
        if ( key_exists ( 'tpl' , $args ) )
29
        {
30
            $obj->setTpl ( $args[ 'tpl' ] );
31
        }
32
33
        if ( key_exists ( 'name' , $args ) )
34
        {
35
            $obj->setFileName ( $args[ 'name' ] );
36
        }
37
38
        return $obj;
39
    }
40
41
    public function hasData ()
42
    {
43
        return $this->hasTpl () && $this->hasFileName ();
44
    }
45
46
    /**
47
     * @return bool
48
     */
49
    public function hasTpl ()
50
    {
51
        return ! empty( $this->tpl );
52
    }
53
54
    /**
55
     * @return bool
56
     */
57
    public function hasFileName ()
58
    {
59
        return ! empty( $this->fileName );
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getTpl ()
66
    {
67
        return $this->tpl;
68
    }
69
70
    /**
71
     * @param string $tpl
72
     */
73
    public function setTpl ( $tpl )
74
    {
75
        $this->tpl = $tpl;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getFileName ()
82
    {
83
        return $this->fileName;
84
    }
85
86
    /**
87
     * @param string $fileName
88
     */
89
    public function setFileName ( $fileName )
90
    {
91
        $this->fileName = $fileName;
92
    }
93
94
}