Completed
Pull Request — master (#22)
by Daryl
07:43
created
includes/class-map.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@
 block discarded – undo
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
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 1 patch
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.
includes/class-map-model.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -9,36 +9,36 @@
 block discarded – undo
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
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 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -8,44 +8,44 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
includes/class-location.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@
 block discarded – undo
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
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.
RoboFile.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -8,63 +8,63 @@
 block discarded – undo
8 8
 {
9 9
     // define public methods as commands
10 10
 
11
-	function hello($opts = ['who' => 'unknown'])
12
-	{
13
-		print_r($opts);
14
-		$this->say("Hello, " . $opts['who']);
15
-	}
11
+    function hello($opts = ['who' => 'unknown'])
12
+    {
13
+        print_r($opts);
14
+        $this->say("Hello, " . $opts['who']);
15
+    }
16 16
 
17
-	function scripts() {
17
+    function scripts() {
18 18
 
19
-		$this->taskMinify('assets/maps.js')
20
-			->to('dist/scripts/maps.min.js')
21
-			->run();
19
+        $this->taskMinify('assets/maps.js')
20
+            ->to('dist/scripts/maps.min.js')
21
+            ->run();
22 22
 
23
-	}
23
+    }
24 24
 
25
-	function tests()
26
-	{
25
+    function tests()
26
+    {
27 27
 
28
-		$this->taskExec('mysql -e "CREATE DATABASE IF NOT EXISTS test_db"')->run();
29
-		$this->taskExec('mysql -e "GRANT ALL ON test_db.* to \'root\'@\'%\'"')->run();
30
-		$this->taskSvnStack()
31
-			->checkout('https://develop.svn.wordpress.org/tags/4.8.3 wp-tests')
32
-			->run();
28
+        $this->taskExec('mysql -e "CREATE DATABASE IF NOT EXISTS test_db"')->run();
29
+        $this->taskExec('mysql -e "GRANT ALL ON test_db.* to \'root\'@\'%\'"')->run();
30
+        $this->taskSvnStack()
31
+            ->checkout('https://develop.svn.wordpress.org/tags/4.8.3 wp-tests')
32
+            ->run();
33 33
 
34
-		$this->setTestConfig();
35
-		$this->phpunit();
34
+        $this->setTestConfig();
35
+        $this->phpunit();
36 36
 
37
-	}
37
+    }
38 38
 
39
-	function phpunit()
40
-	{
41
-		$this->taskPhpUnit('vendor/bin/phpunit')
42
-			->configFile('tests/phpunit.xml.dist')
43
-			->envVars(array('WP_TESTS_DIR' => 'wp-tests'))
44
-			->run();
45
-	}
39
+    function phpunit()
40
+    {
41
+        $this->taskPhpUnit('vendor/bin/phpunit')
42
+            ->configFile('tests/phpunit.xml.dist')
43
+            ->envVars(array('WP_TESTS_DIR' => 'wp-tests'))
44
+            ->run();
45
+    }
46 46
 
47
-	private function setTestConfig()
48
-	{
47
+    private function setTestConfig()
48
+    {
49 49
 
50
-		if (file_exists('wp-tests/wp-tests-config-sample.php')) {
51
-			copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php');
52
-		}
50
+        if (file_exists('wp-tests/wp-tests-config-sample.php')) {
51
+            copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php');
52
+        }
53 53
 
54
-		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
55
-			->from('youremptytestdbnamehere')
56
-			->to('test_db')
57
-			->run();
54
+        $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
55
+            ->from('youremptytestdbnamehere')
56
+            ->to('test_db')
57
+            ->run();
58 58
 
59
-		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
60
-			->from('yourusernamehere')
61
-			->to('root')
62
-			->run();
59
+        $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
60
+            ->from('yourusernamehere')
61
+            ->to('root')
62
+            ->run();
63 63
 
64
-		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
65
-			->from('yourpasswordhere')
66
-			->to('')
67
-			->run();
68
-	}
64
+        $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
65
+            ->from('yourpasswordhere')
66
+            ->to('')
67
+            ->run();
68
+    }
69 69
 
70 70
 }
71 71
\ No newline at end of file
Please login to merge, or discard this patch.