Completed
Push — master ( 368d83...ed2425 )
by Daryl
01:51
created
component-google-maps.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
      */
48 48
     static function geocoder() {
49 49
 
50
-        if ( ! isset( static::$_geocoder ) ) {
51
-            static::$_geocoder = new Geocoder( ['api_key' => self::api_key() ] );
50
+        if ( !isset(static::$_geocoder) ) {
51
+            static::$_geocoder = new Geocoder( ['api_key' => self::api_key()] );
52 52
         }
53 53
 
54 54
         return static::$_geocoder;
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
 
89 89
         $key = static::api_key();
90 90
 
91
-        wp_register_script('google-maps', "https://maps.google.com/maps/api/js?key={$key}", false, '3.0', true );
92
-        wp_register_script('map-control', home_url( '/vendor/clubdeuce/wplib-olm-google-maps/assets/maps.js' ), array( 'jquery', 'google-maps' ), '0.1', true );
91
+        wp_register_script( 'google-maps', "https://maps.google.com/maps/api/js?key={$key}", false, '3.0', true );
92
+        wp_register_script( 'map-control', home_url( '/vendor/clubdeuce/wplib-olm-google-maps/assets/maps.js' ), array( 'jquery', 'google-maps' ), '0.1', true );
93 93
 
94
-        array_walk(static::$_script_conditions, function( $function ) {
94
+        array_walk( static::$_script_conditions, function( $function ) {
95 95
             return is_callable( $function ) ? call_user_func( $function ) : $function;
96 96
         } );
97 97
 
Please login to merge, or discard this patch.
tests/unit/testGoogleMaps.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function testApiKeySetAndGet() {
20 20
 
21
-        Google_Maps::register_api_key('foo');
22
-        $this->assertEquals('foo', Google_Maps::api_key());
21
+        Google_Maps::register_api_key( 'foo' );
22
+        $this->assertEquals( 'foo', Google_Maps::api_key() );
23 23
 
24 24
     }
25 25
 
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function testGeocoderSetAndGet() {
31 31
 
32
-        $geocoder = \Mockery::mock('Clubdeuce\WPLib\Components\Google_Maps\Geocoder');
32
+        $geocoder = \Mockery::mock( 'Clubdeuce\WPLib\Components\Google_Maps\Geocoder' );
33 33
 
34
-        Google_Maps::register_geocoder($geocoder);
35
-        $this->assertEquals($geocoder, Google_Maps::geocoder());
34
+        Google_Maps::register_geocoder( $geocoder );
35
+        $this->assertEquals( $geocoder, Google_Maps::geocoder() );
36 36
 
37 37
     }
38 38
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $map = Google_Maps::make_new_map();
45 45
 
46
-        $this->assertInstanceOf('Clubdeuce\WPLib\Components\GoogleMaps\Map', $map);
46
+        $this->assertInstanceOf( 'Clubdeuce\WPLib\Components\GoogleMaps\Map', $map );
47 47
 
48 48
     }
49 49
 
Please login to merge, or discard this patch.