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 ( 86dce3...98cf71 )
by Nur
02:40
created

Result::setInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the O2System PHP 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\Reactor\Models\Sql\DataObjects;
15
16
// ------------------------------------------------------------------------
17
18
use O2System\Database\DataObjects\Result\Info;
19
use O2System\Reactor\Models\Sql\Model;
20
use O2System\Spl\Iterators\ArrayIterator;
21
22
/**
23
 * Class Result
24
 *
25
 * @package O2System\Database\Datastructures
26
 */
27
class Result extends ArrayIterator
28
{
29
    /**
30
     * Result::$info
31
     *
32
     * @var Info
33
     */
34
    protected $info;
35
36
    /**
37
     * Result::__construct
38
     *
39
     * @param array $rows
40
     */
41
    public function __construct(\O2System\Database\DataObjects\Result $result, Model &$model)
42
    {
43
        if ($result->count() > 0) {
44
            $ormResult = new \SplFixedArray($result->count());
45
46
            foreach ($result as $key => $row) {
47
                $ormResult[ $key ] = new Result\Row($row, $model);
48
            }
49
50
            parent::__construct($ormResult->toArray());
51
52
            unset($ormResult);
53
        }
54
    }
55
56
    // ------------------------------------------------------------------------
57
58
    public function getInfo()
59
    {
60
        return $this->info;
61
    }
62
63
    public function setInfo(Info $info)
64
    {
65
        $this->info = $info;
66
67
        return $this;
68
    }
69
}