@@ -18,58 +18,58 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | class Info_Window_Model extends Model_Base { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * @var \Clubdeuce\WPGoogleMaps\Info_Window |
|
| 23 | - */ |
|
| 24 | - protected $_info_window; |
|
| 21 | + /** |
|
| 22 | + * @var \Clubdeuce\WPGoogleMaps\Info_Window |
|
| 23 | + */ |
|
| 24 | + protected $_info_window; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Info_Window constructor. |
|
| 28 | - * |
|
| 29 | - * @param array $args |
|
| 30 | - */ |
|
| 31 | - function __construct( $args = array() ) { |
|
| 26 | + /** |
|
| 27 | + * Info_Window constructor. |
|
| 28 | + * |
|
| 29 | + * @param array $args |
|
| 30 | + */ |
|
| 31 | + function __construct( $args = array() ) { |
|
| 32 | 32 | |
| 33 | - $args = wp_parse_args( $args, array( |
|
| 34 | - 'info_window' => new \Clubdeuce\WPGoogleMaps\Info_Window( $args ), |
|
| 35 | - ) ); |
|
| 33 | + $args = wp_parse_args( $args, array( |
|
| 34 | + 'info_window' => new \Clubdeuce\WPGoogleMaps\Info_Window( $args ), |
|
| 35 | + ) ); |
|
| 36 | 36 | |
| 37 | - parent::__construct( $args ); |
|
| 37 | + parent::__construct( $args ); |
|
| 38 | 38 | |
| 39 | - } |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * @return bool |
|
| 43 | - */ |
|
| 44 | - function has_info_window() { |
|
| 41 | + /** |
|
| 42 | + * @return bool |
|
| 43 | + */ |
|
| 44 | + function has_info_window() { |
|
| 45 | 45 | |
| 46 | - return $this->_has( '_info_window' ); |
|
| 46 | + return $this->_has( '_info_window' ); |
|
| 47 | 47 | |
| 48 | - } |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @param string $method_name |
|
| 52 | - * @param array $args |
|
| 53 | - * |
|
| 54 | - * @return mixed|null |
|
| 55 | - */ |
|
| 56 | - function __call( $method_name, $args ) { |
|
| 50 | + /** |
|
| 51 | + * @param string $method_name |
|
| 52 | + * @param array $args |
|
| 53 | + * |
|
| 54 | + * @return mixed|null |
|
| 55 | + */ |
|
| 56 | + function __call( $method_name, $args ) { |
|
| 57 | 57 | |
| 58 | - do { |
|
| 59 | - $value = parent::__call( $method_name, $args ); |
|
| 58 | + do { |
|
| 59 | + $value = parent::__call( $method_name, $args ); |
|
| 60 | 60 | |
| 61 | - if ( $value ) { |
|
| 62 | - break; |
|
| 63 | - } |
|
| 61 | + if ( $value ) { |
|
| 62 | + break; |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - if ( $this->has_info_window() ) { |
|
| 66 | - $value = call_user_func_array( array( $this->info_window(), $method_name ), $args ); |
|
| 67 | - break; |
|
| 68 | - } |
|
| 69 | - } while ( false ); |
|
| 65 | + if ( $this->has_info_window() ) { |
|
| 66 | + $value = call_user_func_array( array( $this->info_window(), $method_name ), $args ); |
|
| 67 | + break; |
|
| 68 | + } |
|
| 69 | + } while ( false ); |
|
| 70 | 70 | |
| 71 | - return $value; |
|
| 71 | + return $value; |
|
| 72 | 72 | |
| 73 | - } |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | 75 | } |
@@ -8,41 +8,41 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class Model_Base extends \WPLib_Model_Base { |
| 10 | 10 | |
| 11 | - /** |
|
| 12 | - * @param $property |
|
| 13 | - * |
|
| 14 | - * @return bool |
|
| 15 | - */ |
|
| 16 | - protected function _has( $property ) { |
|
| 11 | + /** |
|
| 12 | + * @param $property |
|
| 13 | + * |
|
| 14 | + * @return bool |
|
| 15 | + */ |
|
| 16 | + protected function _has( $property ) { |
|
| 17 | 17 | |
| 18 | - $has = false; |
|
| 18 | + $has = false; |
|
| 19 | 19 | |
| 20 | - if ( isset( $this->{$property} ) ) { |
|
| 21 | - $has = true; |
|
| 22 | - } |
|
| 20 | + if ( isset( $this->{$property} ) ) { |
|
| 21 | + $has = true; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - return $has; |
|
| 24 | + return $has; |
|
| 25 | 25 | |
| 26 | - } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @param string $method_name |
|
| 30 | - * @param array $args |
|
| 31 | - * |
|
| 32 | - * @return null|mixed |
|
| 33 | - */ |
|
| 34 | - function __call( $method_name, $args ) { |
|
| 28 | + /** |
|
| 29 | + * @param string $method_name |
|
| 30 | + * @param array $args |
|
| 31 | + * |
|
| 32 | + * @return null|mixed |
|
| 33 | + */ |
|
| 34 | + function __call( $method_name, $args ) { |
|
| 35 | 35 | |
| 36 | - $value = null; |
|
| 36 | + $value = null; |
|
| 37 | 37 | |
| 38 | - if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 39 | - $property = "_{$method_name}"; |
|
| 40 | - $value = $this->{$property}; |
|
| 38 | + if ( property_exists( $this, "_{$method_name}" ) ) { |
|
| 39 | + $property = "_{$method_name}"; |
|
| 40 | + $value = $this->{$property}; |
|
| 41 | 41 | |
| 42 | - } |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - return $value; |
|
| 44 | + return $value; |
|
| 45 | 45 | |
| 46 | - } |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | 48 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | $view = new \Clubdeuce\WPGoogleMaps\Map_View( $this->model()->map() ); |
| 16 | 16 | |
| 17 | - $view->the_map(); |
|
| 17 | + $view->the_map(); |
|
| 18 | 18 | |
| 19 | 19 | } |
| 20 | 20 | |