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   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 28
rs 10
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getArrayCopy() 0 9 2
A jsonSerialize() 0 9 2
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