@@ -20,19 +20,19 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | class Marker extends \WPLib_Item_Base { |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Marker_Model constructor. |
|
| 25 | - * |
|
| 26 | - * @param array $args |
|
| 27 | - */ |
|
| 28 | - function __construct( $args = array() ) { |
|
| 23 | + /** |
|
| 24 | + * Marker_Model constructor. |
|
| 25 | + * |
|
| 26 | + * @param array $args |
|
| 27 | + */ |
|
| 28 | + function __construct( $args = array() ) { |
|
| 29 | 29 | |
| 30 | - $args = wp_parse_args( $args, array( |
|
| 31 | - 'marker' => new \Clubdeuce\WPGoogleMaps\Marker( $args ), |
|
| 32 | - ) ); |
|
| 30 | + $args = wp_parse_args( $args, array( |
|
| 31 | + 'marker' => new \Clubdeuce\WPGoogleMaps\Marker( $args ), |
|
| 32 | + ) ); |
|
| 33 | 33 | |
| 34 | - parent::__construct( $args ); |
|
| 34 | + parent::__construct( $args ); |
|
| 35 | 35 | |
| 36 | - } |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | 38 | } |
@@ -8,17 +8,17 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class Geocoder extends \Clubdeuce\WPGoogleMaps\Geocoder { |
| 10 | 10 | |
| 11 | - /** |
|
| 12 | - * @param string $address |
|
| 13 | - * |
|
| 14 | - * @return \Clubdeuce\WPGoogleMaps\Location|Location|\WP_Error |
|
| 15 | - */ |
|
| 16 | - function geocode( $address ) { |
|
| 11 | + /** |
|
| 12 | + * @param string $address |
|
| 13 | + * |
|
| 14 | + * @return \Clubdeuce\WPGoogleMaps\Location|Location|\WP_Error |
|
| 15 | + */ |
|
| 16 | + function geocode( $address ) { |
|
| 17 | 17 | |
| 18 | - $location = parent::geocode( $address ); |
|
| 18 | + $location = parent::geocode( $address ); |
|
| 19 | 19 | |
| 20 | - return new Location( array( 'location' => $location ) ); |
|
| 20 | + return new Location( array( 'location' => $location ) ); |
|
| 21 | 21 | |
| 22 | - } |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | 24 | } |
@@ -22,19 +22,19 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | class Map extends \WPLib_Item_Base { |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Map_Model constructor. |
|
| 27 | - * |
|
| 28 | - * @param array $args |
|
| 29 | - */ |
|
| 30 | - function __construct( $args = array() ) { |
|
| 25 | + /** |
|
| 26 | + * Map_Model constructor. |
|
| 27 | + * |
|
| 28 | + * @param array $args |
|
| 29 | + */ |
|
| 30 | + function __construct( $args = array() ) { |
|
| 31 | 31 | |
| 32 | - $args = wp_parse_args( $args, array( |
|
| 33 | - 'map' => new \Clubdeuce\WPGoogleMaps\Map( $args ), |
|
| 34 | - ) ); |
|
| 32 | + $args = wp_parse_args( $args, array( |
|
| 33 | + 'map' => new \Clubdeuce\WPGoogleMaps\Map( $args ), |
|
| 34 | + ) ); |
|
| 35 | 35 | |
| 36 | - parent::__construct( $args ); |
|
| 36 | + parent::__construct( $args ); |
|
| 37 | 37 | |
| 38 | - } |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | 40 | } |
| 41 | 41 | \ No newline at end of file |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | $view = new \Clubdeuce\WPGoogleMaps\Map_View( $this->model() ); |
| 16 | 16 | |
| 17 | - $view->the_map(); |
|
| 17 | + $view->the_map(); |
|
| 18 | 18 | |
| 19 | 19 | } |
| 20 | 20 | |
@@ -9,42 +9,42 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | class Model_Base extends \WPLib_Model_Base { |
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * @param $property |
|
| 14 | - * |
|
| 15 | - * @return bool |
|
| 16 | - */ |
|
| 17 | - protected function _has( $property ) { |
|
| 12 | + /** |
|
| 13 | + * @param $property |
|
| 14 | + * |
|
| 15 | + * @return bool |
|
| 16 | + */ |
|
| 17 | + protected function _has( $property ) { |
|
| 18 | 18 | |
| 19 | - $has = false; |
|
| 19 | + $has = false; |
|
| 20 | 20 | |
| 21 | - if ( isset( $this->{$property} ) ) { |
|
| 22 | - $has = true; |
|
| 23 | - } |
|
| 21 | + if ( isset( $this->{$property} ) ) { |
|
| 22 | + $has = true; |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - return $has; |
|
| 25 | + return $has; |
|
| 26 | 26 | |
| 27 | - } |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * @param string $method_name |
|
| 31 | - * @param array $args |
|
| 32 | - * |
|
| 33 | - * @return null |
|
| 34 | - */ |
|
| 35 | - function __call( $method_name, $args ) { |
|
| 29 | + /** |
|
| 30 | + * @param string $method_name |
|
| 31 | + * @param array $args |
|
| 32 | + * |
|
| 33 | + * @return null |
|
| 34 | + */ |
|
| 35 | + function __call( $method_name, $args ) { |
|
| 36 | 36 | |
| 37 | - $value = null; |
|
| 37 | + $value = null; |
|
| 38 | 38 | |
| 39 | - if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 40 | - $property = "_{$method_name}"; |
|
| 41 | - $value = $this->{$property}; |
|
| 39 | + if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 40 | + $property = "_{$method_name}"; |
|
| 41 | + $value = $this->{$property}; |
|
| 42 | 42 | |
| 43 | - } |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - return $value; |
|
| 45 | + return $value; |
|
| 46 | 46 | |
| 47 | - } |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | } |
| 50 | 50 | endif; |
| 51 | 51 | \ No newline at end of file |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace Clubdeuce\WPLib\Components\GoogleMaps; |
| 4 | 4 | |
| 5 | -if ( ! class_exists( 'Clubdeuce\WPLib\Components\GoogleMaps\Model_Base' ) ): |
|
| 5 | +if ( !class_exists( 'Clubdeuce\WPLib\Components\GoogleMaps\Model_Base' ) ): |
|
| 6 | 6 | /** |
| 7 | 7 | * Class Model_Base |
| 8 | 8 | * @package Clubdeuce\WPLib\Components\GoogleMaps |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $has = false; |
| 20 | 20 | |
| 21 | - if ( isset( $this->{$property} ) ) { |
|
| 21 | + if ( isset($this->{$property} ) ) { |
|
| 22 | 22 | $has = true; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -9,36 +9,36 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | class Map_Model extends Model_Base { |
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * @var Map |
|
| 14 | - */ |
|
| 15 | - protected $_map; |
|
| 12 | + /** |
|
| 13 | + * @var Map |
|
| 14 | + */ |
|
| 15 | + protected $_map; |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * @param string $method_name |
|
| 19 | - * @return mixed |
|
| 20 | - */ |
|
| 21 | - function __call( $method_name, $args ) { |
|
| 22 | - $value = null; |
|
| 17 | + /** |
|
| 18 | + * @param string $method_name |
|
| 19 | + * @return mixed |
|
| 20 | + */ |
|
| 21 | + function __call( $method_name, $args ) { |
|
| 22 | + $value = null; |
|
| 23 | 23 | |
| 24 | - do { |
|
| 24 | + do { |
|
| 25 | 25 | |
| 26 | - if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 27 | - $property = "_{$method_name}"; |
|
| 28 | - $value = $this->{$property}; |
|
| 29 | - break; |
|
| 30 | - } |
|
| 26 | + if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 27 | + $property = "_{$method_name}"; |
|
| 28 | + $value = $this->{$property}; |
|
| 29 | + break; |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - if ( ! isset( $this->_map ) ) { |
|
| 33 | - break; |
|
| 34 | - } |
|
| 32 | + if ( ! isset( $this->_map ) ) { |
|
| 33 | + break; |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - $value = call_user_func_array( array( $this->_map, $method_name ), $args ); |
|
| 36 | + $value = call_user_func_array( array( $this->_map, $method_name ), $args ); |
|
| 37 | 37 | |
| 38 | - } while ( false ); |
|
| 38 | + } while ( false ); |
|
| 39 | 39 | |
| 40 | - return $value; |
|
| 41 | - } |
|
| 40 | + return $value; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | // /** |
| 44 | 44 | // * @var array |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | break; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if ( ! isset( $this->_map ) ) { |
|
| 32 | + if ( !isset($this->_map) ) { |
|
| 33 | 33 | break; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -11,72 +11,72 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class Marker_Model extends Model_Base { |
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * @var \Clubdeuce\WPGoogleMaps\Marker |
|
| 16 | - */ |
|
| 14 | + /** |
|
| 15 | + * @var \Clubdeuce\WPGoogleMaps\Marker |
|
| 16 | + */ |
|
| 17 | 17 | protected $_marker; |
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * @return bool |
|
| 21 | - */ |
|
| 22 | - function has_marker() { |
|
| 19 | + /** |
|
| 20 | + * @return bool |
|
| 21 | + */ |
|
| 22 | + function has_marker() { |
|
| 23 | 23 | |
| 24 | - return $this->_has( '_marker' ); |
|
| 24 | + return $this->_has( '_marker' ); |
|
| 25 | 25 | |
| 26 | - } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @return Location |
|
| 30 | - */ |
|
| 31 | - function location() { |
|
| 28 | + /** |
|
| 29 | + * @return Location |
|
| 30 | + */ |
|
| 31 | + function location() { |
|
| 32 | 32 | |
| 33 | - return new Location( array( 'location' => $this->marker()->location() ) ); |
|
| 33 | + return new Location( array( 'location' => $this->marker()->location() ) ); |
|
| 34 | 34 | |
| 35 | - } |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * @return Marker_Label |
|
| 39 | - */ |
|
| 40 | - function label() { |
|
| 37 | + /** |
|
| 38 | + * @return Marker_Label |
|
| 39 | + */ |
|
| 40 | + function label() { |
|
| 41 | 41 | |
| 42 | - return new Marker_Label( array( 'label' => $this->marker()->label() ) ); |
|
| 42 | + return new Marker_Label( array( 'label' => $this->marker()->label() ) ); |
|
| 43 | 43 | |
| 44 | - } |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * @return Info_Window |
|
| 48 | - */ |
|
| 49 | - function info_window() { |
|
| 46 | + /** |
|
| 47 | + * @return Info_Window |
|
| 48 | + */ |
|
| 49 | + function info_window() { |
|
| 50 | 50 | |
| 51 | - return new Info_Window( array( 'info_window' => $this->marker()->info_window() ) ); |
|
| 51 | + return new Info_Window( array( 'info_window' => $this->marker()->info_window() ) ); |
|
| 52 | 52 | |
| 53 | - } |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * @param string $method_name |
|
| 57 | - * @param array $args |
|
| 58 | - * |
|
| 59 | - * @return mixed|null |
|
| 60 | - */ |
|
| 61 | - function __call( $method_name, $args ) { |
|
| 55 | + /** |
|
| 56 | + * @param string $method_name |
|
| 57 | + * @param array $args |
|
| 58 | + * |
|
| 59 | + * @return mixed|null |
|
| 60 | + */ |
|
| 61 | + function __call( $method_name, $args ) { |
|
| 62 | 62 | |
| 63 | - $value = null; |
|
| 63 | + $value = null; |
|
| 64 | 64 | |
| 65 | - do { |
|
| 66 | - $value = parent::__call( $method_name, $args ); |
|
| 65 | + do { |
|
| 66 | + $value = parent::__call( $method_name, $args ); |
|
| 67 | 67 | |
| 68 | - if ( $value ) { |
|
| 69 | - break; |
|
| 70 | - } |
|
| 68 | + if ( $value ) { |
|
| 69 | + break; |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - if ( $this->has_marker() ) { |
|
| 73 | - $value = call_user_func_array( array( $this->marker(), $method_name ), $args ); |
|
| 74 | - break; |
|
| 75 | - } |
|
| 76 | - } while ( false ); |
|
| 72 | + if ( $this->has_marker() ) { |
|
| 73 | + $value = call_user_func_array( array( $this->marker(), $method_name ), $args ); |
|
| 74 | + break; |
|
| 75 | + } |
|
| 76 | + } while ( false ); |
|
| 77 | 77 | |
| 78 | - return $value; |
|
| 78 | + return $value; |
|
| 79 | 79 | |
| 80 | - } |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | 82 | } |
@@ -8,44 +8,44 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class Marker_Label_Model extends Model_Base { |
| 10 | 10 | |
| 11 | - /** |
|
| 12 | - * @var \Clubdeuce\WPGoogleMaps\Marker_Label |
|
| 13 | - */ |
|
| 14 | - protected $_label; |
|
| 11 | + /** |
|
| 12 | + * @var \Clubdeuce\WPGoogleMaps\Marker_Label |
|
| 13 | + */ |
|
| 14 | + protected $_label; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * @return bool |
|
| 18 | - */ |
|
| 19 | - function has_label() { |
|
| 16 | + /** |
|
| 17 | + * @return bool |
|
| 18 | + */ |
|
| 19 | + function has_label() { |
|
| 20 | 20 | |
| 21 | - return $this->_has( '_label' ); |
|
| 21 | + return $this->_has( '_label' ); |
|
| 22 | 22 | |
| 23 | - } |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * @param string $method_name |
|
| 27 | - * @return mixed |
|
| 28 | - */ |
|
| 29 | - function __call( $method_name, $args ) { |
|
| 30 | - $value = null; |
|
| 25 | + /** |
|
| 26 | + * @param string $method_name |
|
| 27 | + * @return mixed |
|
| 28 | + */ |
|
| 29 | + function __call( $method_name, $args ) { |
|
| 30 | + $value = null; |
|
| 31 | 31 | |
| 32 | - do { |
|
| 32 | + do { |
|
| 33 | 33 | |
| 34 | - if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 35 | - $property = "_{$method_name}"; |
|
| 36 | - $value = $this->{$property}; |
|
| 37 | - break; |
|
| 38 | - } |
|
| 34 | + if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 35 | + $property = "_{$method_name}"; |
|
| 36 | + $value = $this->{$property}; |
|
| 37 | + break; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - if ( ! isset( $this->_label ) ) { |
|
| 41 | - break; |
|
| 42 | - } |
|
| 40 | + if ( ! isset( $this->_label ) ) { |
|
| 41 | + break; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - $value = call_user_func_array( array( $this->_label, $method_name ), $args ); |
|
| 44 | + $value = call_user_func_array( array( $this->_label, $method_name ), $args ); |
|
| 45 | 45 | |
| 46 | - } while ( false ); |
|
| 46 | + } while ( false ); |
|
| 47 | 47 | |
| 48 | - return $value; |
|
| 49 | - } |
|
| 48 | + return $value; |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | 51 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | break; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - if ( ! isset( $this->_label ) ) { |
|
| 40 | + if ( !isset($this->_label) ) { |
|
| 41 | 41 | break; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -24,14 +24,14 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | class Location extends \WPLib_Item_Base { |
| 26 | 26 | |
| 27 | - function __construct( $args = array() ) { |
|
| 27 | + function __construct( $args = array() ) { |
|
| 28 | 28 | |
| 29 | - $args = wp_parse_args( $args, array( |
|
| 30 | - 'location' => new \Clubdeuce\WPGoogleMaps\Location( $args ), |
|
| 31 | - ) ); |
|
| 29 | + $args = wp_parse_args( $args, array( |
|
| 30 | + 'location' => new \Clubdeuce\WPGoogleMaps\Location( $args ), |
|
| 31 | + ) ); |
|
| 32 | 32 | |
| 33 | - parent::__construct( $args ); |
|
| 33 | + parent::__construct( $args ); |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | - } |
|
| 36 | + } |
|
| 37 | 37 | } |
| 38 | 38 | \ No newline at end of file |