Packages   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 14
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 8 2
1
<?php
2
namespace Samurai\Project;
3
4
/**
5
 * Class Packages
6
 * @package Samurai\Project
7
 * @author Raphaël Lefebvre <[email protected]>
8
 */
9
class Packages extends \ArrayObject
10
{
11
    /**
12
     * @return array
13
     */
14 6
    public function toArray()
15
    {
16 6
        $result = [];
17 6
        foreach($this as $package){
18 3
            $result[$package->getPsr()][$package->getNamespace()] = $package->getPathList();
19 6
        }
20 6
        return $result;
21
    }
22
}
23