Passed
Push — master ( 48a16c...0e515b )
by Roberto
02:38
created

Path   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 2
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A parseItem() 0 3 2
1
<?php
2
/**
3
 * Copyright (c) 2018 - present
4
 * Google Maps PHP - Path.php
5
 * author: Roberto Belotti - [email protected]
6
 * web : robertobelotti.com, github.com/biscolab
7
 * Initial version created on: 15/10/2018
8
 * MIT license: https://github.com/biscolab/google-maps-php/blob/master/LICENSE
9
 */
10
11
namespace Biscolab\GoogleMaps\Object;
12
13
use Biscolab\GoogleMaps\Abstracts\AbstractCollection;
14
15
/**
16
 * Class Path
17
 * @package Biscolab\GoogleMaps\Object
18
 *
19
 * @see https://developers.google.com/maps/documentation/geocoding/intro#Types
20
 */
21
class Path extends AbstractCollection {
22
23
	/**
24
	 * @param $item
25
	 *
26
	 * @return Location
27
	 */
28
	protected function parseItem($item) {
29
30
		return ($item instanceof Location) ? $item : new Location($item);
31
	}
32
}