Completed
Push — master ( af65ed...6bddd0 )
by Daryl
10:04
created
includes/class-marker-model.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	function info_window() {
50 50
 
51 51
 		$window = new Info_Window( array( 'info_window' => $this->marker()->info_window() ) );
52
-		$window->set_position( array( 'lat' => $this->marker()->latitude(), 'lng' => $this->marker()->longitude()));
52
+		$window->set_position( array( 'lat' => $this->marker()->latitude(), 'lng' => $this->marker()->longitude() ) );
53 53
 
54 54
 		return $window;
55 55
 
Please login to merge, or discard this patch.
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -11,73 +11,73 @@
 block discarded – undo
11 11
  */
12 12
 class Marker_Model extends Model_Base {
13 13
 
14
-	/**
15
-	 * @var WPMarker
16
-	 */
14
+    /**
15
+     * @var WPMarker
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
-		$window = new Info_Window( array( 'info_window' => $this->marker()->info_window() ) );
52
-		$window->set_position( array( 'lat' => $this->marker()->latitude(), 'lng' => $this->marker()->longitude()));
51
+        $window = new Info_Window( array( 'info_window' => $this->marker()->info_window() ) );
52
+        $window->set_position( array( 'lat' => $this->marker()->latitude(), 'lng' => $this->marker()->longitude()));
53 53
 
54
-		return $window;
54
+        return $window;
55 55
 
56
-	}
56
+    }
57 57
 
58
-	/**
59
-	 * @param string $method_name
60
-	 * @param array $args
61
-	 *
62
-	 * @return mixed|null
63
-	 */
64
-	function __call( $method_name, $args ) {
58
+    /**
59
+     * @param string $method_name
60
+     * @param array $args
61
+     *
62
+     * @return mixed|null
63
+     */
64
+    function __call( $method_name, $args ) {
65 65
 
66
-		do {
67
-			$value = parent::__call( $method_name, $args );
66
+        do {
67
+            $value = parent::__call( $method_name, $args );
68 68
 
69
-			if ( $value ) {
70
-				break;
71
-			}
69
+            if ( $value ) {
70
+                break;
71
+            }
72 72
 
73
-			if ( $this->has_marker() ) {
74
-				$value = call_user_func_array( array( $this->marker(), $method_name ), $args );
75
-				break;
76
-			}
77
-		} while ( false );
73
+            if ( $this->has_marker() ) {
74
+                $value = call_user_func_array( array( $this->marker(), $method_name ), $args );
75
+                break;
76
+            }
77
+        } while ( false );
78 78
 
79
-		return $value;
79
+        return $value;
80 80
 
81
-	}
81
+    }
82 82
 
83 83
 }
Please login to merge, or discard this patch.
includes/class-model-base.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
 		$has = false;
19 19
 
20
-		if ( isset( $this->{$property} ) ) {
20
+		if ( isset($this->{$property} ) ) {
21 21
 			$has = true;
22 22
 		}
23 23
 
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -8,41 +8,41 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
includes/class-info-window-model.php 2 patches
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -18,58 +18,58 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	function __construct( $args = array() ) {
32 32
 
33 33
 		$args = wp_parse_args( $args, array(
34
-			'info_window' => new \Clubdeuce\WPGoogleMaps\Info_Window( $args ),
34
+			'info_window' => new \Clubdeuce\WPGoogleMaps\Info_Window($args),
35 35
 		) );
36 36
 
37 37
 		parent::__construct( $args );
Please login to merge, or discard this patch.
includes/class-map-view.php 2 patches
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()->map() );
16 16
 
17
-	    $view->the_map();
17
+        $view->the_map();
18 18
 
19 19
     }
20 20
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     function the_map() {
14 14
 
15
-        $view = new \Clubdeuce\WPGoogleMaps\Map_View( $this->model()->map() );
15
+        $view = new \Clubdeuce\WPGoogleMaps\Map_View($this->model()->map());
16 16
 
17 17
 	    $view->the_map();
18 18
 
Please login to merge, or discard this patch.
component-google-maps.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -14,20 +14,20 @@  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.7';
21
-
22
-	/**
23
-	 *
24
-	 */
17
+    /**
18
+     * @var string
19
+     */
20
+    protected static $_version = '0.1.7';
21
+
22
+    /**
23
+     *
24
+     */
25 25
     static function on_load() {
26 26
 
27
-	    require_once 'vendor/autoload.php';
28
-	    require_once 'includes/class-model-base.php';
27
+        require_once 'vendor/autoload.php';
28
+        require_once 'includes/class-model-base.php';
29 29
         self::register_helper( '\Clubdeuce\WPGoogleMaps\Google_Maps', __CLASS__ );
30
-	    \Clubdeuce\WPGoogleMaps\Google_Maps::initialize();
30
+        \Clubdeuce\WPGoogleMaps\Google_Maps::initialize();
31 31
 
32 32
     }
33 33
 
@@ -42,32 +42,32 @@  discard block
 block discarded – undo
42 42
 
43 43
     }
44 44
 
45
-	/**
46
-	 * @param $address
47
-	 * @param array $args
48
-	 *
49
-	 * @return Marker
50
-	 */
45
+    /**
46
+     * @param $address
47
+     * @param array $args
48
+     *
49
+     * @return Marker
50
+     */
51 51
     static function make_marker_by_address( $address, $args = array() ) {
52 52
 
53
-    	$marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_address( $address, $args );
54
-    	return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
53
+        $marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_address( $address, $args );
54
+        return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
55 55
 
56 56
     }
57 57
 
58
-	/**
59
-	 * @param float  $lat
60
-	 * @param float  $lng
61
-	 * @param array  $args
62
-	 *
63
-	 * @return Marker
64
-	 */
65
-	static function make_marker_by_position( $lat, $lng, $args = array() ) {
58
+    /**
59
+     * @param float  $lat
60
+     * @param float  $lng
61
+     * @param array  $args
62
+     *
63
+     * @return Marker
64
+     */
65
+    static function make_marker_by_position( $lat, $lng, $args = array() ) {
66 66
 
67
-		$marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_position( $lat, $lng, $args );
68
-		return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
67
+        $marker = \Clubdeuce\WPGoogleMaps\Google_Maps::make_marker_by_position( $lat, $lng, $args );
68
+        return new Marker( array_merge( array( 'marker' => $marker ), $args ) );
69 69
 
70
-	}
70
+    }
71 71
 }
72 72
 
73 73
 Google_Maps::on_load();
Please login to merge, or discard this patch.