Completed
Push — master ( ceb9a8...527314 )
by ARCANEDEV
14s
created

ElevationCollection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
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 25
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

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