From ceb7c8ca8137ea78098ab17a12ada25c0b8f2484 Mon Sep 17 00:00:00 2001
From: David Shanske
Date: Tue, 3 Oct 2023 01:22:41 +0000
Subject: [PATCH] Automated phpcs fixes
---
includes/apis/trait-sloc-api-bing.php | 1 -
includes/apis/trait-sloc-api-geoapify.php | 1 -
includes/apis/trait-sloc-api-geonames.php | 1 -
includes/apis/trait-sloc-api-google.php | 1 -
includes/apis/trait-sloc-api-locationiq.php | 1 -
includes/class-airport-location.php | 1 -
includes/class-astronomical-calculator.php | 118 +++++++------
includes/class-geo-base.php | 36 ++--
includes/class-geo-data.php | 1 -
includes/class-geo-provider.php | 56 +++----
includes/class-loc-config.php | 77 +++++----
includes/class-loc-timezone.php | 8 +-
includes/class-location-plugins.php | 30 ++--
includes/class-location-provider.php | 156 +++++++++---------
includes/class-location-taxonomy.php | 11 +-
includes/class-map-provider.php | 120 +++++++-------
includes/class-post-venue.php | 3 +-
includes/class-rest-geo.php | 16 +-
includes/class-sloc-media-metadata.php | 1 -
includes/class-sloc-provider.php | 128 +++++++-------
includes/class-venue-provider.php | 36 ++--
includes/class-weather-data.php | 4 -
includes/class-weather-provider.php | 48 +++---
includes/compat-functions.php | 4 +-
includes/data-functions.php | 1 -
.../class-elevation-provider-bing.php | 1 -
.../class-elevation-provider-geonames.php | 1 -
.../class-elevation-provider-openmapquest.php | 1 -
.../class-elevation-provider-openroute.php | 1 -
includes/functions.php | 4 +-
includes/geo/class-geo-provider-bing.php | 1 -
includes/geo/class-geo-provider-geoapify.php | 1 +
includes/geo/class-geo-provider-here.php | 1 -
includes/geo/class-geo-provider-mapquest.php | 2 -
includes/geo/class-geo-provider-nominatim.php | 1 -
.../geo/class-geo-provider-openmapquest.php | 2 -
includes/geo/class-geo-provider-openroute.php | 1 +
includes/geo/class-geo-provider-pelias.php | 1 -
.../class-location-provider-address.php | 1 -
.../class-location-provider-airport.php | 1 -
.../class-location-provider-compass.php | 5 +-
.../class-location-provider-dummy.php | 2 -
includes/map/class-map-provider-geoapify.php | 1 -
includes/map/class-map-provider-google.php | 3 -
includes/map/class-map-provider-here.php | 2 -
.../map/class-map-provider-locationiq.php | 1 -
includes/map/class-map-provider-mapbox.php | 2 -
includes/map/class-map-provider-mapquest.php | 1 -
includes/map/class-map-provider-staticmap.php | 1 -
.../venue/class-venue-provider-google.php | 1 -
.../class-weather-provider-meteostat.php | 14 +-
.../class-weather-provider-metoffice.php | 3 +-
.../weather/class-weather-provider-nwsus.php | 15 +-
.../class-weather-provider-pirateweather.php | 1 -
.../class-weather-provider-station.php | 2 +-
.../class-weather-provider-visualcrossing.php | 2 +-
.../class-weather-provider-weatherbit.php | 1 -
.../class-weather-provider-weatherstack.php | 1 -
.../widgets/class-sloc-airport-widget.php | 1 -
simple-location.php | 25 ++-
templates/elevation-form.php | 2 +-
templates/geocode-form.php | 2 +-
templates/loc-metabox.php | 2 +-
templates/venue-form.php | 2 +-
templates/weather-form.php | 2 +-
65 files changed, 448 insertions(+), 526 deletions(-)
diff --git a/includes/apis/trait-sloc-api-bing.php b/includes/apis/trait-sloc-api-bing.php
index 9fc0f30..0eca934 100644
--- a/includes/apis/trait-sloc-api-bing.php
+++ b/includes/apis/trait-sloc-api-bing.php
@@ -53,5 +53,4 @@ public static function init() {
);
}
}
-
}
diff --git a/includes/apis/trait-sloc-api-geoapify.php b/includes/apis/trait-sloc-api-geoapify.php
index 23df4b5..5d11829 100644
--- a/includes/apis/trait-sloc-api-geoapify.php
+++ b/includes/apis/trait-sloc-api-geoapify.php
@@ -56,5 +56,4 @@ public static function init() {
);
}
}
-
}
diff --git a/includes/apis/trait-sloc-api-geonames.php b/includes/apis/trait-sloc-api-geonames.php
index 7fe2754..7839a75 100644
--- a/includes/apis/trait-sloc-api-geonames.php
+++ b/includes/apis/trait-sloc-api-geonames.php
@@ -29,5 +29,4 @@ public static function admin_init() {
public static function init() {
self::register_settings_api( __( 'GeoNames', 'simple-location' ), 'sloc_geonames_user', __( 'User', 'simple-location' ) );
}
-
}
diff --git a/includes/apis/trait-sloc-api-google.php b/includes/apis/trait-sloc-api-google.php
index 56fa6f8..f067134 100644
--- a/includes/apis/trait-sloc-api-google.php
+++ b/includes/apis/trait-sloc-api-google.php
@@ -53,5 +53,4 @@ public static function init() {
);
}
}
-
}
diff --git a/includes/apis/trait-sloc-api-locationiq.php b/includes/apis/trait-sloc-api-locationiq.php
index 9ed1db1..c37e891 100644
--- a/includes/apis/trait-sloc-api-locationiq.php
+++ b/includes/apis/trait-sloc-api-locationiq.php
@@ -28,5 +28,4 @@ public static function admin_init() {
public static function init() {
self::register_settings_api( __( 'LocationIQ', 'simple-location' ), 'sloc_locationiq_api' );
}
-
}
diff --git a/includes/class-airport-location.php b/includes/class-airport-location.php
index 7a67779..ab6f74f 100644
--- a/includes/class-airport-location.php
+++ b/includes/class-airport-location.php
@@ -170,6 +170,5 @@ public static function get_airline( $search, $field = 'iata_code' ) {
return $airline;
}
}
-
}
} // End Class
diff --git a/includes/class-astronomical-calculator.php b/includes/class-astronomical-calculator.php
index 5740da3..69cecb6 100644
--- a/includes/class-astronomical-calculator.php
+++ b/includes/class-astronomical-calculator.php
@@ -18,44 +18,44 @@
class Astronomical_Calculator {
- /**
- * Zenith. Adjusted based on elevation.
- *
- * @since 4.0.0
- * @var float
- */
+ /**
+ * Zenith. Adjusted based on elevation.
+ *
+ * @since 4.0.0
+ * @var float
+ */
protected $zenith;
- /**
- * Latitude.
- *
- * @since 4.0.0
- * @var float
- */
+ /**
+ * Latitude.
+ *
+ * @since 4.0.0
+ * @var float
+ */
protected $latitude;
- /**
- * Longitude.
- *
- * @since 4.0.0
- * @var float
- */
+ /**
+ * Longitude.
+ *
+ * @since 4.0.0
+ * @var float
+ */
protected $longitude;
- /**
- * Elevation in meters.
- *
- * @since 4.0.0
- * @var float
- */
+ /**
+ * Elevation in meters.
+ *
+ * @since 4.0.0
+ * @var float
+ */
protected $elevation;
- /**
- * Timezone.
- *
- * @since 4.0.0
- * @var DateTimeZone
- */
+ /**
+ * Timezone.
+ *
+ * @since 4.0.0
+ * @var DateTimeZone
+ */
protected $timezone;
@@ -125,7 +125,7 @@ public function get_timestamp( $timestamp, $type = 'sunrise' ) {
default:
$function = 'date_sunrise';
}
- return call_user_func( $function, $timestamp, SUNFUNCS_RET_TIMESTAMP, $this->latitude, $this->longitude, self::get_zenith( $this->elevation ) );
+ return call_user_func( $function, $timestamp, SUNFUNCS_RET_TIMESTAMP, $this->latitude, $this->longitude, self::get_zenith( $this->elevation ) );
}
@@ -406,11 +406,11 @@ public function get_moon_data( $timestamp = null ) {
'icon' => 'wi-moon-alt-new',
);
} elseif ( 0 < $moon['phase'] && 0.25 > $moon['phase'] ) {
- $return = array(
- 'name' => 'waxing-crescent-moon',
- 'text' => __( 'Waxing Crescent', 'simple-location' ),
- 'icon' => 'wi-moon-alt-waxing-crescent-6',
- );
+ $return = array(
+ 'name' => 'waxing-crescent-moon',
+ 'text' => __( 'Waxing Crescent', 'simple-location' ),
+ 'icon' => 'wi-moon-alt-waxing-crescent-6',
+ );
} elseif ( 0.25 < $moon['phase'] && 0.5 > $moon['phase'] ) {
$return = array(
'name' => 'first-quarter-moon',
@@ -418,29 +418,29 @@ public function get_moon_data( $timestamp = null ) {
'icon' => 'wi-moon-alt-first-quarter',
);
} elseif ( 0.5 === $moon['phase'] ) {
- $return = array(
- 'name' => 'full-moon',
- 'text' => __( 'Full Moon', 'simple-location' ),
- 'icon' => 'wi-moon-alt-full',
- );
+ $return = array(
+ 'name' => 'full-moon',
+ 'text' => __( 'Full Moon', 'simple-location' ),
+ 'icon' => 'wi-moon-alt-full',
+ );
} elseif ( 0.5 < $moon['phase'] && 0.75 > $moon['phase'] ) {
- $return = array(
- 'name' => 'waning-gibbous-moon',
- 'text' => __( 'Waning Gibbous', 'simple-location' ),
- 'icon' => 'wi-moon-alt-waning-gibbous-1',
- );
+ $return = array(
+ 'name' => 'waning-gibbous-moon',
+ 'text' => __( 'Waning Gibbous', 'simple-location' ),
+ 'icon' => 'wi-moon-alt-waning-gibbous-1',
+ );
} elseif ( 0.75 === $moon['phase'] ) {
- $return = array(
- 'name' => 'third-quarter-moon',
- 'text' => __( 'Third Quarter', 'simple-location' ),
- 'icon' => 'wi-moon-alt-third-quarter',
- );
+ $return = array(
+ 'name' => 'third-quarter-moon',
+ 'text' => __( 'Third Quarter', 'simple-location' ),
+ 'icon' => 'wi-moon-alt-third-quarter',
+ );
} elseif ( 0.75 < $moon['phase'] && 1 > $moon['phase'] ) {
- $return = array(
- 'name' => 'waning-crescent-moon',
- 'text' => __( 'Waning Crescent', 'simple-location' ),
- 'icon' => 'wi-moon-alt-waning-crescent-1',
- );
+ $return = array(
+ 'name' => 'waning-crescent-moon',
+ 'text' => __( 'Waning Crescent', 'simple-location' ),
+ 'icon' => 'wi-moon-alt-waning-crescent-1',
+ );
}
return array_merge( $moon, $return );
}
@@ -562,10 +562,10 @@ public function get_moon_times( $timestamp = null ) {
$x1 = $xe - $dx;
$x2 = $xe + $dx;
if ( abs( $x1 ) <= 1 ) {
- $roots++;
+ ++$roots;
}
if ( abs( $x2 ) <= 1 ) {
- $roots++;
+ ++$roots;
}
if ( $x1 < -1 ) {
$x1 = $x2;
@@ -696,7 +696,5 @@ public function cloudiness( $wm2, $humidity ) {
return 20;
}
}
-
}
-
}
diff --git a/includes/class-geo-base.php b/includes/class-geo-base.php
index 26f6ee0..cc93b11 100644
--- a/includes/class-geo-base.php
+++ b/includes/class-geo-base.php
@@ -78,7 +78,6 @@ public static function init() {
add_filter( sprintf( 'manage_%1$s_posts_columns', $post_type ), array( __CLASS__, 'add_location_admin_column' ) );
add_action( sprintf( 'manage_%1$s_posts_custom_column', $post_type ), array( __CLASS__, 'manage_location_admin_column' ), 10, 2 );
}
-
}
public static function admin_init() {
@@ -193,20 +192,20 @@ public static function enqueue( $hook_suffix ) {
if ( in_array( $screen->id, $screens, true ) || in_array( $hook_suffix, $hooks, true ) ) {
wp_enqueue_style(
'sloc_admin',
- plugins_url( 'css/location-admin.min.css', dirname( __FILE__ ) ),
+ plugins_url( 'css/location-admin.min.css', __DIR__ ),
array(),
Simple_Location_Plugin::$version
);
wp_enqueue_script(
'sloc_location',
- plugins_url( 'js/location.js', dirname( __FILE__ ) ),
+ plugins_url( 'js/location.js', __DIR__ ),
array( 'jquery' ),
Simple_Location_Plugin::$version,
true
);
wp_enqueue_script(
'moment-timezone',
- plugins_url( 'js/luxon.min.js', dirname( __FILE__ ) ),
+ plugins_url( 'js/luxon.min.js', __DIR__ ),
array(),
Simple_Location_Plugin::$version,
true
@@ -440,7 +439,6 @@ public static function geo_public_select( $public, $echo = false ) {
return $return;
}
echo wp_kses( $return, self::kses_option() );
-
}
@@ -717,7 +715,6 @@ public static function rest_location() {
),
)
);
-
}
/**
@@ -882,14 +879,14 @@ public static function rest_prepare_user( $response, $user, $request ) {
return $response;
}
- /*
- Sets Location custom capabilities.
+ /*
+ Sets Location custom capabilities.
*
* @param string[] $caps Array of the users capabilities.
- * @param string $cap Capability name.
- * @param int $user_id The user ID.
+ * @param string $cap Capability name.
+ * @param int $user_id The user ID.
* @param array $args Adds the context to the cap. Typically the object ID.
- */
+ */
public static function map_meta_cap( $caps, $cap, $user_id, $args ) {
$id = 0;
if ( isset( $args[0] ) ) {
@@ -954,7 +951,7 @@ public static function map_meta_cap( $caps, $cap, $user_id, $args ) {
}
/*
- Current User Can Read with Object for Private Location.
+ Current User Can Read with Object for Private Location.
*
* @param mixed $object The object.
* @return boolean True if current user can.
@@ -982,7 +979,7 @@ public static function current_user_can_read( $object ) {
}
/*
- Current User Can Read with Object for Private Location.
+ Current User Can Read with Object for Private Location.
*
* @param mixed $object The object.
* @return boolean True if current user can.
@@ -1119,10 +1116,8 @@ public static function save_post_meta( $post_id ) {
if ( ! current_user_can( 'edit_page', $post_id ) ) {
return;
}
- } else {
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
+ } elseif ( ! current_user_can( 'edit_post', $post_id ) ) {
return;
- }
}
if ( has_term( '', 'venue' ) ) {
return;
@@ -1134,12 +1129,10 @@ public static function save_post_meta( $post_id ) {
} else {
delete_post_meta( $post_id, 'venue_id' );
}
- } else {
- if ( isset( $_POST['venue_radius'] ) && is_numeric( $_POST['venue_radius'] ) ) {
+ } elseif ( isset( $_POST['venue_radius'] ) && is_numeric( $_POST['venue_radius'] ) ) {
update_post_meta( $post_id, 'venue_radius', intval( $_POST['venue_radius'] ) );
- } else {
- delete_post_meta( $post_id, 'venue_radius' );
- }
+ } else {
+ delete_post_meta( $post_id, 'venue_radius' );
}
self::save_meta( 'post', $post_id );
}
@@ -1179,5 +1172,4 @@ public static function save_user_meta( $user_id ) {
}
self::save_meta( 'user', $user_id );
}
-
}
diff --git a/includes/class-geo-data.php b/includes/class-geo-data.php
index 202f450..61e6d4f 100644
--- a/includes/class-geo-data.php
+++ b/includes/class-geo-data.php
@@ -1089,5 +1089,4 @@ public static function get_location( $type, $id, $args = array() ) {
$return = implode( PHP_EOL, $c );
return sprintf( '<%1s class="%2$s">%3$s%1$s>', $args['wrapper-type'], implode( ' ', $class ), $return );
}
-
}
diff --git a/includes/class-geo-provider.php b/includes/class-geo-provider.php
index 43b3c82..6df4031 100644
--- a/includes/class-geo-provider.php
+++ b/includes/class-geo-provider.php
@@ -13,36 +13,36 @@
abstract class Geo_Provider extends Sloc_Provider {
use Geolocation_Trait;
- /**
- * Reverse Zoom Level.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Reverse Zoom Level.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $reverse_zoom;
- /**
- * Timezone.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Timezone.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $timezone;
- /**
- * Offset.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Offset.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $offset;
- /**
- * Offset in Seconds.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Offset in Seconds.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $offset_seconds;
/**
@@ -149,12 +149,10 @@ public function display_name( $reverse ) {
$text = array_filter( $text );
if ( empty( $text ) ) {
$text[] = ifset( $reverse['region'] );
- } else {
- if ( array_key_exists( 'region-code', $reverse ) ) {
+ } elseif ( array_key_exists( 'region-code', $reverse ) ) {
$text[] = $reverse['region-code'];
- } else {
- $text[] = ifset( $reverse['region'] );
- }
+ } else {
+ $text[] = ifset( $reverse['region'] );
}
if ( array_key_exists( 'country-code', $reverse ) ) {
if ( get_option( 'sloc_country' ) !== $reverse['country-code'] ) {
diff --git a/includes/class-loc-config.php b/includes/class-loc-config.php
index 2a8fe6f..292df81 100644
--- a/includes/class-loc-config.php
+++ b/includes/class-loc-config.php
@@ -18,53 +18,53 @@
*/
class Loc_Config {
- /**
- * Store Map Providers.
- *
- * @since 1.0.0
- * @var array
- */
+ /**
+ * Store Map Providers.
+ *
+ * @since 1.0.0
+ * @var array
+ */
private static $maps = array();
- /**
- * Store Reverse Lookup Providers.
- *
- * @since 1.0.0
- * @var array
- */
+ /**
+ * Store Reverse Lookup Providers.
+ *
+ * @since 1.0.0
+ * @var array
+ */
private static $geo = array();
- /**
- * Store Geolocation Providers.
- *
- * @since 1.0.0
- * @var array
- */
+ /**
+ * Store Geolocation Providers.
+ *
+ * @since 1.0.0
+ * @var array
+ */
private static $location = array();
- /**
- * Store Weather Providers.
- *
- * @since 1.0.0
- * @var array
- */
+ /**
+ * Store Weather Providers.
+ *
+ * @since 1.0.0
+ * @var array
+ */
private static $weather = array();
- /**
- * Store Elevation Providers.
- *
- * @since 5.0.0
- * @var array
- */
+ /**
+ * Store Elevation Providers.
+ *
+ * @since 5.0.0
+ * @var array
+ */
private static $elevation = array();
- /**
- * Store Venue providers.
- *
- * @since 5.0.0
- * @var array
- */
+ /**
+ * Store Venue providers.
+ *
+ * @since 5.0.0
+ * @var array
+ */
private static $venue = array();
/**
@@ -85,13 +85,13 @@ public static function admin_enqueue( $hook_suffix ) {
if ( in_array( $hook_suffix, $hooks, true ) ) {
wp_enqueue_style(
'sloc_admin',
- plugins_url( 'css/location-admin.min.css', dirname( __FILE__ ) ),
+ plugins_url( 'css/location-admin.min.css', __DIR__ ),
array(),
Simple_Location_Plugin::$version
);
wp_enqueue_script(
'sloc_password',
- plugins_url( 'js/password.js', dirname( __FILE__ ) ),
+ plugins_url( 'js/password.js', __DIR__ ),
array(),
Simple_Location_Plugin::$version,
true
@@ -319,7 +319,6 @@ public static function register_map_settings() {
'default' => 500,
)
);
-
}
/**
diff --git a/includes/class-loc-timezone.php b/includes/class-loc-timezone.php
index 8f312f2..dc1f618 100644
--- a/includes/class-loc-timezone.php
+++ b/includes/class-loc-timezone.php
@@ -56,7 +56,7 @@ public static function timezone_for_location( $lat, $lng, $date = false ) {
usort(
$timezones,
- function( $a, $b ) {
+ function ( $a, $b ) {
return $a[3] < $b[3] ? -1 : 1;
}
);
@@ -107,7 +107,6 @@ public static function after_micropub( $input, $args ) {
if ( $args && array_key_exists( 'timezone', $args ) ) {
update_post_meta( $args['ID'], 'geo_timezone', $args['timezone'] );
}
-
}
public static function wp_timezone_choice( $selected_zone, $locale = null ) {
@@ -318,10 +317,8 @@ public static function postbox_save_post_meta( $post_id ) {
if ( ! current_user_can( 'edit_page', $post_id ) ) {
return;
}
- } else {
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
+ } elseif ( ! current_user_can( 'edit_post', $post_id ) ) {
return;
- }
}
if ( isset( $_POST['post_timezone'] ) ) {
$timezone = timezone_open( sanitize_text_field( $_POST['post_timezone'] ) );
@@ -499,5 +496,4 @@ public static function get_comment_time( $date, $d, $gmt, $translate, $comment )
}
return wp_date( $d, get_comment_timestamp( $comment ), $timezone );
}
-
} // End Class
diff --git a/includes/class-location-plugins.php b/includes/class-location-plugins.php
index 15f564f..c050a12 100755
--- a/includes/class-location-plugins.php
+++ b/includes/class-location-plugins.php
@@ -81,7 +81,7 @@ public static function webmention_handler_mf2_set_properties( $meta, $handler )
', ',
array_filter(
$parts,
- function( $v ) {
+ function ( $v ) {
return $v;
}
)
@@ -203,22 +203,20 @@ public static function micropub_set_location( $input, $args ) {
if ( isset( $properties['checkin'] ) && ! wp_is_numeric_array( $properties['checkin'] ) ) {
$location = array_merge( $location, $properties['checkin']['properties'] );
}
- } else {
- if ( isset( $properties['checkin'] ) ) {
+ } elseif ( isset( $properties['checkin'] ) ) {
$location = $properties['checkin']['properties'];
- } elseif ( isset( $properties['latitude'] ) && isset( $properties['longitude'] ) ) {
- $location = array(
- 'latitude' => $properties['latitude'],
- 'longitude' => $properties['longitude'],
- );
- } elseif ( isset( $meta['geo_latitude'] ) && isset( $meta['geo_longitude'] ) ) {
- $location = array(
- 'latitude' => $meta['geo_latitude'],
- 'longitude' => $meta['geo_longitude'],
- );
- } else {
- return;
- }
+ } elseif ( isset( $properties['latitude'] ) && isset( $properties['longitude'] ) ) {
+ $location = array(
+ 'latitude' => $properties['latitude'],
+ 'longitude' => $properties['longitude'],
+ );
+ } elseif ( isset( $meta['geo_latitude'] ) && isset( $meta['geo_longitude'] ) ) {
+ $location = array(
+ 'latitude' => $meta['geo_latitude'],
+ 'longitude' => $meta['geo_longitude'],
+ );
+ } else {
+ return;
}
// Strip out anything that might not be relevant to an address.
diff --git a/includes/class-location-provider.php b/includes/class-location-provider.php
index 3879a29..fd43761 100644
--- a/includes/class-location-provider.php
+++ b/includes/class-location-provider.php
@@ -15,104 +15,104 @@
abstract class Location_Provider extends Sloc_Provider {
- /**
- * User name.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * User name.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $user;
- /**
- * Accuracy. AKA as Horizontal Accuracy.
- *
- * The accuracy level of the latitude and longitude coordinates. It is specified in meters. Must be a non-negative real number.
- *
- * @since 1.0.0
- * @var double
- */
+ /**
+ * Accuracy. AKA as Horizontal Accuracy.
+ *
+ * The accuracy level of the latitude and longitude coordinates. It is specified in meters. Must be a non-negative real number.
+ *
+ * @since 1.0.0
+ * @var double
+ */
protected $accuracy;
- /**
- * Altitude Accuracy. AKA Verticial Accuracy.
- *
- * Specified in meters. If not available, must be null. If available, must be a non-negative real number.
- *
- * @since 1.0.0
- * @var double
- */
+ /**
+ * Altitude Accuracy. AKA Verticial Accuracy.
+ *
+ * Specified in meters. If not available, must be null. If available, must be a non-negative real number.
+ *
+ * @since 1.0.0
+ * @var double
+ */
protected $altitude_accuracy;
- /**
- * Heading.
- *
- * The direction of travel and is specified in degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north.
- * If the implementation cannot provide heading information, the value of this attribute must be null. If stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute must be NaN.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Heading.
+ *
+ * The direction of travel and is specified in degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north.
+ * If the implementation cannot provide heading information, the value of this attribute must be null. If stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute must be NaN.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $heading;
- /**
- * Speed.
- *
- * Magnitude of the horizontal component of the current velocity and is specified in meters per second. If not available, must be null.
- * Otherwise, the value must be a non-negative real number.
- *
- * @since 1.0.0
- * @var float
- */
+ /**
+ * Speed.
+ *
+ * Magnitude of the horizontal component of the current velocity and is specified in meters per second. If not available, must be null.
+ * Otherwise, the value must be a non-negative real number.
+ *
+ * @since 1.0.0
+ * @var float
+ */
protected $speed;
- /**
- * Time.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Time.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $time = null;
- /**
- * Activity.
- *
- * String representation of the current activity.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Activity.
+ *
+ * String representation of the current activity.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $activity = null;
- /**
- * Annotation.
- *
- * Any annotations on the location.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Annotation.
+ *
+ * Any annotations on the location.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $annotation = '';
- /**
- * Extra parameters passed.
- *
- * Any extra data provided by the provider.
- *
- * @since 1.0.0
- * @var array
- */
+ /**
+ * Extra parameters passed.
+ *
+ * Any extra data provided by the provider.
+ *
+ * @since 1.0.0
+ * @var array
+ */
protected $other = array();
- /**
- * Support for Whether this Provider Allows for Background Updates.
- *
- * If a provider does not allow background updates information may be stale.
- *
- * @since 1.0.0
- * @var boolean
- */
+ /**
+ * Support for Whether this Provider Allows for Background Updates.
+ *
+ * If a provider does not allow background updates information may be stale.
+ *
+ * @since 1.0.0
+ * @var boolean
+ */
protected $background = false;
/**
diff --git a/includes/class-location-taxonomy.php b/includes/class-location-taxonomy.php
index e5d54fa..6651a13 100755
--- a/includes/class-location-taxonomy.php
+++ b/includes/class-location-taxonomy.php
@@ -283,7 +283,7 @@ public static function normalize_address( $address ) {
if ( array_key_exists( 'type', $address ) && array_key_exists( 'properties', $address ) ) {
$address = $address['properties'];
$address = array_map(
- function( $v ) {
+ function ( $v ) {
if ( is_array( $v ) ) {
return $v[0];
}
@@ -813,12 +813,10 @@ public static function display_name( $term_id, $args = array() ) {
$return[] = $flag . ' ' . $term->name;
}
}
- } else {
- if ( $args['links'] ) {
+ } elseif ( $args['links'] ) {
$return[] = sprintf( '%2$s', get_term_link( $term->term_id, 'location' ), $term->name );
- } else {
- $return[] = $term->name;
- }
+ } else {
+ $return[] = $term->name;
}
}
return implode( ', ', $return );
@@ -907,7 +905,6 @@ public static function location_data_to_hadr( $data ) {
}
return $return;
}
-
} // End Class Location_Taxonomy
diff --git a/includes/class-map-provider.php b/includes/class-map-provider.php
index de8a172..a37c0ed 100644
--- a/includes/class-map-provider.php
+++ b/includes/class-map-provider.php
@@ -12,84 +12,84 @@
*/
abstract class Map_Provider extends Sloc_Provider {
- /**
- * Map Zoom Level.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Map Zoom Level.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $map_zoom;
- /**
- * Map Zoom Level Maximum.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Map Zoom Level Maximum.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $max_map_zoom;
- /**
- * Map Height.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Map Height.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $height;
- /**
- * Map Width.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Map Width.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $width;
- /**
- * Map Height Maximum Height.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Map Height Maximum Height.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $max_height;
- /**
- * Map Maximum Width.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Map Maximum Width.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $max_width;
- /**
- * Map Style.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Map Style.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $style;
- /**
- * Username if appropriate.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Username if appropriate.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $user;
- /**
- * Static Map URL.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Static Map URL.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $static;
- /**
- * Location Information.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Location Information.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $location;
/**
diff --git a/includes/class-post-venue.php b/includes/class-post-venue.php
index 50b553b..ce8f5a4 100644
--- a/includes/class-post-venue.php
+++ b/includes/class-post-venue.php
@@ -288,7 +288,7 @@ public static function handle_bulk_edit( $redirect_to, $doaction, $post_ids ) {
Location_Taxonomy::set_location( $post_id, $location->term_id );
}
}
- $count++;
+ ++$count;
}
}
}
@@ -663,5 +663,4 @@ public static function get_venue_posts( $venue_id = null ) {
)
);
}
-
}
diff --git a/includes/class-rest-geo.php b/includes/class-rest-geo.php
index 9cea596..56e5d50 100644
--- a/includes/class-rest-geo.php
+++ b/includes/class-rest-geo.php
@@ -98,7 +98,7 @@ public function register_routes() {
),
),
- 'permission_callback' => function( $request ) {
+ 'permission_callback' => function ( $request ) {
return current_user_can( 'read' );
},
),
@@ -187,7 +187,7 @@ public function register_routes() {
'sanitize_callback' => 'sanitize_text_field',
),
),
- 'permission_callback' => function( $request ) {
+ 'permission_callback' => function ( $request ) {
return current_user_can( 'publish_posts' );
},
),
@@ -214,7 +214,7 @@ public function register_routes() {
'sanitize_callback' => 'sanitize_text_field',
),
),
- 'permission_callback' => function( $request ) {
+ 'permission_callback' => function ( $request ) {
return current_user_can( 'publish_posts' );
},
),
@@ -239,7 +239,7 @@ public function register_routes() {
'sanitize_callback' => 'sanitize_text_field',
),
),
- 'permission_callback' => function( $request ) {
+ 'permission_callback' => function ( $request ) {
return current_user_can( 'publish_posts' );
},
),
@@ -270,7 +270,7 @@ public function register_routes() {
),
'time' => array(),
),
- 'permission_callback' => function( $request ) {
+ 'permission_callback' => function ( $request ) {
return current_user_can( 'publish_posts' );
},
),
@@ -284,7 +284,7 @@ public function register_routes() {
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'lookup' ),
'args' => array(),
- 'permission_callback' => function( $request ) {
+ 'permission_callback' => function ( $request ) {
return current_user_can( 'read' );
},
),
@@ -316,7 +316,7 @@ public function register_routes() {
'sanitize_callback' => array( $this, 'sanitize_int' ),
),
),
- 'permission_callback' => function( $request ) {
+ 'permission_callback' => function ( $request ) {
return current_user_can( 'publish_posts' );
},
),
@@ -717,8 +717,6 @@ public static function timezone( $request ) {
)
);
}
-
-
}
new REST_Geo();
diff --git a/includes/class-sloc-media-metadata.php b/includes/class-sloc-media-metadata.php
index 9411b95..c9ffbe2 100644
--- a/includes/class-sloc-media-metadata.php
+++ b/includes/class-sloc-media-metadata.php
@@ -239,5 +239,4 @@ public static function attachment( $meta, $post_id ) {
return $meta;
}
}
-
}
diff --git a/includes/class-sloc-provider.php b/includes/class-sloc-provider.php
index fa11ae2..aadae75 100644
--- a/includes/class-sloc-provider.php
+++ b/includes/class-sloc-provider.php
@@ -12,88 +12,88 @@
*/
abstract class Sloc_Provider {
- /**
- * Provider Slug.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Provider Slug.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $slug;
- /**
- * Provider Name.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Provider Name.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $name;
- /**
- * Provider Description.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Provider Description.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $description;
- /**
- * Provider URL.
- *
- * @var string
- */
+ /**
+ * Provider URL.
+ *
+ * @var string
+ */
protected $url;
- /**
- * Provider API Key.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Provider API Key.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $api;
- /**
- * Username if Applicable.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Username if Applicable.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $user;
- /**
- * Region.
- *
- * If null applies to all regions.
- * Can also be a string or array of strings representing two letter country codes.
- *
- * @since 4.0.7
- * @var string|array|null
- */
+ /**
+ * Region.
+ *
+ * If null applies to all regions.
+ * Can also be a string or array of strings representing two letter country codes.
+ *
+ * @since 4.0.7
+ * @var string|array|null
+ */
protected $region;
- /**
- * Latitude.
- *
- * @since 1.0.0
- * @var float
- */
+ /**
+ * Latitude.
+ *
+ * @since 1.0.0
+ * @var float
+ */
protected $latitude;
- /**
- * Longitude.
- *
- * @since 1.0.0
- * @var float
- */
+ /**
+ * Longitude.
+ *
+ * @since 1.0.0
+ * @var float
+ */
protected $longitude;
- /**
- * Altitude.
- *
- * Denotes the height of the position, specified in meters above the [WGS84] ellipsoid. If the implementation cannot provide altitude information, the value of this attribute must be null.
- *
- * @since 1.0.0
- * @var float
- */
+ /**
+ * Altitude.
+ *
+ * Denotes the height of the position, specified in meters above the [WGS84] ellipsoid. If the implementation cannot provide altitude information, the value of this attribute must be null.
+ *
+ * @since 1.0.0
+ * @var float
+ */
protected $altitude;
/**
diff --git a/includes/class-venue-provider.php b/includes/class-venue-provider.php
index 518cce9..54cbf63 100644
--- a/includes/class-venue-provider.php
+++ b/includes/class-venue-provider.php
@@ -13,28 +13,28 @@
abstract class Venue_Provider extends Sloc_Provider {
use Geolocation_Trait;
- /**
- * Timezone.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Timezone.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $timezone;
- /**
- * Offset.
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Offset.
+ *
+ * @since 1.0.0
+ * @var string
+ */
protected $offset;
- /**
- * Offset in Seconds.
- *
- * @since 1.0.0
- * @var int
- */
+ /**
+ * Offset in Seconds.
+ *
+ * @since 1.0.0
+ * @var int
+ */
protected $offset_seconds;
/**
diff --git a/includes/class-weather-data.php b/includes/class-weather-data.php
index 8500bfd..0ca206a 100644
--- a/includes/class-weather-data.php
+++ b/includes/class-weather-data.php
@@ -62,7 +62,6 @@ public static function init() {
// Add Post Type Support for Weather
add_post_type_support( 'post', 'weather' );
-
}
public static function submitbox( $screen, $object, $args ) {
@@ -558,7 +557,6 @@ public static function get_weather_by_station( $station, $provider = null, $cach
$weather['summary'] = self::weather_condition_codes( $weather['code'] );
}
return $weather;
-
}
/**
@@ -587,6 +585,4 @@ public static function code_select( $code, $echo = false ) {
)
);
}
-
-
}
diff --git a/includes/class-weather-provider.php b/includes/class-weather-provider.php
index 551e6a5..1b47ab6 100644
--- a/includes/class-weather-provider.php
+++ b/includes/class-weather-provider.php
@@ -12,32 +12,33 @@
*/
abstract class Weather_Provider extends Sloc_Provider {
use Weather_Info_Trait;
- /**
- * Station ID.
- *
- * Many weather sites permit a station ID to be set.
- *
- * @since 1.0.0
- * @var $string
- */
+
+ /**
+ * Station ID.
+ *
+ * Many weather sites permit a station ID to be set.
+ *
+ * @since 1.0.0
+ * @var $string
+ */
protected $station_id;
- /**
- * Units. si, imperial, etc.
- *
- * @since 1.0.0
- * @var $string
- */
+ /**
+ * Units. si, imperial, etc.
+ *
+ * @since 1.0.0
+ * @var $string
+ */
protected $units;
- /**
- * Cache Time.
- *
- * Cache time in seconds. Defaults to 0.
- *
- * @since 1.0.0
- * @var $int
- */
+ /**
+ * Cache Time.
+ *
+ * Cache time in seconds. Defaults to 0.
+ *
+ * @since 1.0.0
+ * @var $int
+ */
protected $cache_time;
/**
@@ -133,7 +134,7 @@ public function extra_data( $return, $timestamp = null ) {
$return['localtime'] = $datetime->format( DATE_W3C );
/*
- if ( array_key_exists( 'radiation', $return ) && ! array_key_exists( 'cloudiness', $return ) ) {
+ if ( array_key_exists( 'radiation', $return ) && ! array_key_exists( 'cloudiness', $return ) ) {
$return['cloudiness'] = $calc->cloudiness( $return['radiation'], $return['humidity'] );
} */
return array_filter( $return );
@@ -589,7 +590,6 @@ public static function get_iconlist() {
'wi-moon-waxing-gibbous-6' => __( 'Waxing Gibbous 6', 'simple-location' ),
);
return array_merge( $neutral, $day, $night, $misc, $moon );
-
}
/**
diff --git a/includes/compat-functions.php b/includes/compat-functions.php
index 696b756..5fbd499 100644
--- a/includes/compat-functions.php
+++ b/includes/compat-functions.php
@@ -194,7 +194,7 @@ function wp_date( $format, $timestamp = null, $timezone = null ) {
$format_length = strlen( $format );
$month = $wp_locale->get_month( $datetime->format( 'm' ) );
$weekday = $wp_locale->get_weekday( $datetime->format( 'w' ) );
- for ( $i = 0; $i < $format_length; $i ++ ) {
+ for ( $i = 0; $i < $format_length; $i++ ) {
switch ( $format[ $i ] ) {
case 'D':
$new_format .= backslashit( $wp_locale->get_weekday_abbrev( $weekday ) );
@@ -272,5 +272,3 @@ function str_contains( $haystack, $needle ) {
return '' === $needle || false !== strpos( $haystack, $needle );
}
}
-
-
diff --git a/includes/data-functions.php b/includes/data-functions.php
index f98f222..9e18739 100644
--- a/includes/data-functions.php
+++ b/includes/data-functions.php
@@ -245,4 +245,3 @@ function get_geo_archive_location_list() {
}
return $locations;
}
-
diff --git a/includes/elevation/class-elevation-provider-bing.php b/includes/elevation/class-elevation-provider-bing.php
index d2fc722..0a5066d 100644
--- a/includes/elevation/class-elevation-provider-bing.php
+++ b/includes/elevation/class-elevation-provider-bing.php
@@ -76,4 +76,3 @@ public function elevation() {
return round( $json['elevations'][0], 2 );
}
}
-
diff --git a/includes/elevation/class-elevation-provider-geonames.php b/includes/elevation/class-elevation-provider-geonames.php
index 53414c8..3d06946 100644
--- a/includes/elevation/class-elevation-provider-geonames.php
+++ b/includes/elevation/class-elevation-provider-geonames.php
@@ -70,4 +70,3 @@ public function elevation() {
return new WP_Error( 'unknown_error', __( 'Unknown Geonames Error', 'simple-location' ) );
}
}
-
diff --git a/includes/elevation/class-elevation-provider-openmapquest.php b/includes/elevation/class-elevation-provider-openmapquest.php
index 455d88c..dc38ef5 100644
--- a/includes/elevation/class-elevation-provider-openmapquest.php
+++ b/includes/elevation/class-elevation-provider-openmapquest.php
@@ -69,4 +69,3 @@ public function elevation() {
return round( $json['elevationProfile'][0]['height'], 2 );
}
}
-
diff --git a/includes/elevation/class-elevation-provider-openroute.php b/includes/elevation/class-elevation-provider-openroute.php
index 83d3401..1225142 100644
--- a/includes/elevation/class-elevation-provider-openroute.php
+++ b/includes/elevation/class-elevation-provider-openroute.php
@@ -67,4 +67,3 @@ public function elevation() {
return $json['geometry'][2];
}
}
-
diff --git a/includes/functions.php b/includes/functions.php
index 8ec8996..ee7735d 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -532,7 +532,7 @@ function sloc_query_id_list() {
/*
- Wrapper around get_post_datetime that adjusts if timezone property is available
+Wrapper around get_post_datetime that adjusts if timezone property is available
*/
function sloc_get_post_datetime( $post = null, $field = 'date', $source = 'local' ) {
$datetime = get_post_datetime( $post, $field, $source );
@@ -546,7 +546,7 @@ function sloc_get_post_datetime( $post = null, $field = 'date', $source = 'local
/*
- Wrapper around get_comment_datetime that adjusts if timezone property is available
+Wrapper around get_comment_datetime that adjusts if timezone property is available
*/
function sloc_get_comment_datetime( $comment = null ) {
$datetime = get_comment_datetime( $comment );
diff --git a/includes/geo/class-geo-provider-bing.php b/includes/geo/class-geo-provider-bing.php
index d9f7275..cb06ad7 100644
--- a/includes/geo/class-geo-provider-bing.php
+++ b/includes/geo/class-geo-provider-bing.php
@@ -170,5 +170,4 @@ public function geocode( $address ) {
return array_filter( $return );
}
-
}
diff --git a/includes/geo/class-geo-provider-geoapify.php b/includes/geo/class-geo-provider-geoapify.php
index f6388b2..cda05d6 100644
--- a/includes/geo/class-geo-provider-geoapify.php
+++ b/includes/geo/class-geo-provider-geoapify.php
@@ -12,6 +12,7 @@
*/
class Geo_Provider_GeoApify extends Geo_Provider_Pelias {
use Sloc_API_GeoApify;
+
/**
* Constructor for the Abstract Class.
*
diff --git a/includes/geo/class-geo-provider-here.php b/includes/geo/class-geo-provider-here.php
index 883946b..fdc1878 100644
--- a/includes/geo/class-geo-provider-here.php
+++ b/includes/geo/class-geo-provider-here.php
@@ -180,5 +180,4 @@ public function geocode( $address ) {
}
return $return;
}
-
}
diff --git a/includes/geo/class-geo-provider-mapquest.php b/includes/geo/class-geo-provider-mapquest.php
index 568402e..24a0a05 100644
--- a/includes/geo/class-geo-provider-mapquest.php
+++ b/includes/geo/class-geo-provider-mapquest.php
@@ -162,6 +162,4 @@ public function geocode( $address ) {
return array_filter( $return );
}
-
-
}
diff --git a/includes/geo/class-geo-provider-nominatim.php b/includes/geo/class-geo-provider-nominatim.php
index 88f0d90..46f8bfa 100644
--- a/includes/geo/class-geo-provider-nominatim.php
+++ b/includes/geo/class-geo-provider-nominatim.php
@@ -267,5 +267,4 @@ public function geocode( $address ) {
return array_filter( $return );
}
-
}
diff --git a/includes/geo/class-geo-provider-openmapquest.php b/includes/geo/class-geo-provider-openmapquest.php
index f687140..3826836 100644
--- a/includes/geo/class-geo-provider-openmapquest.php
+++ b/includes/geo/class-geo-provider-openmapquest.php
@@ -105,6 +105,4 @@ public function geocode( $address ) {
return array_filter( $return );
}
-
-
}
diff --git a/includes/geo/class-geo-provider-openroute.php b/includes/geo/class-geo-provider-openroute.php
index cee210c..490c8dd 100644
--- a/includes/geo/class-geo-provider-openroute.php
+++ b/includes/geo/class-geo-provider-openroute.php
@@ -12,6 +12,7 @@
*/
class Geo_Provider_OpenRoute extends Geo_Provider_Pelias {
use Sloc_API_OpenRoute;
+
/**
* Constructor for the Abstract Class.
*
diff --git a/includes/geo/class-geo-provider-pelias.php b/includes/geo/class-geo-provider-pelias.php
index 982b34e..bc7e5c6 100644
--- a/includes/geo/class-geo-provider-pelias.php
+++ b/includes/geo/class-geo-provider-pelias.php
@@ -272,4 +272,3 @@ public function geocode( $address ) {
return array_filter( $return );
}
}
-
diff --git a/includes/location/class-location-provider-address.php b/includes/location/class-location-provider-address.php
index c85d117..c978764 100644
--- a/includes/location/class-location-provider-address.php
+++ b/includes/location/class-location-provider-address.php
@@ -56,5 +56,4 @@ public function retrieve( $time = null, $args = array() ) {
$this->altitude = ifset( $address['altitude'] );
$this->annotation = ifset( $address['display_name'] );
}
-
}
diff --git a/includes/location/class-location-provider-airport.php b/includes/location/class-location-provider-airport.php
index 5ef6ec5..e5eb031 100644
--- a/includes/location/class-location-provider-airport.php
+++ b/includes/location/class-location-provider-airport.php
@@ -57,5 +57,4 @@ public function retrieve( $time = null, $args = array() ) {
$this->altitude = $airport['elevation'];
$this->annotation = $airport['name'];
}
-
}
diff --git a/includes/location/class-location-provider-compass.php b/includes/location/class-location-provider-compass.php
index 8474f9c..30ae1b2 100644
--- a/includes/location/class-location-provider-compass.php
+++ b/includes/location/class-location-provider-compass.php
@@ -100,7 +100,7 @@ public function query( $start, $end ) {
// Drop Altitude if present and round.
$response = array_map(
- function( $array ) {
+ function ( $array ) {
return array(
0 => clean_coordinate( $array[0] ),
1 => clean_coordinate( $array[1] ),
@@ -346,7 +346,4 @@ private function other( $properties ) {
)
);
}
-
-
}
-
diff --git a/includes/location/class-location-provider-dummy.php b/includes/location/class-location-provider-dummy.php
index a400944..966ce1b 100644
--- a/includes/location/class-location-provider-dummy.php
+++ b/includes/location/class-location-provider-dummy.php
@@ -30,6 +30,4 @@ public function retrieve( $time = null, $args = array() ) {
$this->$property = ifset( $location[ $property ] );
}
}
-
-
}
diff --git a/includes/map/class-map-provider-geoapify.php b/includes/map/class-map-provider-geoapify.php
index 9761ba6..961342f 100644
--- a/includes/map/class-map-provider-geoapify.php
+++ b/includes/map/class-map-provider-geoapify.php
@@ -107,5 +107,4 @@ public function get_the_map_url() {
public function get_the_map( $static = true ) {
return $this->get_the_static_map_html();
}
-
}
diff --git a/includes/map/class-map-provider-google.php b/includes/map/class-map-provider-google.php
index ca1a103..d819053 100644
--- a/includes/map/class-map-provider-google.php
+++ b/includes/map/class-map-provider-google.php
@@ -97,7 +97,4 @@ public function get_the_map_url() {
public function get_the_map( $static = true ) {
return $this->get_the_static_map_html();
}
-
}
-
-
diff --git a/includes/map/class-map-provider-here.php b/includes/map/class-map-provider-here.php
index 5387ffe..ad5c3c9 100644
--- a/includes/map/class-map-provider-here.php
+++ b/includes/map/class-map-provider-here.php
@@ -127,8 +127,6 @@ public function get_the_map_url() {
public function get_the_map( $static = true ) {
return $this->get_the_static_map_html();
}
-
}
register_sloc_provider( new Map_Provider_Here() );
-
diff --git a/includes/map/class-map-provider-locationiq.php b/includes/map/class-map-provider-locationiq.php
index fe4eef3..dd53083 100644
--- a/includes/map/class-map-provider-locationiq.php
+++ b/includes/map/class-map-provider-locationiq.php
@@ -81,5 +81,4 @@ public function get_the_map_url() {
public function get_the_map( $static = true ) {
return $this->get_the_static_map_html();
}
-
}
diff --git a/includes/map/class-map-provider-mapbox.php b/includes/map/class-map-provider-mapbox.php
index 519be8c..1074d9b 100644
--- a/includes/map/class-map-provider-mapbox.php
+++ b/includes/map/class-map-provider-mapbox.php
@@ -142,7 +142,5 @@ public function get_the_static_map() {
$this->api
);
return $map;
-
}
-
}
diff --git a/includes/map/class-map-provider-mapquest.php b/includes/map/class-map-provider-mapquest.php
index 84abe7a..a1e0cff 100644
--- a/includes/map/class-map-provider-mapquest.php
+++ b/includes/map/class-map-provider-mapquest.php
@@ -95,5 +95,4 @@ public function get_the_map_url() {
public function get_the_map( $static = true ) {
return $this->get_the_static_map_html();
}
-
}
diff --git a/includes/map/class-map-provider-staticmap.php b/includes/map/class-map-provider-staticmap.php
index 7894709..4198699 100644
--- a/includes/map/class-map-provider-staticmap.php
+++ b/includes/map/class-map-provider-staticmap.php
@@ -149,5 +149,4 @@ public function get_the_map_url() {
public function get_the_map( $static = true ) {
return $this->get_the_static_map_html();
}
-
}
diff --git a/includes/venue/class-venue-provider-google.php b/includes/venue/class-venue-provider-google.php
index 23bd472..44f196c 100644
--- a/includes/venue/class-venue-provider-google.php
+++ b/includes/venue/class-venue-provider-google.php
@@ -107,5 +107,4 @@ private function address_to_hcard( $data ) {
return $card;
}
-
}
diff --git a/includes/weather/class-weather-provider-meteostat.php b/includes/weather/class-weather-provider-meteostat.php
index 0543496..aef684a 100644
--- a/includes/weather/class-weather-provider-meteostat.php
+++ b/includes/weather/class-weather-provider-meteostat.php
@@ -12,11 +12,11 @@
*/
class Weather_Provider_Meteostat extends Weather_Provider {
- /**
- * Station Data.
- *
- * @var string
- */
+ /**
+ * Station Data.
+ *
+ * @var string
+ */
protected $station;
/**
@@ -93,7 +93,7 @@ public function get_conditions( $time = null ) {
}
usort(
$sitelist,
- function( $a, $b ) {
+ function ( $a, $b ) {
return $a['distance'] > $b['distance'];
}
);
@@ -286,6 +286,4 @@ public static function code_map( $code ) {
}
return '';
}
-
}
-
diff --git a/includes/weather/class-weather-provider-metoffice.php b/includes/weather/class-weather-provider-metoffice.php
index 40a09a8..0ebac66 100644
--- a/includes/weather/class-weather-provider-metoffice.php
+++ b/includes/weather/class-weather-provider-metoffice.php
@@ -125,7 +125,7 @@ public function get_conditions( $time = null ) {
}
usort(
$sitelist,
- function( $a, $b ) {
+ function ( $a, $b ) {
return $a['distance'] > $b['distance'];
}
);
@@ -325,4 +325,3 @@ public function get_station_data() {
return $return;
}
}
-
diff --git a/includes/weather/class-weather-provider-nwsus.php b/includes/weather/class-weather-provider-nwsus.php
index 399fa83..f48e639 100644
--- a/includes/weather/class-weather-provider-nwsus.php
+++ b/includes/weather/class-weather-provider-nwsus.php
@@ -98,7 +98,7 @@ public function get_conditions( $time = null ) {
}
usort(
$sitelist,
- function( $a, $b ) {
+ function ( $a, $b ) {
return $a['distance'] > $b['distance'];
}
);
@@ -249,20 +249,20 @@ private function phenomenon_code_map( $weather ) {
}
/*
- MetarPhenomenon{
+ MetarPhenomenon{
description:
An object representing a decoded METAR phenomenon string.
- intensity* string
+ intensity* string
nullable: trueEnum:
[ light, heavy ]
- modifier* string
+ modifier* string
nullable: trueEnum:
[ patches, blowing, low_drifting, freezing, shallow, partial, showers ]
- weather* stringEnum:
+ weather* stringEnum:
[ fog_mist, dust_storm, dust, drizzle, funnel_cloud, fog, smoke, hail, snow_pellets, haze, ice_crystals, ice_pellets, dust_whirls, spray, rain, sand, snow_grains, snow, squalls, sand_storm, thunderstorms, unknown, volcanic_ash ]
- rawString* string
- inVicinity boolean */
+ rawString* string
+ inVicinity boolean */
if ( 1 === count( $weather ) ) {
$weather = end( $weather );
@@ -349,4 +349,3 @@ private function phenomenon_code_map( $weather ) {
}
}
}
-
diff --git a/includes/weather/class-weather-provider-pirateweather.php b/includes/weather/class-weather-provider-pirateweather.php
index 760e3e8..f1f7523 100644
--- a/includes/weather/class-weather-provider-pirateweather.php
+++ b/includes/weather/class-weather-provider-pirateweather.php
@@ -172,5 +172,4 @@ private function code_map( $id ) {
return '';
}
}
-
}
diff --git a/includes/weather/class-weather-provider-station.php b/includes/weather/class-weather-provider-station.php
index 55b9ce4..7407800 100644
--- a/includes/weather/class-weather-provider-station.php
+++ b/includes/weather/class-weather-provider-station.php
@@ -210,7 +210,7 @@ public function get_conditions( $time = null ) {
}
usort(
$sitelist,
- function( $a, $b ) {
+ function ( $a, $b ) {
return $a['distance'] > $b['distance'];
}
);
diff --git a/includes/weather/class-weather-provider-visualcrossing.php b/includes/weather/class-weather-provider-visualcrossing.php
index d78ea2b..307c936 100644
--- a/includes/weather/class-weather-provider-visualcrossing.php
+++ b/includes/weather/class-weather-provider-visualcrossing.php
@@ -212,7 +212,7 @@ private function conditions_map( $id ) {
}
/*
- Return array of station data.
+ Return array of station data.
*
* @param string $id Weather type ID.
* @return string Icon ID.
diff --git a/includes/weather/class-weather-provider-weatherbit.php b/includes/weather/class-weather-provider-weatherbit.php
index befb3a3..27f6e29 100644
--- a/includes/weather/class-weather-provider-weatherbit.php
+++ b/includes/weather/class-weather-provider-weatherbit.php
@@ -144,4 +144,3 @@ public function get_conditions( $time = null ) {
return false;
}
}
-
diff --git a/includes/weather/class-weather-provider-weatherstack.php b/includes/weather/class-weather-provider-weatherstack.php
index 03935a5..efae0ae 100644
--- a/includes/weather/class-weather-provider-weatherstack.php
+++ b/includes/weather/class-weather-provider-weatherstack.php
@@ -193,4 +193,3 @@ private function code_map( $id ) {
}
}
}
-
diff --git a/includes/widgets/class-sloc-airport-widget.php b/includes/widgets/class-sloc-airport-widget.php
index 5ce2492..519cbb9 100755
--- a/includes/widgets/class-sloc-airport-widget.php
+++ b/includes/widgets/class-sloc-airport-widget.php
@@ -82,7 +82,6 @@ public function widget( $args, $instance ) {
}
echo wp_kses( self::weather_list( $weather, 'fa-plane', $instance ), Simple_Location_Plugin::kses_clean() );
echo wp_kses( $args['after_widget'], Simple_Location_Plugin::kses_clean() );
-
}
/**
diff --git a/simple-location.php b/simple-location.php
index 4eaba4b..ffe92b9 100755
--- a/simple-location.php
+++ b/simple-location.php
@@ -37,20 +37,20 @@
* @since 1.0.0
*/
class Simple_Location_Plugin {
- /**
- * Version number
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Version number
+ *
+ * @since 1.0.0
+ * @var string
+ */
public static $version;
- /**
- * Plugin Path
- *
- * @since 1.0.0
- * @var string
- */
+ /**
+ * Plugin Path
+ *
+ * @since 1.0.0
+ * @var string
+ */
public static $path;
@@ -534,5 +534,4 @@ public static function kses_clean() {
),
);
}
-
}
diff --git a/templates/elevation-form.php b/templates/elevation-form.php
index 7a4bf77..66196f4 100644
--- a/templates/elevation-form.php
+++ b/templates/elevation-form.php
@@ -17,7 +17,7 @@
printf( '', $key, $value['name'] ); // phpcs:ignore
}
?>
-
+
diff --git a/templates/geocode-form.php b/templates/geocode-form.php
index 5631bd1..ae032b3 100644
--- a/templates/geocode-form.php
+++ b/templates/geocode-form.php
@@ -20,7 +20,7 @@
printf( '', $key, $value['name'] ); // phpcs:ignore
}
?>
-
+
diff --git a/templates/loc-metabox.php b/templates/loc-metabox.php
index 778b2af..ff88ed4 100644
--- a/templates/loc-metabox.php
+++ b/templates/loc-metabox.php
@@ -87,7 +87,7 @@
+