StepCollection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 9 2
1
<?php namespace Arcanedev\GeoLocation\Google\Directions\Entities;
2
3
use Illuminate\Support\Collection;
4
5
/**
6
 * Class     StepCollection
7
 *
8
 * @package  Arcanedev\GeoLocation\Google\Directions\Entities
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class StepCollection extends Collection
12
{
13
    /* -----------------------------------------------------------------
14
     |  Main Methods
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Load the steps data into the collection.
20
     *
21
     * @param  array  $steps
22
     *
23
     * @return self
24
     */
25 21
    public static function load(array $steps)
26
    {
27 21
        $collect = new static();
28
29 21
        foreach ($steps as $step) {
30 21
            $collect->push(new Step($step));
31
        }
32 21
        return $collect;
33
    }
34
}
35