Authors::toArray()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 9.4285
cc 2
eloc 5
nc 2
nop 0
crap 2
1
<?php
2
namespace Samurai\Project;
3
4
/**
5
 * Class Authors
6
 * @package Samurai\Project
7
 * @author Raphaël Lefebvre <[email protected]>
8
 */
9
class Authors extends \ArrayObject
10
{
11
    /**
12
     * @return array
13
     */
14 6
    public function toArray()
15
    {
16 6
        $result = [];
17 6
        foreach($this as $author){
18 4
            $result[] = $author->toArray();
19 6
        }
20 6
        return $result;
21
    }
22
}
23