Completed
Branch development (f30b60)
by Daryl
01:58
created

Map_Model::add_location()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Clubdeuce\WPLib\Components\GoogleMaps;
4
5
/**
6
 * Class Map_Model
7
 * @package Clubdeuce\WPLib\Components\GoogleMaps
8
 * @method  string center()
9
 * @method  Location[]  locations()
10
 */
11
class Map_Model extends \WPLib_Model_Base {
12
13
    /**
14
     * @var string
15
     */
16
    protected $_center;
17
18
    /**
19
     * @var Location[]
20
     */
21
    protected $_locations = array();
22
23
    /**
24
     * @param Location $location
25
     */
26
    function add_location( Location $location ) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
27
28
        $this->_locations[] = $location;
29
30
    }
31
32
}
33