diff --git a/tests/phpunit/wpmatomo/test-release.php b/tests/phpunit/wpmatomo/test-release.php index bfa7b97b8..b895c5261 100644 --- a/tests/phpunit/wpmatomo/test-release.php +++ b/tests/phpunit/wpmatomo/test-release.php @@ -47,12 +47,14 @@ public function get_needed_files() { public function test_latest_release_is_not_too_old() { $url = 'https://api.wordpress.org/plugins/info/1.0/matomo.json'; + + // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents $api_response = file_get_contents( $url ); $api_response = json_decode( $api_response, true ); - $last_updated = strtotime( $api_response['last_updated'] ); - $six_months_ago = (new DateTime('-6 months ago'))->getTimestamp(); + $last_updated = strtotime( $api_response['last_updated'] ); + $six_months_ago = ( new DateTime( '-6 months ago' ) )->getTimestamp(); - $this->assertLessThan($six_months_ago, $last_updated, "The last release of this plugins was over 6 months ago, another release is needed to show the plugin is not abandoned."); + $this->assertLessThan( $six_months_ago, $last_updated, 'The last release of this plugins was over 6 months ago, another release is needed to show the plugin is not abandoned.' ); } }