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.

Loggable   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A losLogMe() 0 14 3
1
<?php
2
3
/**
4
 * Trait for loggable objects.
5
 *
6
 * @author    Leandro Silva <[email protected]>
7
 *
8
 * @link      http://leandrosilva.info Development Blog
9
 * @link      http://github.com/LansoWeb/LosLog for the canonical source repository
10
 *
11
 * @copyright Copyright (c) 2011-2013 Leandro Silva (http://leandrosilva.info)
12
 * @license   http://leandrosilva.info/licenca-bsd New BSD license
13
 */
14
namespace LosMiddleware\LosLog;
15
16
/**
17
 * Trait for loggable objects.
18
 *
19
 * @author    Leandro Silva <[email protected]>
20
 *
21
 * @link      http://leandrosilva.info Development Blog
22
 * @link      http://github.com/LansoWeb/LosLog for the canonical source repository
23
 *
24
 * @copyright Copyright (c) 2011-2013 Leandro Silva (http://leandrosilva.info)
25
 * @license   http://leandrosilva.info/licenca-bsd New BSD license
26
 */
27
trait Loggable
28
{
29
    /**
30
     * Function to collect properties values.
31
     *
32
     * @return array Array with the properties and values from the object
33
     */
34
    public function losLogMe()
35
    {
36
        $ret = [];
37
        $ret[get_class($this)] = [];
38
        foreach (get_object_vars($this) as $name => $content) {
39
            if (! is_object($content)) {
40
                $ret[$name] = ['type' => gettype($content), 'content' => $content];
41
            } else {
42
                $ret[$name] = ['type' => gettype($content), 'class' => get_class($content)];
43
            }
44
        }
45
46
        return $ret;
47
    }
48
}
49