Skip to content

Commit 783c7a4

Browse files
committed
Minor fixes uncovered by codesniffing
1 parent 367cac2 commit 783c7a4

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

includes/class-weather-provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public static function markup_value( $property, $value, $args = array() ) {
236236
'round' => false, // False to round to 2 digits, true to round to integer, a numeric value to round to a specific precision.
237237
);
238238
$args = wp_parse_args( $args, $defaults );
239-
$args['units'] = ( $args['units'] === 'imperial' );
239+
$args['units'] = ( 'imperial' === $args['units'] );
240240
$params = self::get_names( $property, $args['units'] );
241241
if ( ! $params ) {
242242
return '';

includes/trait-weather-info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public static function weather_condition_codes( $code = null ) {
399399
'626' => __( 'Diamond dust', 'simple-location' ),
400400
/* Atmosphere */
401401
'701' => __( 'mist', 'simple-location' ),
402-
'702' => __( 'Frost', 'simple-locaiton' ),
402+
'702' => __( 'Frost', 'simple-location' ),
403403
'703' => __( 'Icy', 'simple-location' ),
404404
'711' => __( 'Smoke', 'simple-location' ),
405405
'721' => __( 'Haze', 'simple-location' ),

includes/weather/class-weather-provider-meteostat.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ public function get_conditions( $time = null ) {
8383
}
8484

8585
$file = trailingslashit( Simple_Location_Plugin::$path ) . 'data/meteostat.json';
86-
if ( ! file_exists( $file ) ) {
86+
if ( ! sloc_file_exists( $file ) ) {
8787
return new WP_Error( 'filesystem_error', "File doesn't exist", wp_json_encode( $file ) );
8888
}
89-
$data = file_get_contents( $file );
89+
$data = sloc_get_contents( $file );
9090
$sitelist = json_decode( $data, true );
9191
foreach ( $sitelist as $key => $value ) {
9292
$sitelist[ $key ]['distance'] = round( geo_distance( $this->latitude, $this->longitude, $value['location']['latitude'], $value['location']['longitude'] ) );

simple-location.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,6 @@ public static function kses_clean() {
459459

460460
),
461461
'li' => array(
462-
'class' => array(),
463-
'id' => array(),
464462
'class' => array(),
465463
'id' => array(),
466464
'title' => array(),

0 commit comments

Comments
 (0)