diff --git a/lib/Polyline.php b/lib/Polyline.php index 7ff6e44..df6ec7e 100755 --- a/lib/Polyline.php +++ b/lib/Polyline.php @@ -103,10 +103,10 @@ class Polyline { */ final public static function decode( $string ) { $points = array(); - $index = $i = 0; + $index = $i = 0; // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found $previous = array( 0, 0 ); - while ( $i < strlen( $string ) ) { - $shift = $result = 0x00; + while ( $i < strlen( $string ) ) { // phpcs:ignore Squiz.PHP.DisallowSizeFunctionsInLoops.Found + $shift = $result = 0x00; // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found do { $bit = ord( substr( $string, $i++ ) ) - 63; $result |= ( $bit & 0x1f ) << $shift; diff --git a/lib/WPStrava/API.php b/lib/WPStrava/API.php index f30b395..0274eb1 100755 --- a/lib/WPStrava/API.php +++ b/lib/WPStrava/API.php @@ -30,7 +30,7 @@ class WPStrava_API { return $response; } - if ( 200 != $response['response']['code'] ) { + if ( 200 != $response['response']['code'] ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison // See if there's useful info in the body. $body = json_decode( $response['body'] ); @@ -74,14 +74,14 @@ class WPStrava_API { return $response; } - if ( 200 != $response['response']['code'] ) { + if ( 200 != $response['response']['code'] ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison // See if there's useful info in the body. $body = json_decode( $response['body'] ); $error = ''; if ( ! empty( $body->error ) ) { $error = $body->error; - } elseif ( 503 == $response['response']['code'] ) { + } elseif ( 503 == $response['response']['code'] ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison $error = __( 'Strava Temporarily Unavailable', 'wp-strava' ); } else { $error = print_r( $response, true ); // phpcs:ignore -- Debug output. diff --git a/lib/WPStrava/LatestMapWidget.php b/lib/WPStrava/LatestMapWidget.php index 79c648c..794d269 100644 --- a/lib/WPStrava/LatestMapWidget.php +++ b/lib/WPStrava/LatestMapWidget.php @@ -115,13 +115,13 @@ class WPStrava_LatestMapWidget extends WP_Widget { // Compare transient (temporary storage) to option (more permenant). // If the option isn't set or the transient is different, update the option. - if ( empty( $activity_option->id ) || $activity->id != $activity_option->id ) { + if ( empty( $activity_option->id ) || $activity->id != $activity_option->id ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison $build_new = true; $this->update_activity( $id, $activity ); } // Update the transient if it needs updating. - if ( empty( $activity_transient->id ) || $activity->id != $activity_transient->id ) { + if ( empty( $activity_transient->id ) || $activity->id != $activity_transient->id ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison $this->update_activity_transient( $id, $activity ); } }