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.
Completed
Push — 3.0 ( b15efc...3ba842 )
by Vermeulen
02:00
created

ControllerRouterLink::getTarget()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace BFW;
4
5
/**
6
 * Linker between controller and router module.
7
 */
8
class ControllerRouterLink
9
{
10
    /**
11
     * @var \BFW\ControllerRouterLink $instance Current instance (Singleton)
12
     */
13
    protected static $instance;
14
15
    /**
16
     * @var string $target : The target to call by controller
17
     */
18
    protected $target = '';
19
    
20
    /**
21
     * @var mixed $datas : Some datas send by router module to controller
22
     */
23
    protected $datas;
24
    
25
    /**
26
     * Constructor
27
     * Singleton pattern
28
     */
29
    protected function __construct()
30
    {
31
        //Nothing todo
32
    }
33
    
34
    /**
35
     * Contructor for singleton pattern
36
     * Get the instance of this class
37
     * 
38
     * @return \BFW\ControllerRouterLink
39
     */
40 View Code Duplication
    public static function getInstance()
1 ignored issue
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
41
    {
42
        if (self::$instance === null) {
43
            $calledClass = get_called_class(); //Autorize extends this class
44
            
45
            self::$instance = new $calledClass();
46
        }
47
48
        return self::$instance;
49
    }
50
    
51
    /**
52
     * Getter for property target
53
     * 
54
     * @return string
55
     */
56
    public function getTarget()
57
    {
58
        return $this->target;
59
    }
60
    
61
    /**
62
     * Setter for property target
63
     * 
64
     * @param type $target
65
     * 
66
     * @return \BFW\ControllerRouterLink
67
     */
68
    public function setTarget($target)
69
    {
70
        $this->target = (string) $target;
71
        return $this;
72
    }
73
    
74
    /**
75
     * Getter for property datas
76
     * 
77
     * @return mixed
78
     */
79
    public function getDatas()
80
    {
81
        return $this->datas;
82
    }
83
    
84
    /**
85
     * Setter for property datas
86
     * 
87
     * @param mixed $datas
88
     * 
89
     * @return \BFW\ControllerRouterLink
90
     */
91
    public function setDatas($datas)
92
    {
93
        $this->datas = $datas;
94
        return $this;
95
    }
96
}
97