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

Marker::__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 Marker
7
 * @package Clubdeuce\WPLib\Components\GoogleMaps
8
 *
9
 * @property Marker_Model $model
10
 * @property Marker_View  $view
11
 * @mixin    Marker_Model
12
 * @mixin    Marker_View
13
 * @method   Marker_Label label()
14
 * @method   float        latitude()
15
 * @method   float        longitude()
16
 * @method   string       title()
17
 * @method   Info_Window  info_window()
18
 * @method   array        marker_args()
19
 * @method   Location     location()
20
 */
21
class Marker extends \WPLib_Item_Base {
22
23
	/**
24
	 * Marker_Model constructor.
25
	 *
26
	 * @param array $args
27
	 */
28 1
	function __construct( $args = array() ) {
29
30 1
		$args = wp_parse_args( $args, array(
31 1
			'model' => new Marker_Model( array( 'marker' => new \Clubdeuce\WPGoogleMaps\Marker( $args ) ) ),
32
		) );
33
34 1
		parent::__construct( $args );
35
36 1
	}
37
38
39
}
40