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.

DataSetCollection::getArrayCopy()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 2
b 0
f 0
nc 2
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
namespace Halfpastfour\PHPChartJS;
4
5
use Halfpastfour\Collection\Collection\ArrayAccess;
6
use JsonSerializable;
7
8
/**
9
 * Class DataSetCollection
10
 *
11
 * @package Halfpastfour\PHPChartJS
12
 */
13
class DataSetCollection extends ArrayAccess implements JsonSerializable
14
{
15
    /**
16
     * @return array
17
     */
18
    public function getArrayCopy()
19
    {
20
        $rows = [];
21
        foreach ($this->data as $row) {
22
            /** @var DataSet $row */
23
            $rows[] = $row->getArrayCopy();
24
        }
25
26
        return $rows;
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function jsonSerialize()
33
    {
34
        $rows = [];
35
        foreach ($this->data as $row) {
36
            /** @var DataSet $row */
37
            $rows[] = $row->jsonSerialize();
38
        }
39
40
        return $rows;
41
    }
42
}
43