Completed
Pull Request — master (#22)
by Daryl
01:32
created
includes/class-location-model.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 			    break;
64 64
 		    }
65 65
 
66
-		    if ( ! isset( $this->_location ) ) {
66
+		    if ( !isset($this->_location) ) {
67 67
 		    	break;
68 68
 		    }
69 69
 
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -24,31 +24,31 @@  discard block
 block discarded – undo
24 24
      */
25 25
     protected $_location;
26 26
 
27
-	/**
28
-	 * Location_Model constructor.
29
-	 *
30
-	 * @param array $args
31
-	 */
32
-	function __construct( $args = array() ) {
27
+    /**
28
+     * Location_Model constructor.
29
+     *
30
+     * @param array $args
31
+     */
32
+    function __construct( $args = array() ) {
33 33
 
34
-		$location = new Location( $args );
34
+        $location = new Location( $args );
35 35
 
36
-		$args = wp_parse_args( $args, array(
37
-			'location' => $location,
38
-		) );
36
+        $args = wp_parse_args( $args, array(
37
+            'location' => $location,
38
+        ) );
39 39
 
40
-		parent::__construct( $args );
40
+        parent::__construct( $args );
41 41
 
42
-	}
42
+    }
43 43
 
44
-	/**
45
-	 * @return bool
46
-	 */
47
-	function has_location() {
44
+    /**
45
+     * @return bool
46
+     */
47
+    function has_location() {
48 48
 
49
-		return $this->_has( '_location' );
49
+        return $this->_has( '_location' );
50 50
 
51
-	}
51
+    }
52 52
 
53 53
     /**
54 54
      * @param  string $method_name
@@ -57,21 +57,21 @@  discard block
 block discarded – undo
57 57
     public function __call( $method_name, $args ) {
58 58
         $value = null;
59 59
 
60
-	    do {
60
+        do {
61 61
 
62
-		    if ( property_exists( $this, "_{$method_name}" ) ) {
63
-			    $property = "_{$method_name}";
64
-			    $value = $this->{$property};
65
-			    break;
66
-		    }
62
+            if ( property_exists( $this, "_{$method_name}" ) ) {
63
+                $property = "_{$method_name}";
64
+                $value = $this->{$property};
65
+                break;
66
+            }
67 67
 
68
-		    if ( ! isset( $this->_location ) ) {
69
-		    	break;
70
-		    }
68
+            if ( ! isset( $this->_location ) ) {
69
+                break;
70
+            }
71 71
 
72
-		    $value = call_user_func_array( array( $this->_location, $method_name ), $args );
72
+            $value = call_user_func_array( array( $this->_location, $method_name ), $args );
73 73
 
74
-	    } while ( false );
74
+        } while ( false );
75 75
 
76 76
         return $value;
77 77
     }
Please login to merge, or discard this patch.
includes/class-geocoder.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
includes/class-map-view.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/class-model-base.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -9,42 +9,42 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/class-marker-model.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -11,72 +11,72 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
includes/class-marker-label-model.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 				break;
38 38
 			}
39 39
 
40
-			if ( ! isset( $this->_label ) ) {
40
+			if ( !isset($this->_label) ) {
41 41
 				break;
42 42
 			}
43 43
 
Please login to merge, or discard this patch.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -11,46 +11,46 @@
 block discarded – undo
11 11
  */
12 12
 class Marker_Label_Model extends Model_Base {
13 13
 
14
-	/**
15
-	 * @var \Clubdeuce\WPGoogleMaps\Marker_Label
16
-	 */
17
-	protected $_label;
14
+    /**
15
+     * @var \Clubdeuce\WPGoogleMaps\Marker_Label
16
+     */
17
+    protected $_label;
18 18
 
19
-	/**
20
-	 * @return bool
21
-	 */
22
-	function has_label() {
19
+    /**
20
+     * @return bool
21
+     */
22
+    function has_label() {
23 23
 
24
-		return $this->_has( '_label' );
24
+        return $this->_has( '_label' );
25 25
 
26
-	}
26
+    }
27 27
 
28
-	/**
29
-	 * @param  string $method_name
30
-	 * @param  array  $args
31
-	 *
32
-	 * @return mixed
33
-	 */
34
-	function __call( $method_name, $args = array() ) {
35
-		$value = null;
28
+    /**
29
+     * @param  string $method_name
30
+     * @param  array  $args
31
+     *
32
+     * @return mixed
33
+     */
34
+    function __call( $method_name, $args = array() ) {
35
+        $value = null;
36 36
 
37
-		do {
37
+        do {
38 38
 
39
-			if ( property_exists( $this, "_{$method_name}" ) ) {
40
-				$property = "_{$method_name}";
41
-				$value = $this->{$property};
42
-				break;
43
-			}
39
+            if ( property_exists( $this, "_{$method_name}" ) ) {
40
+                $property = "_{$method_name}";
41
+                $value = $this->{$property};
42
+                break;
43
+            }
44 44
 
45
-			if ( ! isset( $this->_label ) ) {
46
-				break;
47
-			}
45
+            if ( ! isset( $this->_label ) ) {
46
+                break;
47
+            }
48 48
 
49
-			$value = call_user_func_array( array( $this->_label, $method_name ), $args );
49
+            $value = call_user_func_array( array( $this->_label, $method_name ), $args );
50 50
 
51
-		} while ( false );
51
+        } while ( false );
52 52
 
53
-		return $value;
54
-	}
53
+        return $value;
54
+    }
55 55
 
56 56
 }
Please login to merge, or discard this patch.
includes/class-info-window-model.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -14,60 +14,60 @@
 block discarded – undo
14 14
  */
15 15
 class Info_Window_Model extends Model_Base {
16 16
 
17
-	/**
18
-	 * @var \Clubdeuce\WPGoogleMaps\Info_Window
19
-	 */
20
-	protected $_info_window;
17
+    /**
18
+     * @var \Clubdeuce\WPGoogleMaps\Info_Window
19
+     */
20
+    protected $_info_window;
21 21
 
22
-	/**
23
-	 * Info_Window constructor.
24
-	 *
25
-	 * @param array $args
26
-	 */
27
-	function __construct( $args = array() ) {
22
+    /**
23
+     * Info_Window constructor.
24
+     *
25
+     * @param array $args
26
+     */
27
+    function __construct( $args = array() ) {
28 28
 
29
-		$args = wp_parse_args( $args, array(
30
-			'info_window' => new \Clubdeuce\WPGoogleMaps\Info_Window( $args ),
31
-		) );
29
+        $args = wp_parse_args( $args, array(
30
+            'info_window' => new \Clubdeuce\WPGoogleMaps\Info_Window( $args ),
31
+        ) );
32 32
 
33
-		parent::__construct( $args );
33
+        parent::__construct( $args );
34 34
 
35
-	}
35
+    }
36 36
 
37
-	/**
38
-	 * @return bool
39
-	 */
40
-	function has_info_window() {
37
+    /**
38
+     * @return bool
39
+     */
40
+    function has_info_window() {
41 41
 
42
-		return $this->_has( '_info_window' );
42
+        return $this->_has( '_info_window' );
43 43
 
44
-	}
44
+    }
45 45
 
46
-	/**
47
-	 * @param string $method_name
48
-	 * @param array $args
49
-	 *
50
-	 * @return mixed|null
51
-	 */
52
-	function __call( $method_name, $args ) {
46
+    /**
47
+     * @param string $method_name
48
+     * @param array $args
49
+     *
50
+     * @return mixed|null
51
+     */
52
+    function __call( $method_name, $args ) {
53 53
 
54
-		$value = null;
54
+        $value = null;
55 55
 
56
-		do {
57
-			$value = parent::__call( $method_name, $args );
56
+        do {
57
+            $value = parent::__call( $method_name, $args );
58 58
 
59
-			if ( $value ) {
60
-				break;
61
-			}
59
+            if ( $value ) {
60
+                break;
61
+            }
62 62
 
63
-			if ( $this->has_info_window() ) {
64
-				$value = call_user_func_array( array( $this->info_window(), $method_name ), $args );
65
-				break;
66
-			}
67
-		} while ( false );
63
+            if ( $this->has_info_window() ) {
64
+                $value = call_user_func_array( array( $this->info_window(), $method_name ), $args );
65
+                break;
66
+            }
67
+        } while ( false );
68 68
 
69
-		return $value;
69
+        return $value;
70 70
 
71
-	}
71
+    }
72 72
 
73 73
 }
Please login to merge, or discard this patch.
component-google-maps.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
 
15 15
     const INSTANCE_CLASS = 'Clubdeuce\WPLib\Components\GoogleMaps\Map';
16 16
 
17
-	/**
18
-	 * @var string
19
-	 */
20
-	protected static $_version = '0.1.6';
21
-
22
-	/**
23
-	 *
24
-	 */
17
+    /**
18
+     * @var string
19
+     */
20
+    protected static $_version = '0.1.6';
21
+
22
+    /**
23
+     *
24
+     */
25 25
     static function on_load() {
26 26
 
27
-	    require_once 'vendor/autoload.php';
27
+        require_once 'vendor/autoload.php';
28 28
         self::register_helper( '\Clubdeuce\WPGoogleMaps\Google_Maps', __CLASS__ );
29
-	    \Clubdeuce\WPGoogleMaps\Google_Maps::initialize();
29
+        \Clubdeuce\WPGoogleMaps\Google_Maps::initialize();
30 30
 
31 31
     }
32 32
 
@@ -41,32 +41,32 @@  discard block
 block discarded – undo
41 41
 
42 42
     }
