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

Map::__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 Map
7
 * @package Clubdeuce\WPLib\Components\GoogleMaps
8
 *
9
 * @property Map_Model $model
10
 * @property Map_View  $view
11
 * @mixin    Map_Model
12
 * @mixin    Map_View
13
 * @method   void     add_marker( $marker )
14
 * @method   void     add_markers( $markers )
15
 * @method   array    center()
16
 * @method   string   height()
17
 * @method   string   html_id()
18
 * @method   Marker[] markers()
19
 * @method   string   width()
20
 * @method   int      zoom()
21
 * @method   array    make_args()
22
 */
23
class Map extends \WPLib_Item_Base {
24
25
	/**
26
	 * Map_Model constructor.
27
	 *
28
	 * @param array $args
29
	 */
30 4
	function __construct( $args = array() ) {
31
32 4
		$args = wp_parse_args( $args, array(
33 4
			'model' => new Map_Model( array( 'map' => new \Clubdeuce\WPGoogleMaps\Map( $args ) ) ),
34
		) );
35
36 4
		parent::__construct( $args );
37
38 4
	}
39
40
}