Path::parseItem()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 2
nc 2
nop 1
crap 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
	/**
25
	 * @param $item
26
	 *
27
	 * @return Location
28
	 */
29 1
	protected function parseItem($item)
30
	{
31
32 1
		return ($item instanceof Location) ? $item : new Location($item);
33
	}
34
}