From 9ff845c1d2eee1f193e05482068d4d5445228037 Mon Sep 17 00:00:00 2001 From: Alex Cicovic <23142906+acicovic@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:35:28 +0200 Subject: [PATCH] Fix linting violations using `php lint --fix` --- CHANGELOG.md | 1 - src/@types/assets/window.d.ts | 1 - src/Telemetry/Tracks/class-tracks-pixel.php | 1 - src/content-helper/common/class-content-helper-feature.php | 1 - src/content-helper/common/components/input-range/style.scss | 2 -- .../editor-sidebar/performance-stats/performance-stats.scss | 1 - .../editor-sidebar/related-posts/related-posts.scss | 1 - src/rest-api/content-helper/class-endpoint-smart-linking.php | 2 -- src/rest-api/settings/class-base-settings-endpoint.php | 1 - src/services/class-base-api-service.php | 1 - .../content-api/endpoints/class-endpoint-analytics-posts.php | 1 - .../ContentHelper/ContentHelperPostListStatsTest.php | 4 ---- tests/Integration/RestAPI/BaseAPIControllerTest.php | 1 - .../RestAPI/ContentHelper/ContentHelperFeatureTestTrait.php | 1 - tests/Integration/UI/SettingsPageTest.php | 1 - wp-parsely.php | 1 - 16 files changed, 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 042696433..d66966c98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -281,7 +281,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initialize Parse.ly option before registering the setting ([#2001](https://github.com/Parsely/wp-parsely/pull/2001)) - ## [3.11.0](https://github.com/Parsely/wp-parsely/compare/3.10.0...3.11.0) - 2023-11-13 ### Added diff --git a/src/@types/assets/window.d.ts b/src/@types/assets/window.d.ts index 8b852763e..e0975f5bd 100644 --- a/src/@types/assets/window.d.ts +++ b/src/@types/assets/window.d.ts @@ -53,5 +53,4 @@ declare global { }; }; } - } diff --git a/src/Telemetry/Tracks/class-tracks-pixel.php b/src/Telemetry/Tracks/class-tracks-pixel.php index 619d420a8..1a82842a9 100644 --- a/src/Telemetry/Tracks/class-tracks-pixel.php +++ b/src/Telemetry/Tracks/class-tracks-pixel.php @@ -13,7 +13,6 @@ use Parsely\Utils\Utils; use WP_Error; - /** * Handles all operations related to the Tracks pixel. * diff --git a/src/content-helper/common/class-content-helper-feature.php b/src/content-helper/common/class-content-helper-feature.php index 83c6f04b7..dae656c78 100644 --- a/src/content-helper/common/class-content-helper-feature.php +++ b/src/content-helper/common/class-content-helper-feature.php @@ -73,7 +73,6 @@ abstract public static function get_style_id(): string; */ abstract public function run(): void; - /** * Examines filters and conditions to determine whether the feature can be * enabled. diff --git a/src/content-helper/common/components/input-range/style.scss b/src/content-helper/common/components/input-range/style.scss index 025a427ef..7fa799a3b 100644 --- a/src/content-helper/common/components/input-range/style.scss +++ b/src/content-helper/common/components/input-range/style.scss @@ -53,6 +53,4 @@ } } } - - } diff --git a/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss b/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss index 5d48d96aa..6dca2ab7f 100644 --- a/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss +++ b/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss @@ -143,7 +143,6 @@ } } - // Multi-percentage bar. div.multi-percentage-bar { position: relative; diff --git a/src/content-helper/editor-sidebar/related-posts/related-posts.scss b/src/content-helper/editor-sidebar/related-posts/related-posts.scss index b49d45604..a829d0f51 100644 --- a/src/content-helper/editor-sidebar/related-posts/related-posts.scss +++ b/src/content-helper/editor-sidebar/related-posts/related-posts.scss @@ -125,7 +125,6 @@ } } - .related-posts-list { display: flex; padding: to_rem(6px) 0 var(--grid-unit-20) 0; diff --git a/src/rest-api/content-helper/class-endpoint-smart-linking.php b/src/rest-api/content-helper/class-endpoint-smart-linking.php index b2d45735f..5199408ea 100644 --- a/src/rest-api/content-helper/class-endpoint-smart-linking.php +++ b/src/rest-api/content-helper/class-endpoint-smart-linking.php @@ -276,7 +276,6 @@ public function get_smart_links( WP_REST_Request $request ): WP_REST_Response { return new WP_REST_Response( array( 'data' => $response ), 200 ); } - /** * API Endpoint: POST /smart-linking/{post_id}/add. * @@ -475,7 +474,6 @@ public function set_smart_links( WP_REST_Request $request ): WP_REST_Response { return new WP_REST_Response( array( 'data' => $response ), 200 ); } - /** * API Endpoint: POST /smart-linking/url-to-post-type. * diff --git a/src/rest-api/settings/class-base-settings-endpoint.php b/src/rest-api/settings/class-base-settings-endpoint.php index e4c47bf4b..1d225ab4e 100644 --- a/src/rest-api/settings/class-base-settings-endpoint.php +++ b/src/rest-api/settings/class-base-settings-endpoint.php @@ -388,7 +388,6 @@ protected function get_default( array $keys ) { return $current; // Return default value for valid key path. } - /** * Gets the specifications for nested settings based on a composite key. * diff --git a/src/services/class-base-api-service.php b/src/services/class-base-api-service.php index 4a1697e68..1af1e5c71 100644 --- a/src/services/class-base-api-service.php +++ b/src/services/class-base-api-service.php @@ -39,7 +39,6 @@ abstract class Base_API_Service { */ private $parsely; - /** * Initializes the class. * diff --git a/src/services/content-api/endpoints/class-endpoint-analytics-posts.php b/src/services/content-api/endpoints/class-endpoint-analytics-posts.php index b8ebc6168..903613574 100644 --- a/src/services/content-api/endpoints/class-endpoint-analytics-posts.php +++ b/src/services/content-api/endpoints/class-endpoint-analytics-posts.php @@ -153,7 +153,6 @@ public function call( array $args = array() ) { return $this->request( 'GET', $query_args ); } - /** * Appends multiple parameters to the URL. * diff --git a/tests/Integration/ContentHelper/ContentHelperPostListStatsTest.php b/tests/Integration/ContentHelper/ContentHelperPostListStatsTest.php index 276d27c37..a544827ed 100644 --- a/tests/Integration/ContentHelper/ContentHelperPostListStatsTest.php +++ b/tests/Integration/ContentHelper/ContentHelperPostListStatsTest.php @@ -285,7 +285,6 @@ public function test_parsely_stats_column_visibility_on_empty_plugin_options(): self::assertNotContains( self::$parsely_stats_column_header, $this->get_admin_columns() ); } - /** * Verifies Parse.ly Stats column visibility. * @@ -503,7 +502,6 @@ public function test_content_of_parsely_stats_column_on_valid_posts(): void { ); } - /** * Verifies content of Parse.ly Stats column. * @@ -768,7 +766,6 @@ private function mock_parsely_stats_response( ?array $return_value ): Post_List_ return $obj; } - /** * Verifies Parse.ly API call and enqueued status of Parse.ly Stats script. * @@ -1201,7 +1198,6 @@ public function test_parsely_stats_response_on_valid_post_type_and_having_data_f ); } - /** * Verifies Parse.ly Stats response. * diff --git a/tests/Integration/RestAPI/BaseAPIControllerTest.php b/tests/Integration/RestAPI/BaseAPIControllerTest.php index 4211b10bb..f98c0442a 100644 --- a/tests/Integration/RestAPI/BaseAPIControllerTest.php +++ b/tests/Integration/RestAPI/BaseAPIControllerTest.php @@ -220,7 +220,6 @@ public function test_register_multiple_endpoints(): void { ->method( 'get_endpoint_slug' ) ->willReturn( 'test2' ); - $this->test_controller->testable_register_endpoints( array( $endpoint1, $endpoint2 ) ); // @phpstan-ignore-line $endpoints = $this->test_controller->get_endpoints(); diff --git a/tests/Integration/RestAPI/ContentHelper/ContentHelperFeatureTestTrait.php b/tests/Integration/RestAPI/ContentHelper/ContentHelperFeatureTestTrait.php index 1493ee0ca..d91f66778 100644 --- a/tests/Integration/RestAPI/ContentHelper/ContentHelperFeatureTestTrait.php +++ b/tests/Integration/RestAPI/ContentHelper/ContentHelperFeatureTestTrait.php @@ -178,7 +178,6 @@ public function test_is_available_to_current_user_returns_error_if_no_permission self::assertInstanceOf( WP_Error::class, $this->get_endpoint()->is_available_to_current_user( new WP_REST_Request() ) ); } - /** * Tests that the endpoint is not available to the current user, since the user is not logged in. * diff --git a/tests/Integration/UI/SettingsPageTest.php b/tests/Integration/UI/SettingsPageTest.php index b838eeeac..10392af73 100644 --- a/tests/Integration/UI/SettingsPageTest.php +++ b/tests/Integration/UI/SettingsPageTest.php @@ -660,7 +660,6 @@ function () use ( $badge_options ) { self::expectOutputContains( $expected_html ); } - /** * Mocks a success response from the API credentials validation endpoint. * diff --git a/wp-parsely.php b/wp-parsely.php index 08beefe75..c04e76b64 100644 --- a/wp-parsely.php +++ b/wp-parsely.php @@ -60,7 +60,6 @@ // Load Telemetry classes. require_once __DIR__ . '/src/Telemetry/telemetry-init.php'; - add_action( 'plugins_loaded', __NAMESPACE__ . '\\parsely_initialize_plugin' ); /** * Registers the basic classes to initialize the plugin.