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   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 83
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 12
c 2
b 1
f 0
lcom 1
cbo 0
dl 0
loc 83
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 1 1
A getInstance() 0 15 3
A hasData() 0 4 2
A hasTpl() 0 4 1
A hasFileName() 0 4 1
A getTpl() 0 4 1
A setTpl() 0 4 1
A getFileName() 0 4 1
A setFileName() 0 4 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
}