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::losLogMe()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 9
nc 3
nop 0
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