Completed
Pull Request — master (#22)
by Daryl
01:32
created

Location::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.6666
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Clubdeuce\WPLib\Components\GoogleMaps;
4
5
/**
6
 * Class Location
7
 * @package Clubdeuce\WPLib\Components\GoogleMaps
8
 *
9
 * @property Location_Model $model
10
 * @property Location_View  $view
11
 * @mixin    Location_Model
12
 * @mixin    Location_View
13
 *
14
 * @method  string address()
15
 * @method  string formatted_address()
16
 * @method  string state()
17
 * @method  string zip_code()
18
 * @method  float  latitude()
19
 * @method  string location_type()
20
 * @method  float  longitude()
21
 * @method  string place_id()
22
 * @method  array  type()
23
 * @method  array  viewport()
24
 */
25
class Location extends \WPLib_Item_Base {
26
27
	/**
28
	 * Location constructor.
29
	 *
30
	 * @param array $args
31
	 */
32 1
	function __construct( $args = array() ) {
33
34 1
		$args = wp_parse_args( $args, array(
35 1
			'model' => new Location_Model( array( 'location' => new \Clubdeuce\WPGoogleMaps\Location( $args ) ) ),
36
		) );
37
38 1
		parent::__construct( $args );
39
40 1
	}
41
42
}
43