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.
Passed
Push — master ( 3121b4...19602e )
by Steeven
02:46
created

DataSerialize::__construct()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 7
rs 10
cc 3
nc 3
nop 1
1
<?php
2
/**
3
 * This file is part of the O2System Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
12
// ------------------------------------------------------------------------
13
14
namespace O2System\Database\DataObjects\Result\Row\Columns;
15
16
// ------------------------------------------------------------------------
17
18
use O2System\Spl\DataStructures\SplArrayObject;
19
20
/**
21
 * Class DataSerialize
22
 *
23
 * @package O2System\DB\DataStructures\Row\Columns
24
 */
25
class DataSerialize extends SplArrayObject
26
{
27
    /**
28
     * DataSerialize::__construct
29
     *
30
     * SimpleSerializeField constructor.
31
     *
32
     * @param array $data
33
     */
34
    public function __construct($data = [])
35
    {
36
        parent::__construct([]);
37
38
        if ( ! empty($data)) {
39
            foreach ($data as $key => $value) {
40
                $this->__set($key, $value);
41
            }
42
        }
43
    }
44
45
    // ------------------------------------------------------------------------
46
47
    /**
48
     * DataSerialize::__set
49
     *
50
     * Magic Method __set
51
     *
52
     * @param $index
53
     *
54
     * @param $value
55
     */
56
    public function __set($index, $value)
57
    {
58
        $this->offsetSet($index, $value);
59
    }
60
61
    // ------------------------------------------------------------------------
62
63
    /**
64
     * DataSerialize::__toArray
65
     *
66
     * magic Method __toArray
67
     *
68
     * @return array
69
     */
70
    public function __toArray()
71
    {
72
        return $this->getArrayCopy();
73
    }
74
}