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.

FirephpWrapper   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 56
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A write() 0 7 1
A howManyLogged() 0 4 1
A setFirephp() 0 4 1
A getFirephp() 0 4 1
1
<?php
2
/*
3
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
5
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
6
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
7
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
8
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
 */
10
11
namespace MpaFirephpWrapper\Service;
12
13
use FirePHP;
14
use MpaFirephpWrapper\Options\FirephpWrapperOptions;
15
16
class FirephpWrapper
17
{
18
    /** @var  FirePHP $firephp */
19
    protected $firephp;
20
    protected $howManyLogged;
21
22
    /**
23
     * @param FirephpWrapperOptions $options
24
     */
25 10
    public function __construct(FirephpWrapperOptions $options)
26
    {
27 10
        $this->setFirephp(new FirePHP());
28 10
        $this->firephp->setOptions($options->toArray());
29
30 10
        return $this;
0 ignored issues
show
Bug introduced by
Constructors do not have meaningful return values, anything that is returned from here is discarded. Are you sure this is correct?
Loading history...
31
    }
32
33
    /**
34
     * @param        $object
35
     * @param  string $type
36
     * @param  null   $label
37
     * @param  array  $options
38
     * @return self
39
     */
40 5
    public function write($object, $type = 'info', $label = null, $options = [])
41
    {
42 5
        $this->howManyLogged++;
43 5
        $this->firephp->$type($object, $label, $options);
44
45 5
        return $this;
46
    }
47
48
    /**
49
     * @return int
50
     */
51 3
    public function howManyLogged()
52
    {
53 3
        return $this->howManyLogged;
54
    }
55
56
    /**
57
     * @param \FirePHP $firephp
58
     */
59 10
    public function setFirephp($firephp)
60
    {
61 10
        $this->firephp = $firephp;
62 10
    }
63
64
    /**
65
     * @return \FirePHP
66
     */
67 2
    public function getFirephp()
68
    {
69 2
        return $this->firephp;
70
    }
71
}
72