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

Path::parseItem()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
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
}