43 43
 
44
-	/**
45
-	 * @param $address
46
-	 * @param array $args
47
-	 *
48
-	 * @return Marker
49
-	 */
44
+    /**
45
+     * @param $address
46
+     * @param array $args
47
+     *
48
+     * @return Marker
49
+     */
50 50
     static function make_marker_by_address( $address, $args = array() ) {
51 51
 
52
-    	$marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_address( $address, $args );
53
-    	return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
52
+        $marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_address( $address, $args );
53
+        return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
54 54
 
55 55
     }
56 56
 
57
-	/**
58
-	 * @param float  $lat
59
-	 * @param float  $lng
60
-	 * @param array  $args
61
-	 *
62
-	 * @return Marker
63
-	 */
64
-	static function make_marker_by_position( $lat, $lng, $args = array() ) {
57
+    /**
58
+     * @param float  $lat
59
+     * @param float  $lng
60
+     * @param array  $args
61
+     *
62
+     * @return Marker
63
+     */
64
+    static function make_marker_by_position( $lat, $lng, $args = array() ) {
65 65
 
66
-		$marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_position( $lat, $lng, $args );
67
-		return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
66
+        $marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_position( $lat, $lng, $args );
67
+        return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
68 68
 
69
-	}
69
+    }
70 70
 }
71 71
 
72 72
 Google_Maps::on_load();
Please login to merge, or discard this patch.
includes/class-marker-label.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,19 +19,19 @@
 block discarded – undo
19 19
  */
20 20
 class Marker_Label extends \WPLib_Item_Base {
21 21
 
22
-	/**
23
-	 * Marker_Label constructor.
24
-	 *
25
-	 * @param array $args
26
-	 */
27
-	function __construct( $args = array() ) {
22
+    /**
23
+     * Marker_Label constructor.
24
+     *
25
+     * @param array $args
26
+     */
27
+    function __construct( $args = array() ) {
28 28
 
29
-		$args = wp_parse_args( $args, array(
30
-			'model' => new Marker_Label_Model( array( 'label' => new \Clubdeuce\WPGoogleMaps\Marker_Label( $args ) ) ),
31
-		) );
29
+        $args = wp_parse_args( $args, array(
30
+            'model' => new Marker_Label_Model( array( 'label' => new \Clubdeuce\WPGoogleMaps\Marker_Label( $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
Please login to merge, or discard this patch.