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

Location   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 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