';
$out .= $message;
@@ -429,9 +427,7 @@ private function normalize_options( $options ) {
}
// Set to the id of the current user if not supplied.
- if ( $options['user_id'] === null ) {
- $options['user_id'] = get_current_user_id();
- }
+ $options['user_id'] ??= get_current_user_id();
return $options;
}
diff --git a/admin/class-yoast-notifications.php b/admin/class-yoast-notifications.php
index c3847e01f43..87c41a8ec70 100644
--- a/admin/class-yoast-notifications.php
+++ b/admin/class-yoast-notifications.php
@@ -159,7 +159,7 @@ private function output_ajax_response( $type ) {
[
'html' => $html,
'total' => self::get_active_notification_count(),
- ]
+ ],
);
// phpcs:enable -- Reason: WPSEO_Utils::format_json_encode is safe.
}
diff --git a/admin/class-yoast-plugin-conflict.php b/admin/class-yoast-plugin-conflict.php
index 838d8a70a73..48ab13f8b00 100644
--- a/admin/class-yoast-plugin-conflict.php
+++ b/admin/class-yoast-plugin-conflict.php
@@ -102,9 +102,7 @@ public function check_for_conflicts( $plugin_section ) {
return false;
}
- if ( $sections_checked === null ) {
- $sections_checked = [];
- }
+ $sections_checked ??= [];
if ( ! in_array( $plugin_section, $sections_checked, true ) ) {
$sections_checked[] = $plugin_section;
@@ -194,8 +192,8 @@ protected function set_error( $plugin_section, $readable_plugin_section ) {
[
'type' => Yoast_Notification::ERROR,
'id' => 'wpseo-conflict-' . $identifier,
- ]
- )
+ ],
+ ),
);
}
}
diff --git a/admin/exceptions/class-file-size-exception.php b/admin/exceptions/class-file-size-exception.php
index 3deddbe215b..addbed6390d 100644
--- a/admin/exceptions/class-file-size-exception.php
+++ b/admin/exceptions/class-file-size-exception.php
@@ -21,7 +21,7 @@ public static function externally_hosted( $file_url ) {
$message = sprintf(
/* translators: %1$s expands to the requested url */
__( 'Cannot get the size of %1$s because it is hosted externally.', 'wordpress-seo' ),
- $file_url
+ $file_url,
);
return new self( $message );
@@ -38,7 +38,7 @@ public static function unknown_error( $file_url ) {
$message = sprintf(
/* translators: %1$s expands to the requested url */
__( 'Cannot get the size of %1$s because of unknown reasons.', 'wordpress-seo' ),
- $file_url
+ $file_url,
);
return new self( $message );
diff --git a/admin/filters/class-abstract-post-filter.php b/admin/filters/class-abstract-post-filter.php
index 08232076870..6c772504ce2 100644
--- a/admin/filters/class-abstract-post-filter.php
+++ b/admin/filters/class-abstract-post-filter.php
@@ -95,7 +95,7 @@ public function enqueue_explanation_assets() {
$asset_manager->localize_script(
'filter-explanation',
'yoastFilterExplanation',
- [ 'text' => $explanation ]
+ [ 'text' => $explanation ],
);
}
@@ -112,7 +112,7 @@ public function add_filter_link( $views ) {
esc_url( $this->get_filter_url() ),
( $this->is_filter_active() ) ? ' class="current" aria-current="page"' : '',
$this->get_label(),
- $this->get_post_total()
+ $this->get_post_total(),
);
return $views;
diff --git a/admin/filters/class-cornerstone-filter.php b/admin/filters/class-cornerstone-filter.php
index 198312899d3..f57b6584c3c 100644
--- a/admin/filters/class-cornerstone-filter.php
+++ b/admin/filters/class-cornerstone-filter.php
@@ -51,7 +51,7 @@ public function filter_posts( $where ) {
$where .= $wpdb->prepare(
" AND {$wpdb->posts}.ID IN ( SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND meta_value = '1' ) ",
- WPSEO_Meta::$meta_prefix . self::META_NAME
+ WPSEO_Meta::$meta_prefix . self::META_NAME,
);
}
@@ -104,7 +104,7 @@ protected function get_explanation() {
__( 'Mark the most important %1$s as \'cornerstone content\' to improve your site structure. %2$sLearn more about cornerstone content%3$s.', 'wordpress-seo' ),
strtolower( $post_type_object->labels->name ),
'',
- ''
+ '',
);
}
@@ -124,8 +124,8 @@ protected function get_post_total() {
meta_key = %s AND meta_value = '1'
",
$this->get_current_post_type(),
- WPSEO_Meta::$meta_prefix . self::META_NAME
- )
+ WPSEO_Meta::$meta_prefix . self::META_NAME,
+ ),
);
}
diff --git a/admin/google_search_console/views/gsc-display.php b/admin/google_search_console/views/gsc-display.php
index 510831c2ed0..c11de080357 100644
--- a/admin/google_search_console/views/gsc-display.php
+++ b/admin/google_search_console/views/gsc-display.php
@@ -31,14 +31,14 @@
/* Translators: %1$s: expands to opening anchor tag, %2$s expands to closing anchor tag. */
__( 'Google has discontinued its Crawl Errors API. Therefore, any possible crawl errors you might have cannot be displayed here anymore. %1$sRead our statement on this for further information%2$s.', 'wordpress-seo' ),
'',
- WPSEO_Admin_Utils::get_new_tab_message() . ''
+ WPSEO_Admin_Utils::get_new_tab_message() . '',
);
$gsc_notification .= '
';
$gsc_notification .= sprintf(
/* Translators: %1$s: expands to opening anchor tag, %2$s expands to closing anchor tag. */
__( 'To view your current crawl errors, %1$splease visit Google Search Console%2$s.', 'wordpress-seo' ),
'',
- WPSEO_Admin_Utils::get_new_tab_message() . ''
+ WPSEO_Admin_Utils::get_new_tab_message() . '',
);
?>
diff --git a/admin/google_search_console/views/gsc-redirect-nopremium.php b/admin/google_search_console/views/gsc-redirect-nopremium.php
index 2db6442beb2..39cd8ecbf05 100644
--- a/admin/google_search_console/views/gsc-redirect-nopremium.php
+++ b/admin/google_search_console/views/gsc-redirect-nopremium.php
@@ -13,7 +13,7 @@
printf(
/* Translators: %s: expands to Yoast SEO Premium */
esc_html__( 'Creating redirects is a %s feature', 'wordpress-seo' ),
- 'Yoast SEO Premium'
+ 'Yoast SEO Premium',
);
echo '';
echo '
';
@@ -21,7 +21,7 @@
/* Translators: %1$s: expands to 'Yoast SEO Premium', %2$s: links to Yoast SEO Premium plugin page. */
esc_html__( 'To be able to create a redirect and fix this issue, you need %1$s. You can buy the plugin, including one year of support and updates, on %2$s.', 'wordpress-seo' ),
'Yoast SEO Premium',
- 'yoast.com'
+ 'yoast.com',
);
echo '
';
}
diff --git a/admin/metabox/class-metabox.php b/admin/metabox/class-metabox.php
index 19922ebc5a2..a671adce05a 100644
--- a/admin/metabox/class-metabox.php
+++ b/admin/metabox/class-metabox.php
@@ -131,7 +131,7 @@ public function internet_explorer_metabox() {
$post_type,
'normal',
apply_filters( 'wpseo_metabox_prio', 'high' ),
- [ '__block_editor_compatible_meta_box' => true ]
+ [ '__block_editor_compatible_meta_box' => true ],
);
}
}
@@ -148,7 +148,7 @@ public function render_internet_explorer_notice() {
'',
'',
'',
- ''
+ '',
);
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped above.
@@ -202,7 +202,7 @@ public static function translate_meta_boxes() {
/* translators: 1: link open tag; 2: link close tag. */
__( 'The canonical URL that this page should point to. Leave empty to default to permalink. %1$sCross domain canonical%2$s supported too.', 'wordpress-seo' ),
'',
- WPSEO_Admin_Utils::get_new_tab_message() . ''
+ WPSEO_Admin_Utils::get_new_tab_message() . '',
);
WPSEO_Meta::$meta_fields['advanced']['redirect']['title'] = __( '301 Redirect', 'wordpress-seo' );
@@ -251,7 +251,7 @@ public function add_meta_box() {
$post_type,
'normal',
apply_filters( 'wpseo_metabox_prio', 'high' ),
- [ '__block_editor_compatible_meta_box' => true ]
+ [ '__block_editor_compatible_meta_box' => true ],
);
}
}
@@ -278,7 +278,7 @@ public function get_metabox_script_data() {
$permalink = $this->get_permalink();
$post_formatter = new WPSEO_Metabox_Formatter(
- new WPSEO_Post_Metabox_Formatter( $this->get_metabox_post(), [], $permalink )
+ new WPSEO_Post_Metabox_Formatter( $this->get_metabox_post(), [], $permalink ),
);
$values = $post_formatter->get_values();
@@ -422,7 +422,7 @@ private function get_tabs() {
$tabs[] = new WPSEO_Metabox_Section_React(
'schema',
'' . __( 'Schema', 'wordpress-seo' ),
- ''
+ '',
);
}
@@ -433,7 +433,7 @@ private function get_tabs() {
'',
[
'html_after' => '',
- ]
+ ],
);
}
@@ -484,7 +484,7 @@ protected function get_additional_tabs() {
$tab['name'],
$tab['link_content'],
$tab['content'],
- $options
+ $options,
);
}
}
@@ -726,7 +726,7 @@ public function save_postdata( $post_id ) {
WPSEO_Meta::get_meta_field_defs( 'general', $post->post_type ),
WPSEO_Meta::get_meta_field_defs( 'advanced' ),
$social_fields,
- WPSEO_Meta::get_meta_field_defs( 'schema', $post->post_type )
+ WPSEO_Meta::get_meta_field_defs( 'schema', $post->post_type ),
);
foreach ( $meta_boxes as $key => $meta_box ) {
@@ -1101,7 +1101,7 @@ private function get_custom_fields_replace_vars( $post ) {
[
$meta->presentation->title,
$meta->presentation->meta_description,
- ]
+ ],
);
preg_match_all( '/%%cf_([A-Za-z0-9_]+)%%/', $replace_vars_fields, $matches );
diff --git a/admin/notifiers/dismissible-notification.php b/admin/notifiers/dismissible-notification.php
index 84a608babd9..c0e89f2d10f 100644
--- a/admin/notifiers/dismissible-notification.php
+++ b/admin/notifiers/dismissible-notification.php
@@ -121,6 +121,6 @@ protected function set_dismissal_state() {
*/
protected function redirect_to_dashboard() {
wp_safe_redirect( admin_url( 'admin.php?page=wpseo_dashboard' ) );
- exit;
+ exit();
}
}
diff --git a/admin/pages/network.php b/admin/pages/network.php
index 829282725ac..0b182df9af0 100644
--- a/admin/pages/network.php
+++ b/admin/pages/network.php
@@ -25,8 +25,8 @@
__( 'Crawl settings', 'wordpress-seo' ),
[
'save_button' => true,
- ]
- )
+ ],
+ ),
);
$network_tabs->add_tab( new WPSEO_Option_Tab( 'restore-site', __( 'Restore Site', 'wordpress-seo' ), [ 'save_button' => false ] ) );
$network_tabs->display( $yform );
diff --git a/admin/pages/tools.php b/admin/pages/tools.php
index e4b5d31b241..47a23d82a79 100644
--- a/admin/pages/tools.php
+++ b/admin/pages/tools.php
@@ -47,7 +47,7 @@
printf(
/* translators: %1$s expands to Yoast SEO */
esc_html__( '%1$s comes with some very powerful built-in tools:', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
echo '';
diff --git a/admin/roles/class-role-manager-factory.php b/admin/roles/class-role-manager-factory.php
index d22753a24be..bbe8cff126e 100644
--- a/admin/roles/class-role-manager-factory.php
+++ b/admin/roles/class-role-manager-factory.php
@@ -18,9 +18,7 @@ class WPSEO_Role_Manager_Factory {
public static function get() {
static $manager = null;
- if ( $manager === null ) {
- $manager = new WPSEO_Role_Manager_WP();
- }
+ $manager ??= new WPSEO_Role_Manager_WP();
return $manager;
}
diff --git a/admin/services/class-file-size.php b/admin/services/class-file-size.php
index 5b093e4820a..8f648e4fc25 100644
--- a/admin/services/class-file-size.php
+++ b/admin/services/class-file-size.php
@@ -26,7 +26,7 @@ public function get( WP_REST_Request $request ) {
'type' => 'success',
'size_in_bytes' => $this->get_file_size( $file_url ),
],
- 200
+ 200,
);
} catch ( WPSEO_File_Size_Exception $exception ) {
return new WP_REST_Response(
@@ -34,7 +34,7 @@ public function get( WP_REST_Request $request ) {
'type' => 'failure',
'response' => $exception->getMessage(),
],
- 404
+ 404,
);
}
}
@@ -99,7 +99,7 @@ protected function calculate_file_size( $file_url ) {
return WPSEO_Image_Utils::get_file_size(
[
'path' => $file_url,
- ]
+ ],
);
}
}
diff --git a/admin/statistics/class-statistics-service.php b/admin/statistics/class-statistics-service.php
index 352e29e02ea..161b3d67407 100644
--- a/admin/statistics/class-statistics-service.php
+++ b/admin/statistics/class-statistics-service.php
@@ -209,22 +209,22 @@ private function labels() {
/* translators: %1$s expands to an opening strong tag, %2$s expands to a closing strong tag */
__( 'Posts %1$swithout%2$s a focus keyphrase', 'wordpress-seo' ),
'',
- ''
+ '',
),
WPSEO_Rank::BAD => sprintf(
/* translators: %s expands to the score */
__( 'Posts with the SEO score: %s', 'wordpress-seo' ),
- '' . __( 'Needs improvement', 'wordpress-seo' ) . ''
+ '' . __( 'Needs improvement', 'wordpress-seo' ) . '',
),
WPSEO_Rank::OK => sprintf(
/* translators: %s expands to the score */
__( 'Posts with the SEO score: %s', 'wordpress-seo' ),
- '' . __( 'OK', 'wordpress-seo' ) . ''
+ '' . __( 'OK', 'wordpress-seo' ) . '',
),
WPSEO_Rank::GOOD => sprintf(
/* translators: %s expands to the score */
__( 'Posts with the SEO score: %s', 'wordpress-seo' ),
- '' . __( 'Good', 'wordpress-seo' ) . ''
+ '' . __( 'Good', 'wordpress-seo' ) . '',
),
WPSEO_Rank::NO_INDEX => __( 'Posts that should not show up in search results', 'wordpress-seo' ),
];
diff --git a/admin/taxonomy/class-taxonomy-fields.php b/admin/taxonomy/class-taxonomy-fields.php
index 9da698ef4a3..d4801f2e5a8 100644
--- a/admin/taxonomy/class-taxonomy-fields.php
+++ b/admin/taxonomy/class-taxonomy-fields.php
@@ -209,7 +209,7 @@ protected function get_social_fields() {
'options' => '',
'hide' => false,
],
- ]
+ ],
);
}
diff --git a/admin/taxonomy/class-taxonomy-metabox.php b/admin/taxonomy/class-taxonomy-metabox.php
index 67890f391f7..4a615515275 100644
--- a/admin/taxonomy/class-taxonomy-metabox.php
+++ b/admin/taxonomy/class-taxonomy-metabox.php
@@ -160,7 +160,7 @@ private function get_tabs() {
'',
[
'html_after' => '',
- ]
+ ],
);
}
@@ -209,7 +209,7 @@ protected function get_additional_tabs() {
$tab['name'],
$tab['link_content'],
$tab['content'],
- $options
+ $options,
);
}
}
diff --git a/admin/taxonomy/class-taxonomy.php b/admin/taxonomy/class-taxonomy.php
index a63d3778d05..75794430232 100644
--- a/admin/taxonomy/class-taxonomy.php
+++ b/admin/taxonomy/class-taxonomy.php
@@ -114,7 +114,7 @@ private function show_internet_explorer_notice() {
'',
'',
'',
- ''
+ '',
);
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped above.
echo new Alert_Presenter( $content );
@@ -299,7 +299,7 @@ public function localize_term_scraper_script( $term_id ) {
$taxonomy = get_taxonomy( $term->taxonomy );
$term_formatter = new WPSEO_Metabox_Formatter(
- new WPSEO_Term_Metabox_Formatter( $taxonomy, $term )
+ new WPSEO_Term_Metabox_Formatter( $taxonomy, $term ),
);
return $term_formatter->get_values();
diff --git a/admin/views/class-yoast-feature-toggles.php b/admin/views/class-yoast-feature-toggles.php
index 14aca6b9e6c..7785510f5d9 100644
--- a/admin/views/class-yoast-feature-toggles.php
+++ b/admin/views/class-yoast-feature-toggles.php
@@ -36,9 +36,7 @@ class Yoast_Feature_Toggles {
* @return self Main instance.
*/
public static function instance() {
- if ( self::$instance === null ) {
- self::$instance = new self();
- }
+ self::$instance ??= new self();
return self::$instance;
}
@@ -49,9 +47,7 @@ public static function instance() {
* @return array List of sorted Yoast_Feature_Toggle instances.
*/
public function get_all() {
- if ( $this->toggles === null ) {
- $this->toggles = $this->load_toggles();
- }
+ $this->toggles ??= $this->load_toggles();
return $this->toggles;
}
@@ -157,7 +153,7 @@ protected function load_toggles() {
/* translators: 1: Yoast SEO, 2: translated version of "Off" */
__( 'The advanced section of the %1$s meta box allows a user to remove posts from the search results or change the canonical. The settings in the schema tab allows a user to change schema meta data for a post. These are things you might not want any author to do. That\'s why, by default, only editors and administrators can do this. Setting to "%2$s" allows all users to change these settings.', 'wordpress-seo' ),
'Yoast SEO',
- __( 'Off', 'wordpress-seo' )
+ __( 'Off', 'wordpress-seo' ),
),
'order' => 90,
],
@@ -168,7 +164,7 @@ protected function load_toggles() {
'read_more_label' => sprintf(
/* translators: 1: Yoast SEO */
__( 'Allow us to track some data about your site to improve our plugin.', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
),
'read_more_url' => 'https://yoa.st/usage-tracking-2',
'order' => 95,
@@ -179,7 +175,7 @@ protected function load_toggles() {
'label' => sprintf(
/* translators: 1: Yoast SEO */
__( 'This %1$s REST API endpoint gives you all the metadata you need for a specific URL. This will make it very easy for headless WordPress sites to use %1$s for all their SEO meta output.', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
),
'order' => 100,
],
@@ -239,7 +235,7 @@ protected function sitemaps_toggle_after() {
$alert = new Alert_Presenter(
/* translators: %1$s: expands to an opening anchor tag, %2$s: expands to a closing anchor tag */
sprintf( esc_html__( 'Disabling Yoast SEO\'s XML sitemaps will not disable WordPress\' core sitemaps. In some cases, this %1$s may result in SEO errors on your site%2$s. These may be reported in Google Search Console and other tools.', 'wordpress-seo' ), '', '' ),
- 'warning'
+ 'warning',
);
$out .= $alert->present();
$out .= '
';
diff --git a/admin/views/class-yoast-integration-toggles.php b/admin/views/class-yoast-integration-toggles.php
index ac66ee0f016..20bdb2216b7 100644
--- a/admin/views/class-yoast-integration-toggles.php
+++ b/admin/views/class-yoast-integration-toggles.php
@@ -33,9 +33,7 @@ class Yoast_Integration_Toggles {
* @return self Main instance.
*/
public static function instance() {
- if ( self::$instance === null ) {
- self::$instance = new self();
- }
+ self::$instance ??= new self();
return self::$instance;
}
@@ -46,9 +44,7 @@ public static function instance() {
* @return array List of sorted Yoast_Feature_Toggle instances.
*/
public function get_all() {
- if ( $this->toggles === null ) {
- $this->toggles = $this->load_toggles();
- }
+ $this->toggles ??= $this->load_toggles();
return $this->toggles;
}
@@ -69,7 +65,7 @@ protected function load_toggles() {
'label' => sprintf(
/* translators: %s: 'Semrush' */
__( 'The %s integration offers suggestions and insights for keywords related to the entered focus keyphrase.', 'wordpress-seo' ),
- 'Semrush'
+ 'Semrush',
),
'order' => 10,
],
diff --git a/admin/views/js-templates-primary-term.php b/admin/views/js-templates-primary-term.php
index 684ef87d52b..8947faec111 100644
--- a/admin/views/js-templates-primary-term.php
+++ b/admin/views/js-templates-primary-term.php
@@ -19,13 +19,13 @@
$yoast_free_js_button_label = sprintf(
$yoast_free_js_button_label,
'{{data.term}}',
- '{{data.taxonomy.title}}'
+ '{{data.taxonomy.title}}',
);
printf(
'',
esc_attr( $yoast_free_js_button_label ),
- esc_html__( 'Make primary', 'wordpress-seo' )
+ esc_html__( 'Make primary', 'wordpress-seo' ),
);
?>
@@ -38,7 +38,7 @@
$yoast_free_js_taxonomy_title = __( 'Primary %s', 'wordpress-seo' );
$yoast_free_js_taxonomy_title = sprintf(
'(' . $yoast_free_js_taxonomy_title . ')',
- '{{data.taxonomy.title}}'
+ '{{data.taxonomy.title}}',
);
?>
diff --git a/admin/views/paper-collapsible.php b/admin/views/paper-collapsible.php
index e8e3fea4f17..ae2e4ece6a4 100644
--- a/admin/views/paper-collapsible.php
+++ b/admin/views/paper-collapsible.php
@@ -44,7 +44,7 @@ class=""get_button_html(),
esc_html( $title ) . wp_kses_post( $title_after ),
- wp_kses_post( $collapsible_config['toggle_icon'] )
+ wp_kses_post( $collapsible_config['toggle_icon'] ),
);
}
else {
@@ -72,7 +72,7 @@ class=""
diff --git a/admin/views/partial-notifications-errors.php b/admin/views/partial-notifications-errors.php
index 8ec3c30faf4..ee9c92d1a58 100644
--- a/admin/views/partial-notifications-errors.php
+++ b/admin/views/partial-notifications-errors.php
@@ -23,7 +23,7 @@
$yoast_seo_i18n_muted_issues_title = sprintf(
/* translators: %d expands the amount of hidden notifications. */
_n( 'You have %d hidden notification:', 'You have %d hidden notifications:', $yoast_seo_dismissed_total, 'wordpress-seo' ),
- $yoast_seo_dismissed_total
+ $yoast_seo_dismissed_total,
);
require WPSEO_PATH . 'admin/views/partial-notifications-template.php';
diff --git a/admin/views/partial-notifications-template.php b/admin/views/partial-notifications-template.php
index c09dca5b291..7277f61d618 100644
--- a/admin/views/partial-notifications-template.php
+++ b/admin/views/partial-notifications-template.php
@@ -36,7 +36,7 @@ function _yoast_display_notifications( $notifications_list, $status ) {
$button = sprintf(
'',
/* translators: Hidden accessibility text. */
- esc_html__( 'Hide this item.', 'wordpress-seo' )
+ esc_html__( 'Hide this item.', 'wordpress-seo' ),
);
break;
@@ -44,7 +44,7 @@ function _yoast_display_notifications( $notifications_list, $status ) {
$button = sprintf(
'',
/* translators: Hidden accessibility text. */
- esc_html__( 'Show this item.', 'wordpress-seo' )
+ esc_html__( 'Show this item.', 'wordpress-seo' ),
);
break;
}
@@ -57,7 +57,7 @@ function _yoast_display_notifications( $notifications_list, $status ) {
// This needs to be fixed in https://github.com/Yoast/wordpress-seo-premium/issues/2548.
$notification,
// Note: $button is properly escaped above.
- $button
+ $button,
);
}
@@ -101,7 +101,7 @@ function _yoast_display_notifications( $notifications_list, $status ) {
'content' => _yoast_display_notifications( $yoast_seo_dismissed, 'dismissed' ),
'collapsible' => true,
'collapsible_header_class' => 'yoast-notification',
- ]
+ ],
);
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: get_output() output is properly escaped.
echo $dismissed_paper->get_output();
diff --git a/admin/views/partial-notifications-warnings.php b/admin/views/partial-notifications-warnings.php
index e960d6ae61d..f5dfc284510 100644
--- a/admin/views/partial-notifications-warnings.php
+++ b/admin/views/partial-notifications-warnings.php
@@ -23,7 +23,7 @@
$yoast_seo_i18n_muted_issues_title = sprintf(
/* translators: %d expands the amount of hidden notifications. */
_n( 'You have %d hidden notification:', 'You have %d hidden notifications:', $yoast_seo_dismissed_total, 'wordpress-seo' ),
- $yoast_seo_dismissed_total
+ $yoast_seo_dismissed_total,
);
require WPSEO_PATH . 'admin/views/partial-notifications-template.php';
diff --git a/admin/views/tabs/dashboard/dashboard.php b/admin/views/tabs/dashboard/dashboard.php
index 2c8c96a54da..b419e787f80 100644
--- a/admin/views/tabs/dashboard/dashboard.php
+++ b/admin/views/tabs/dashboard/dashboard.php
@@ -17,7 +17,7 @@
$wpseo_contributors_phrase = sprintf(
/* translators: %1$s expands to Yoast SEO */
__( 'See who contributed to %1$s.', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
?>
diff --git a/admin/views/tabs/network/crawl-settings.php b/admin/views/tabs/network/crawl-settings.php
index 81ff2d9b71b..ed2f49cb483 100644
--- a/admin/views/tabs/network/crawl-settings.php
+++ b/admin/views/tabs/network/crawl-settings.php
@@ -22,7 +22,7 @@
printf(
/* translators: %s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
echo '
';
@@ -30,7 +30,7 @@
/* translators: %1$s opens the link to the Yoast.com article about Crawl settings, %2$s closes the link, */
esc_html__( '%1$sLearn more about crawl settings.%2$s', 'wordpress-seo' ),
'',
- ''
+ '',
);
echo '
';
diff --git a/admin/views/tabs/network/features.php b/admin/views/tabs/network/features.php
index 05ac5bbf454..5c0cec56d80 100644
--- a/admin/views/tabs/network/features.php
+++ b/admin/views/tabs/network/features.php
@@ -25,7 +25,7 @@
printf(
/* translators: %s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
foreach ( $feature_toggles as $feature ) {
@@ -52,7 +52,7 @@
$help_text .= sprintf(
'%2$s',
esc_url( WPSEO_Shortlinker::get( $url ) ),
- esc_html( $feature->read_more_label )
+ esc_html( $feature->read_more_label ),
);
}
@@ -60,7 +60,7 @@
WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
/* translators: Hidden accessibility text; %s expands to a feature's name. */
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $feature->name ) ),
- $help_text
+ $help_text,
);
$name = $feature->name;
@@ -102,7 +102,7 @@
'show_premium_upsell' => $show_premium_upsell,
'premium_upsell_url' => $premium_upsell_url,
'note_when_disabled' => $note_when_disabled,
- ]
+ ],
);
}
?>
diff --git a/admin/views/tabs/network/general.php b/admin/views/tabs/network/general.php
index a73c722b928..f212f9a44e9 100644
--- a/admin/views/tabs/network/general.php
+++ b/admin/views/tabs/network/general.php
@@ -26,7 +26,7 @@
[
'admin' => __( 'Site Admins (default)', 'wordpress-seo' ),
'superadmin' => __( 'Super Admins only', 'wordpress-seo' ),
- ]
+ ],
);
if ( get_blog_count() <= 100 ) {
@@ -35,7 +35,7 @@
$yform->select(
'defaultblog',
__( 'New sites in the network inherit their SEO settings from this site', 'wordpress-seo' ),
- $network_admin->get_site_choices( true, true )
+ $network_admin->get_site_choices( true, true ),
);
echo '
' . esc_html__( 'Choose the site whose settings you want to use as default for all sites that are added to your network. If you choose \'None\', the normal plugin defaults will be used.', 'wordpress-seo' ) . '
';
@@ -422,7 +420,7 @@ public function expired_subscription_warning( $plugin_data ) {
esc_html__( 'Your %1$s plugin cannot be updated as your subscription has expired. %2$sRenew your product subscription%3$s to restore updates and full feature access.', 'wordpress-seo' ),
esc_html( $plugin_data['name'] ),
'',
- ''
+ '',
)
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output is escaped above.
. $sale_copy
@@ -538,9 +536,9 @@ protected function create_notification( $product_name, $short_link ) {
'',
'MyYoast',
'',
- $product_name
+ $product_name,
),
- $notification_options
+ $notification_options,
);
}
diff --git a/inc/class-my-yoast-api-request.php b/inc/class-my-yoast-api-request.php
index 752c22be57b..17a993fbe34 100644
--- a/inc/class-my-yoast-api-request.php
+++ b/inc/class-my-yoast-api-request.php
@@ -137,7 +137,7 @@ protected function decode_response( $response ) {
if ( ! is_object( $response ) ) {
throw new WPSEO_MyYoast_Invalid_JSON_Exception(
- esc_html__( 'No JSON object was returned.', 'wordpress-seo' )
+ esc_html__( 'No JSON object was returned.', 'wordpress-seo' ),
);
}
@@ -158,7 +158,7 @@ private function validate_response( $response ) {
}
throw new WPSEO_MyYoast_Invalid_JSON_Exception(
- esc_html__( 'Not all needed fields are present.', 'wordpress-seo' )
+ esc_html__( 'Not all needed fields are present.', 'wordpress-seo' ),
);
}
diff --git a/inc/class-rewrite.php b/inc/class-rewrite.php
index 9622ada0aad..89827ceb38b 100644
--- a/inc/class-rewrite.php
+++ b/inc/class-rewrite.php
@@ -251,6 +251,6 @@ protected function redirect( $category_redirect ) {
$catlink = trailingslashit( get_option( 'home' ) ) . user_trailingslashit( $category_redirect, 'category' );
wp_safe_redirect( $catlink, 301, 'Yoast SEO' );
- exit;
+ exit();
}
}
diff --git a/inc/class-upgrade-history.php b/inc/class-upgrade-history.php
index 227cb672b19..da4b1e0a6d7 100644
--- a/inc/class-upgrade-history.php
+++ b/inc/class-upgrade-history.php
@@ -89,9 +89,9 @@ protected function get_options_data( array $option_names ) {
SELECT %i, %i FROM ' . $wpdb->options . ' WHERE
%i IN ( ' . implode( ',', array_fill( 0, count( $option_names ), '%s' ) ) . ' )
',
- array_merge( [ 'option_value', 'option_name', 'option_name' ], $option_names )
+ array_merge( [ 'option_value', 'option_name', 'option_name' ], $option_names ),
),
- ARRAY_A
+ ARRAY_A,
);
$data = [];
diff --git a/inc/class-upgrade.php b/inc/class-upgrade.php
index 3ea7da39622..45f1ee2fffc 100644
--- a/inc/class-upgrade.php
+++ b/inc/class-upgrade.php
@@ -314,8 +314,8 @@ protected function upgrade_36() {
$wpdb->query(
$wpdb->prepare(
'DELETE FROM %i WHERE %i LIKE %s AND autoload IN ("on", "yes")',
- [ $wpdb->options, 'option_name', 'wpseo_sitemap_%' ]
- )
+ [ $wpdb->options, 'option_name', 'wpseo_sitemap_%' ],
+ ),
);
}
@@ -358,8 +358,8 @@ private function upgrade_47() {
$wpdb->query(
$wpdb->prepare(
'UPDATE ' . $wpdb->postmeta . ' SET meta_key = %s WHERE meta_key = "yst_is_cornerstone"',
- WPSEO_Cornerstone_Filter::META_NAME
- )
+ WPSEO_Cornerstone_Filter::META_NAME,
+ ),
);
}
@@ -398,9 +398,9 @@ protected function upgrade_49() {
$meta_key,
'meta_value',
'%wpseo-dismiss-about%',
- ]
+ ],
),
- ARRAY_A
+ ARRAY_A,
);
if ( empty( $usermetas ) ) {
@@ -452,8 +452,8 @@ protected function upgrade_50() {
$wpdb->prepare(
"DELETE FROM %i
WHERE %i = '_yst_content_links_processed'",
- [ $wpdb->postmeta, 'meta_key' ]
- )
+ [ $wpdb->postmeta, 'meta_key' ],
+ ),
);
}
@@ -658,8 +658,8 @@ protected function upgrade_90() {
$wpdb->prepare(
'DELETE FROM %i
WHERE %i LIKE %s',
- [ $wpdb->options, 'option_name', 'wpseo_sitemap_%' ]
- )
+ [ $wpdb->options, 'option_name', 'wpseo_sitemap_%' ],
+ ),
);
}
@@ -743,8 +743,8 @@ public function upgrade_125() {
$wpdb->prepare(
'DELETE FROM %i
WHERE %i = %s',
- [ $wpdb->usermeta, 'meta_key', 'wp_yoast_promo_hide_premium_upsell_admin_block' ]
- )
+ [ $wpdb->usermeta, 'meta_key', 'wp_yoast_promo_hide_premium_upsell_admin_block' ],
+ ),
);
// Removes the WordPress update notification, because it is no longer necessary when WordPress 5.3 is released.
@@ -1012,7 +1012,7 @@ private function upgrade_189() {
WPSEO_Options::set( 'should_redirect_after_install_free', false );
// We're adding a hardcoded time here, so that in the future we can be able to identify whether the user did see the Installation Success page or not.
// If they did, they wouldn't have this hardcoded value in that option, but rather (roughly) the timestamp of the moment they saw it.
- WPSEO_Options::set( 'activation_redirect_timestamp_free', 1652258756 );
+ WPSEO_Options::set( 'activation_redirect_timestamp_free', 1_652_258_756 );
// Transfer the Social URLs.
$other = [];
@@ -1218,7 +1218,7 @@ public function clean_up_private_taxonomies_for_141() {
'object_type',
'object_sub_type',
],
- $private_taxonomies
+ $private_taxonomies,
);
// phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: No relevant caches.
@@ -1230,8 +1230,8 @@ public function clean_up_private_taxonomies_for_141() {
AND %i IN ("
. implode( ', ', array_fill( 0, count( $private_taxonomies ), '%s' ) )
. ')',
- $replacements
- )
+ $replacements,
+ ),
);
$wpdb->show_errors = $show_errors;
@@ -1255,8 +1255,8 @@ private function reset_permalinks_of_attachments_for_141() {
$wpdb->query(
$wpdb->prepare(
"UPDATE %i SET %i = NULL WHERE %i = 'post' AND %i = 'attachment'",
- [ Model::get_table_name( 'Indexable' ), 'permalink', 'object_type', 'object_sub_type' ]
- )
+ [ Model::get_table_name( 'Indexable' ), 'permalink', 'object_type', 'object_sub_type' ],
+ ),
);
$wpdb->show_errors = $show_errors;
@@ -1335,8 +1335,8 @@ private function remove_sitemap_validators() {
$wpdb->query(
$wpdb->prepare(
'DELETE FROM %i WHERE %i LIKE %s',
- [ $wpdb->options, 'option_name', 'wpseo_sitemap%validator%' ]
- )
+ [ $wpdb->options, 'option_name', 'wpseo_sitemap%validator%' ],
+ ),
);
}
@@ -1357,9 +1357,9 @@ protected function get_option_from_database( $option_name ) {
$results = $wpdb->get_results(
$wpdb->prepare(
'SELECT %i FROM %i WHERE %i = %s',
- [ 'option_value', $wpdb->options, 'option_name', $option_name ]
+ [ 'option_value', $wpdb->options, 'option_name', $option_name ],
),
- ARRAY_A
+ ARRAY_A,
);
if ( ! empty( $results ) ) {
@@ -1402,9 +1402,7 @@ protected function cleanup_option_data( $option_name ) {
* @return void
*/
protected function save_option_setting( $source_data, $source_setting, $target_setting = null ) {
- if ( $target_setting === null ) {
- $target_setting = $source_setting;
- }
+ $target_setting ??= $source_setting;
if ( isset( $source_data[ $source_setting ] ) ) {
WPSEO_Options::set( $target_setting, $source_data[ $source_setting ] );
@@ -1433,7 +1431,7 @@ private function migrate_woocommerce_archive_setting_to_shop_page() {
WPSEO_Meta::set_value(
'title',
$option_title,
- $shop_page_id
+ $shop_page_id,
);
WPSEO_Options::set( 'title-ptarchive-product', '' );
@@ -1447,7 +1445,7 @@ private function migrate_woocommerce_archive_setting_to_shop_page() {
WPSEO_Meta::set_value(
'metadesc',
$option_metadesc,
- $shop_page_id
+ $shop_page_id,
);
WPSEO_Options::set( 'metadesc-ptarchive-product', '' );
@@ -1461,7 +1459,7 @@ private function migrate_woocommerce_archive_setting_to_shop_page() {
WPSEO_Meta::set_value(
'bctitle',
$option_bctitle,
- $shop_page_id
+ $shop_page_id,
);
WPSEO_Options::set( 'bctitle-ptarchive-product', '' );
@@ -1475,7 +1473,7 @@ private function migrate_woocommerce_archive_setting_to_shop_page() {
WPSEO_Meta::set_value(
'meta-robots-noindex',
$option_noindex,
- $shop_page_id
+ $shop_page_id,
);
WPSEO_Options::set( 'noindex-ptarchive-product', false );
@@ -1614,8 +1612,8 @@ public function remove_indexable_rows_for_non_public_post_types() {
"DELETE FROM %i
WHERE %i = 'post'
AND %i IS NOT NULL",
- [ $indexable_table, 'object_type', 'object_sub_type' ]
- )
+ [ $indexable_table, 'object_type', 'object_sub_type' ],
+ ),
);
}
else {
@@ -1634,9 +1632,9 @@ public function remove_indexable_rows_for_non_public_post_types() {
'object_sub_type',
'object_sub_type',
],
- $included_post_types
- )
- )
+ $included_post_types,
+ ),
+ ),
);
}
@@ -1668,8 +1666,8 @@ public function remove_indexable_rows_for_non_public_taxonomies() {
"DELETE FROM %i
WHERE %i = 'term'
AND %i IS NOT NULL",
- [ $indexable_table, 'object_type', 'object_sub_type' ]
- )
+ [ $indexable_table, 'object_type', 'object_sub_type' ],
+ ),
);
}
else {
@@ -1688,9 +1686,9 @@ public function remove_indexable_rows_for_non_public_taxonomies() {
'object_sub_type',
'object_sub_type',
],
- $included_taxonomies
- )
- )
+ $included_taxonomies,
+ ),
+ ),
);
}
@@ -1729,9 +1727,9 @@ protected function deduplicate_unindexed_indexable_rows() {
object_type
HAVING
count(*) > 1",
- [ Model::get_table_name( 'Indexable' ) ]
+ [ Model::get_table_name( 'Indexable' ) ],
),
- ARRAY_A
+ ARRAY_A,
);
if ( empty( $duplicates ) ) {
@@ -1780,8 +1778,8 @@ protected function clean_unindexed_indexable_rows_with_no_object_id() {
WHERE %i = 'unindexed'
AND %i NOT IN ( 'home-page', 'date-archive', 'post-type-archive', 'system-page' )
AND %i IS NULL",
- [ Model::get_table_name( 'Indexable' ), 'post_status', 'object_type', 'object_id' ]
- )
+ [ Model::get_table_name( 'Indexable' ), 'post_status', 'object_type', 'object_id' ],
+ ),
);
$wpdb->show_errors = $show_errors;
@@ -1808,8 +1806,8 @@ protected function remove_indexable_rows_for_disabled_authors_archive() {
$wpdb->query(
$wpdb->prepare(
"DELETE FROM %i WHERE %i = 'user'",
- [ Model::get_table_name( 'Indexable' ), 'object_type' ]
- )
+ [ Model::get_table_name( 'Indexable' ), 'object_type' ],
+ ),
);
$wpdb->show_errors = $show_errors;
@@ -1829,7 +1827,7 @@ protected function get_indexable_deduplication_query_for_type( $object_type, $du
$duplicates,
static function ( $duplicate ) use ( $object_type ) {
return $duplicate['object_type'] === $object_type;
- }
+ },
);
if ( empty( $filtered_duplicates ) ) {
@@ -1845,7 +1843,7 @@ static function ( $duplicate ) use ( $object_type ) {
'object_id',
],
array_values( $object_ids ),
- array_values( $newest_indexable_ids )
+ array_values( $newest_indexable_ids ),
);
$replacements[] = $object_type;
@@ -1858,7 +1856,7 @@ static function ( $duplicate ) use ( $object_type ) {
%i IN ( ' . implode( ', ', array_fill( 0, count( $filtered_duplicates ), '%d' ) ) . ' )
AND id NOT IN ( ' . implode( ', ', array_fill( 0, count( $filtered_duplicates ), '%d' ) ) . ' )
AND object_type = %s',
- $replacements
+ $replacements,
);
}
diff --git a/inc/class-wpseo-admin-bar-menu.php b/inc/class-wpseo-admin-bar-menu.php
index 8d3dc24a8ae..c96068d9d90 100644
--- a/inc/class-wpseo-admin-bar-menu.php
+++ b/inc/class-wpseo-admin-bar-menu.php
@@ -156,9 +156,7 @@ public function __construct(
* @return bool True if SEO score is enabled, false otherwise.
*/
protected function get_is_seo_enabled() {
- if ( $this->is_seo_enabled === null ) {
- $this->is_seo_enabled = ( new WPSEO_Metabox_Analysis_SEO() )->is_enabled();
- }
+ $this->is_seo_enabled ??= ( new WPSEO_Metabox_Analysis_SEO() )->is_enabled();
return $this->is_seo_enabled;
}
@@ -169,9 +167,7 @@ protected function get_is_seo_enabled() {
* @return bool True if readability is enabled, false otherwise.
*/
protected function get_is_readability_enabled() {
- if ( $this->is_readability_enabled === null ) {
- $this->is_readability_enabled = ( new WPSEO_Metabox_Analysis_Readability() )->is_enabled();
- }
+ $this->is_readability_enabled ??= ( new WPSEO_Metabox_Analysis_Readability() )->is_enabled();
return $this->is_readability_enabled;
}
@@ -182,9 +178,7 @@ protected function get_is_readability_enabled() {
* @return bool|Indexable The indexable, false if none could be found.
*/
protected function get_current_indexable() {
- if ( $this->current_indexable === null ) {
- $this->current_indexable = $this->indexable_repository->for_current_page();
- }
+ $this->current_indexable ??= $this->indexable_repository->for_current_page();
return $this->current_indexable;
}
@@ -237,7 +231,7 @@ public function add_menu( WP_Admin_Bar $wp_admin_bar ) {
'id' => 'wpseo-seo-focus-keyword',
'title' => __( 'Focus keyphrase: ', 'wordpress-seo' ) . '' . $focus_keyword . '',
'meta' => [ 'tabindex' => '0' ],
- ]
+ ],
);
$wp_admin_bar->add_menu(
[
@@ -246,7 +240,7 @@ public function add_menu( WP_Admin_Bar $wp_admin_bar ) {
'title' => __( 'SEO score', 'wordpress-seo' ) . ': ' . $this->score_icon_helper->for_seo( $indexable, 'adminbar-sub-menu-score' )
->present(),
'meta' => [ 'tabindex' => '0' ],
- ]
+ ],
);
}
@@ -258,7 +252,7 @@ public function add_menu( WP_Admin_Bar $wp_admin_bar ) {
'title' => __( 'Readability', 'wordpress-seo' ) . ': ' . $this->score_icon_helper->for_readability( $indexable->readability_score, 'adminbar-sub-menu-score' )
->present(),
'meta' => [ 'tabindex' => '0' ],
- ]
+ ],
);
}
@@ -273,7 +267,7 @@ public function add_menu( WP_Admin_Bar $wp_admin_bar ) {
'tabindex' => '0',
'target' => '_blank',
],
- ]
+ ],
);
}
}
@@ -623,12 +617,12 @@ protected function add_premium_link( WP_Admin_Bar $wp_admin_bar ) {
'title' => sprintf(
'%2$s',
esc_url( $link ),
- $button_label
+ $button_label,
),
'meta' => [
'tabindex' => '0',
],
- ]
+ ],
);
}
@@ -660,7 +654,7 @@ protected function add_brand_insights_link( WP_Admin_Bar $wp_admin_bar ) {
'tabindex' => '0',
'target' => '_blank',
],
- ]
+ ],
);
}
@@ -919,7 +913,7 @@ protected function get_notification_counter( $notification_count ) {
'
%d%s
',
( $notification_count ) ? '' : ' wpseo-no-adminbar-notifications',
$notification_count,
- $counter_screen_reader_text
+ $counter_screen_reader_text,
);
}
@@ -942,9 +936,9 @@ protected function get_notification_popup() {
'There is a new notification.',
'There are new notifications.',
$new_notifications_count,
- 'wordpress-seo'
+ 'wordpress-seo',
),
- $new_notifications_count
+ $new_notifications_count,
);
return '
' . $notification . '
';
diff --git a/inc/class-wpseo-content-images.php b/inc/class-wpseo-content-images.php
index bae91bc6360..9e23a91f625 100644
--- a/inc/class-wpseo-content-images.php
+++ b/inc/class-wpseo-content-images.php
@@ -87,9 +87,7 @@ private function get_img_tag_source( $image ) {
* @return string The content of the supplied post.
*/
private function get_post_content( $post_id, $post ) {
- if ( $post === null ) {
- $post = get_post( $post_id );
- }
+ $post ??= get_post( $post_id );
if ( $post === null ) {
return '';
diff --git a/inc/class-wpseo-custom-taxonomies.php b/inc/class-wpseo-custom-taxonomies.php
index e1fb1816b2a..3d2f1bae719 100644
--- a/inc/class-wpseo-custom-taxonomies.php
+++ b/inc/class-wpseo-custom-taxonomies.php
@@ -40,7 +40,7 @@ public static function get_custom_taxonomies() {
array_push(
self::$custom_taxonomies,
self::add_custom_taxonomies_prefix( $custom_taxonomy ),
- self::add_custom_taxonomies_description_prefix( $custom_taxonomy )
+ self::add_custom_taxonomies_description_prefix( $custom_taxonomy ),
);
}
}
diff --git a/inc/class-wpseo-image-utils.php b/inc/class-wpseo-image-utils.php
index 6875aab7a08..dbb0b7d0bf2 100644
--- a/inc/class-wpseo-image-utils.php
+++ b/inc/class-wpseo-image-utils.php
@@ -26,9 +26,7 @@ public static function get_attachment_by_url( $url ) {
static $uploads;
- if ( $uploads === null ) {
- $uploads = wp_get_upload_dir();
- }
+ $uploads ??= wp_get_upload_dir();
// Don't try to do this for external URLs.
if ( strpos( $url, $uploads['baseurl'] ) !== 0 ) {
@@ -188,7 +186,7 @@ public static function has_usable_file_size( $image ) {
*
* @param int $max_bytes The maximum weight (in bytes) of an image.
*/
- $max_size = apply_filters( 'wpseo_image_image_weight_limit', 2097152 );
+ $max_size = apply_filters( 'wpseo_image_image_weight_limit', 2_097_152 );
// We cannot check without a path, so assume it's fine.
if ( ! isset( $image['path'] ) ) {
@@ -268,9 +266,7 @@ protected static function get_full_size_image_data( $attachment_id ) {
public static function get_absolute_path( $path ) {
static $uploads;
- if ( $uploads === null ) {
- $uploads = wp_get_upload_dir();
- }
+ $uploads ??= wp_get_upload_dir();
// Add the uploads basedir if the path does not start with it.
if ( empty( $uploads['error'] ) && strpos( $path, $uploads['basedir'] ) !== 0 ) {
diff --git a/inc/class-wpseo-meta.php b/inc/class-wpseo-meta.php
index 5a4a136cbbd..61691cd4e87 100644
--- a/inc/class-wpseo-meta.php
+++ b/inc/class-wpseo-meta.php
@@ -267,7 +267,7 @@ public static function init() {
register_meta(
'post',
self::$meta_prefix . $key,
- [ 'sanitize_callback' => [ self::class, 'sanitize_post_meta' ] ]
+ [ 'sanitize_callback' => [ self::class, 'sanitize_post_meta' ] ],
);
// Set the $fields_index property for efficiency.
@@ -398,7 +398,7 @@ public static function sanitize_post_meta( $meta_value, $meta_key ) {
case ( $meta_key === self::$meta_prefix . 'linkdex' ):
$int = WPSEO_Utils::validate_int( $meta_value );
if ( $int !== false && $int >= 0 ) {
- $clean = strval( $int ); // Convert to string to make sure default check works.
+ $clean = (string) $int; // Convert to string to make sure default check works.
}
break;
@@ -721,7 +721,7 @@ public static function replace_meta( $old_metakey, $new_metakey, $delete_old = f
;",
$old_metakey,
$wpdb->esc_like( self::$meta_prefix . '%' ),
- self::$meta_prefix . 'linkdex'
+ self::$meta_prefix . 'linkdex',
);
$oldies = $wpdb->get_results( $query );
@@ -773,7 +773,7 @@ public static function clean_up() {
;",
self::$meta_prefix . 'meta-robots',
self::$meta_prefix . 'meta-robots-noindex',
- self::$meta_prefix . 'meta-robots-nofollow'
+ self::$meta_prefix . 'meta-robots-nofollow',
);
$oldies = $wpdb->get_results( $query );
@@ -825,7 +825,7 @@ public static function clean_up() {
$query[] = $wpdb->prepare(
"( meta_key = %s AND meta_value NOT IN ( '" . implode( "','", esc_sql( $valid ) ) . "' ) )",
- self::$meta_prefix . $key
+ self::$meta_prefix . $key,
);
unset( $valid );
}
@@ -833,13 +833,13 @@ public static function clean_up() {
$query[] = $wpdb->prepare(
'( meta_key = %s AND meta_value = %s )',
self::$meta_prefix . $key,
- $field_def['default_value']
+ $field_def['default_value'],
);
}
else {
$query[] = $wpdb->prepare(
"( meta_key = %s AND meta_value = '' )",
- self::$meta_prefix . $key
+ self::$meta_prefix . $key,
);
}
}
@@ -877,7 +877,7 @@ public static function clean_up() {
*/
$query = $wpdb->prepare(
"SELECT meta_id, meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s",
- self::$meta_prefix . 'meta-robots-adv'
+ self::$meta_prefix . 'meta-robots-adv',
);
$oldies = $wpdb->get_results( $query );
diff --git a/inc/class-wpseo-rank.php b/inc/class-wpseo-rank.php
index a8b9c101519..8f0e514045f 100644
--- a/inc/class-wpseo-rank.php
+++ b/inc/class-wpseo-rank.php
@@ -168,27 +168,27 @@ public function get_drop_down_label() {
self::NO_FOCUS => sprintf(
/* translators: %s expands to the SEO score */
__( 'SEO: %s', 'wordpress-seo' ),
- __( 'No Focus Keyphrase', 'wordpress-seo' )
+ __( 'No Focus Keyphrase', 'wordpress-seo' ),
),
self::BAD => sprintf(
/* translators: %s expands to the SEO score */
__( 'SEO: %s', 'wordpress-seo' ),
- __( 'Needs improvement', 'wordpress-seo' )
+ __( 'Needs improvement', 'wordpress-seo' ),
),
self::OK => sprintf(
/* translators: %s expands to the SEO score */
__( 'SEO: %s', 'wordpress-seo' ),
- __( 'OK', 'wordpress-seo' )
+ __( 'OK', 'wordpress-seo' ),
),
self::GOOD => sprintf(
/* translators: %s expands to the SEO score */
__( 'SEO: %s', 'wordpress-seo' ),
- __( 'Good', 'wordpress-seo' )
+ __( 'Good', 'wordpress-seo' ),
),
self::NO_INDEX => sprintf(
/* translators: %s expands to the SEO score */
__( 'SEO: %s', 'wordpress-seo' ),
- __( 'Post Noindexed', 'wordpress-seo' )
+ __( 'Post Noindexed', 'wordpress-seo' ),
),
];
@@ -205,22 +205,22 @@ public function get_drop_down_readability_labels() {
self::BAD => sprintf(
/* translators: %s expands to the readability score */
__( 'Readability: %s', 'wordpress-seo' ),
- __( 'Needs improvement', 'wordpress-seo' )
+ __( 'Needs improvement', 'wordpress-seo' ),
),
self::OK => sprintf(
/* translators: %s expands to the readability score */
__( 'Readability: %s', 'wordpress-seo' ),
- __( 'OK', 'wordpress-seo' )
+ __( 'OK', 'wordpress-seo' ),
),
self::GOOD => sprintf(
/* translators: %s expands to the readability score */
__( 'Readability: %s', 'wordpress-seo' ),
- __( 'Good', 'wordpress-seo' )
+ __( 'Good', 'wordpress-seo' ),
),
self::NO_FOCUS => sprintf(
/* translators: %s expands to the readability score */
__( 'Readability: %s', 'wordpress-seo' ),
- __( 'Not analyzed', 'wordpress-seo' )
+ __( 'Not analyzed', 'wordpress-seo' ),
),
];
@@ -237,17 +237,17 @@ public function get_drop_down_inclusive_language_labels() {
self::BAD => sprintf(
/* translators: %s expands to the inclusive language score */
__( 'Inclusive language: %s', 'wordpress-seo' ),
- __( 'Needs improvement', 'wordpress-seo' )
+ __( 'Needs improvement', 'wordpress-seo' ),
),
self::OK => sprintf(
/* translators: %s expands to the inclusive language score */
__( 'Inclusive language: %s', 'wordpress-seo' ),
- __( 'Potentially non-inclusive', 'wordpress-seo' )
+ __( 'Potentially non-inclusive', 'wordpress-seo' ),
),
self::GOOD => sprintf(
/* translators: %s expands to the inclusive language score */
__( 'Inclusive language: %s', 'wordpress-seo' ),
- __( 'Good', 'wordpress-seo' )
+ __( 'Good', 'wordpress-seo' ),
),
];
diff --git a/inc/class-wpseo-replace-vars.php b/inc/class-wpseo-replace-vars.php
index b4ebbd76306..8f0f679b488 100644
--- a/inc/class-wpseo-replace-vars.php
+++ b/inc/class-wpseo-replace-vars.php
@@ -181,7 +181,7 @@ public function replace( $text, $args, $omit = [] ) {
array_keys( $replacements ),
// Make sure to exclude replacement values that are arrays e.g. coming from a custom field serialized value.
array_filter( array_values( $replacements ), 'is_scalar' ),
- $text
+ $text,
);
}
@@ -1306,7 +1306,7 @@ public function get_replacement_variables_with_labels() {
$replacement_variables = array_filter(
array_merge( self::$help_texts['basic'], self::$help_texts['advanced'] ),
[ $this, 'is_not_prefixed' ],
- ARRAY_FILTER_USE_KEY
+ ARRAY_FILTER_USE_KEY,
);
$hidden = $this->get_hidden_replace_vars();
@@ -1323,8 +1323,8 @@ static function ( WPSEO_Replacement_Variable $replacement_variable ) use ( $hidd
'hidden' => in_array( $name, $hidden, true ),
];
},
- array_merge( $replacement_variables, $custom_variables )
- )
+ array_merge( $replacement_variables, $custom_variables ),
+ ),
);
}
@@ -1339,7 +1339,7 @@ public function get_replacement_variables_list() {
$replacement_variables = array_merge(
$this->get_replacement_variables(),
WPSEO_Custom_Fields::get_custom_fields(),
- WPSEO_Custom_Taxonomies::get_custom_taxonomies()
+ WPSEO_Custom_Taxonomies::get_custom_taxonomies(),
);
return array_map( [ $this, 'format_replacement_variable' ], $replacement_variables );
@@ -1463,7 +1463,7 @@ private static function set_basic_help_texts() {
$separator_description = sprintf(
$separator_description,
// 'wp_title()'
- 'wp_title()'
+ 'wp_title()',
);
$replacement_variables = [
@@ -1621,7 +1621,7 @@ private function get_term_hierarchy() {
return rtrim(
get_term_parents_list( $this->args->term_id, $this->args->taxonomy, $args ),
- $separator
+ $separator,
);
}
diff --git a/inc/class-wpseo-utils.php b/inc/class-wpseo-utils.php
index 17541e60e17..914320d702d 100644
--- a/inc/class-wpseo-utils.php
+++ b/inc/class-wpseo-utils.php
@@ -198,10 +198,10 @@ public static function sanitize_url( $value, $allowed_protocols = [ 'http', 'htt
$parts['host'] = preg_replace(
'`[^a-z0-9-.:\[\]\\x80-\\xff]`',
'',
- strtolower( $parts['host'] )
+ strtolower( $parts['host'] ),
);
- $url .= $parts['host'] . ( isset( $parts['port'] ) ? ':' . intval( $parts['port'] ) : '' );
+ $url .= $parts['host'] . ( isset( $parts['port'] ) ? ':' . (int) $parts['port'] : '' );
}
if ( isset( $parts['path'] ) && strpos( $parts['path'], '/' ) === 0 ) {
@@ -219,7 +219,7 @@ public static function sanitize_url( $value, $allowed_protocols = [ 'http', 'htt
$parsed_query = array_combine(
self::sanitize_encoded_text_field( array_keys( $parsed_query ) ),
- self::sanitize_encoded_text_field( array_values( $parsed_query ) )
+ self::sanitize_encoded_text_field( array_values( $parsed_query ) ),
);
$url = add_query_arg( $parsed_query, $url );
@@ -235,7 +235,7 @@ public static function sanitize_url( $value, $allowed_protocols = [ 'http', 'htt
static function ( $octects ) {
return strtolower( $octects[0] );
},
- $url
+ $url,
);
}
@@ -551,14 +551,14 @@ public static function calc( $number1, $action, $number2, $round = false, $decim
if ( isset( $result ) ) {
if ( $compare === false ) {
if ( $round === true ) {
- $result = round( floatval( $result ), $decimals );
+ $result = round( (float) $result, $decimals );
if ( $decimals === 0 ) {
$result = (int) $result;
}
}
else {
// phpcs:ignore Universal.Operators.StrictComparisons -- Purposeful loose comparison.
- $result = ( intval( $result ) == $result ) ? intval( $result ) : floatval( $result );
+ $result = ( intval( $result ) == $result ) ? (int) $result : (float) $result;
}
}
diff --git a/inc/options/class-wpseo-option-ms.php b/inc/options/class-wpseo-option-ms.php
index c47b179d017..b0b38e15f22 100644
--- a/inc/options/class-wpseo-option-ms.php
+++ b/inc/options/class-wpseo-option-ms.php
@@ -206,7 +206,7 @@ protected function validate_option( $dirty, $clean, $old ) {
$key, // Suffix-ID for the error message box.
/* translators: %1$s expands to the option name and %2$sexpands to Yoast SEO */
sprintf( __( '%1$s is not a valid choice for who should be allowed access to the %2$s settings. Value reset to the default.', 'wordpress-seo' ), esc_html( sanitize_text_field( $dirty[ $key ] ) ), 'Yoast SEO' ), // The error message.
- 'error' // Message type.
+ 'error', // Message type.
);
}
break;
@@ -229,9 +229,9 @@ protected function validate_option( $dirty, $clean, $old ) {
. sprintf(
/* translators: %s is the ID number of a blog. */
esc_html__( 'This must be an existing blog. Blog %s does not exist or has been marked as deleted.', 'wordpress-seo' ),
- '' . esc_html( sanitize_text_field( $dirty[ $key ] ) ) . ''
+ '' . esc_html( sanitize_text_field( $dirty[ $key ] ) ) . '',
), // The error message.
- 'error' // Message type.
+ 'error', // Message type.
);
}
unset( $exists );
@@ -241,7 +241,7 @@ protected function validate_option( $dirty, $clean, $old ) {
$this->group_name, // Slug title of the setting.
$key, // Suffix-ID for the error message box.
esc_html__( 'The default blog setting must be the numeric blog id of the blog you want to use as default.', 'wordpress-seo' ) . ' ' . esc_html__( 'No numeric value was received.', 'wordpress-seo' ), // The error message.
- 'error' // Message type.
+ 'error', // Message type.
);
}
unset( $int );
diff --git a/inc/options/class-wpseo-option-titles.php b/inc/options/class-wpseo-option-titles.php
index e3a9bb5fab4..4b127c97c8b 100644
--- a/inc/options/class-wpseo-option-titles.php
+++ b/inc/options/class-wpseo-option-titles.php
@@ -543,7 +543,7 @@ protected function validate_option( $dirty, $clean, $old ) {
$key, // Suffix-id for the error message box.
/* translators: %s expands to a post type. */
sprintf( __( 'Please select a valid taxonomy for post type "%s"', 'wordpress-seo' ), $post_type ), // The error message.
- 'error' // Message type.
+ 'error', // Message type.
);
}
}
@@ -581,7 +581,7 @@ protected function validate_option( $dirty, $clean, $old ) {
'_' . $tax, // Suffix-ID for the error message box.
/* translators: %s expands to a taxonomy slug. */
sprintf( __( 'Please select a valid post type for taxonomy "%s"', 'wordpress-seo' ), $tax ), // The error message.
- 'error' // Message type.
+ 'error', // Message type.
);
unset( $tax );
}
diff --git a/inc/options/class-wpseo-options.php b/inc/options/class-wpseo-options.php
index 225d3601051..790a4261ab9 100644
--- a/inc/options/class-wpseo-options.php
+++ b/inc/options/class-wpseo-options.php
@@ -561,9 +561,7 @@ protected static function add_ms_option( $option ) {
protected static function is_multisite() {
static $is_multisite;
- if ( $is_multisite === null ) {
- $is_multisite = is_multisite();
- }
+ $is_multisite ??= is_multisite();
return $is_multisite;
}
diff --git a/inc/sitemaps/class-post-type-sitemap-provider.php b/inc/sitemaps/class-post-type-sitemap-provider.php
index d018ad0b3ce..a621464e18d 100644
--- a/inc/sitemaps/class-post-type-sitemap-provider.php
+++ b/inc/sitemaps/class-post-type-sitemap-provider.php
@@ -365,7 +365,7 @@ protected function get_first_links( $post_type ) {
$page_on_front_id = (int) get_option( 'page_on_front' );
if ( $page_on_front_id > 0 ) {
$front_page = $this->get_url(
- get_post( $page_on_front_id )
+ get_post( $page_on_front_id ),
);
}
@@ -404,7 +404,7 @@ protected function get_first_links( $post_type ) {
$archive_url = apply_filters(
'wpseo_sitemap_post_type_archive_link',
$this->get_post_type_archive_link( $post_type ),
- $post_type
+ $post_type,
);
}
@@ -626,7 +626,7 @@ protected function get_url( $post ) {
$url['loc'] = apply_filters( 'wpseo_xml_sitemap_post_url', get_permalink( $post ), $post );
$link_type = YoastSEO()->helpers->url->get_link_type(
wp_parse_url( $url['loc'] ),
- $this->get_parsed_home_url()
+ $this->get_parsed_home_url(),
);
/*
@@ -696,7 +696,7 @@ private function get_all_dates_using_with_clause( $post_type, $max_entries ) {
'post_modified_gmt',
'ordering',
$max_entries,
- ]
+ ],
);
//phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- We need to use a direct query here.
@@ -714,8 +714,8 @@ private function get_all_dates_using_with_clause( $post_type, $max_entries ) {
FROM %i
WHERE MOD(n, %d) = 0;
',
- $replacements
- )
+ $replacements,
+ ),
);
}
@@ -744,7 +744,7 @@ private function get_all_dates( $post_type, $max_entries ) {
$post_type,
$max_entries,
'post_modified_gmt',
- ]
+ ],
);
return $wpdb->get_col(
@@ -759,8 +759,8 @@ private function get_all_dates( $post_type, $max_entries ) {
AND ( @rownum:=@rownum+1 ) %% %d = 0
ORDER BY %i ASC
',
- $replacements
- )
+ $replacements,
+ ),
);
}
}
diff --git a/inc/sitemaps/class-sitemap-image-parser.php b/inc/sitemaps/class-sitemap-image-parser.php
index 58d8ec5a952..1a883999708 100644
--- a/inc/sitemaps/class-sitemap-image-parser.php
+++ b/inc/sitemaps/class-sitemap-image-parser.php
@@ -257,7 +257,7 @@ protected function parse_galleries( $content, $post_id = 0 ) {
$id = $post_id;
if ( ! empty( $gallery['id'] ) ) {
- $id = intval( $gallery['id'] );
+ $id = (int) $gallery['id'];
}
// Forked from core gallery_shortcode() to have exact same logic. R.
@@ -467,7 +467,7 @@ protected function get_gallery_attachments_for_included( $included_ids ) {
[
'posts_per_page' => count( $ids_to_include ),
'post__in' => $ids_to_include,
- ]
+ ],
);
$gallery_attachments = [];
diff --git a/inc/sitemaps/class-sitemaps-cache-validator.php b/inc/sitemaps/class-sitemaps-cache-validator.php
index 166d181fc3f..49c2463e330 100644
--- a/inc/sitemaps/class-sitemaps-cache-validator.php
+++ b/inc/sitemaps/class-sitemaps-cache-validator.php
@@ -110,8 +110,8 @@ public static function truncate_type( $type, $prefix = '', $postfix = '' ) {
throw new OutOfRangeException(
__(
'Trying to build the sitemap cache key, but the postfix and prefix combination leaves too little room to do this. You are probably requesting a page that is way out of the expected range.',
- 'wordpress-seo'
- )
+ 'wordpress-seo',
+ ),
);
}
@@ -195,8 +195,8 @@ public static function cleanup_database( $type = null, $validator = null ) {
$wpdb->prepare(
//phpcs:disable WordPress.DB.PreparedSQLPlaceholders -- %i placeholder is still not recognized.
'DELETE FROM %i WHERE ' . implode( ' OR ', array_fill( 0, count( $where ), '%s' ) ),
- array_merge( [ $wpdb->options ], $where )
- )
+ array_merge( [ $wpdb->options ], $where ),
+ ),
);
wp_cache_delete( 'alloptions', 'options' );
diff --git a/inc/sitemaps/class-sitemaps.php b/inc/sitemaps/class-sitemaps.php
index dd8f350343a..c7653259387 100644
--- a/inc/sitemaps/class-sitemaps.php
+++ b/inc/sitemaps/class-sitemaps.php
@@ -194,8 +194,8 @@ public function register_xsl( $name, $building_function, $rewrite = '' ) {
* @return void
*/
public function set_n( $current_page ) {
- if ( is_scalar( $current_page ) && intval( $current_page ) > 0 ) {
- $this->current_page = intval( $current_page );
+ if ( is_scalar( $current_page ) && (int) $current_page > 0 ) {
+ $this->current_page = (int) $current_page;
}
}
@@ -270,7 +270,7 @@ public function redirect( $query ) {
if ( get_query_var( 'sitemap_n' ) === '1' || get_query_var( 'sitemap_n' ) === '0' ) {
wp_safe_redirect( home_url( "/$type-sitemap.xml" ), 301, 'Yoast SEO' );
- exit;
+ exit();
}
$this->set_n( get_query_var( 'sitemap_n' ) );
@@ -539,7 +539,7 @@ public static function get_last_modified_gmt( $post_types, $return_all = false )
[
'post_type',
'date',
- ]
+ ],
);
//phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- We need to use a direct query here.
@@ -555,8 +555,8 @@ public static function get_last_modified_gmt( $post_types, $return_all = false )
GROUP BY %i
ORDER BY %i DESC
',
- $replacements
- )
+ $replacements,
+ ),
);
foreach ( $dates as $obj ) {
diff --git a/inc/sitemaps/class-taxonomy-sitemap-provider.php b/inc/sitemaps/class-taxonomy-sitemap-provider.php
index e69f0e79182..064c808572e 100644
--- a/inc/sitemaps/class-taxonomy-sitemap-provider.php
+++ b/inc/sitemaps/class-taxonomy-sitemap-provider.php
@@ -202,7 +202,7 @@ public function get_sitemap_links( $type, $max_entries, $current_page ) {
'update_term_meta_cache' => false,
'offset' => $offset,
'number' => $steps,
- ]
+ ],
);
// If there are no terms fetched for this range, we are on an invalid page.
@@ -227,7 +227,7 @@ public function get_sitemap_links( $type, $max_entries, $current_page ) {
'post_status',
],
$post_statuses,
- [ 'post_password' ]
+ [ 'post_password' ],
);
/**
@@ -279,8 +279,8 @@ public function get_sitemap_links( $type, $max_entries, $current_page ) {
WHERE p.%i IN (' . implode( ', ', array_fill( 0, count( $post_statuses ), '%s' ) ) . ")
AND p.%i = ''
",
- $current_replacements
- )
+ $current_replacements,
+ ),
);
if ( $this->include_images ) {
diff --git a/lib/migrations/adapter.php b/lib/migrations/adapter.php
index 561f5e53ad2..ff70d587e46 100644
--- a/lib/migrations/adapter.php
+++ b/lib/migrations/adapter.php
@@ -604,7 +604,7 @@ public function add_index( $table_name, $column_name, $options = [] ) {
( $unique === true ) ? 'UNIQUE ' : '',
$this->identifier( $index_name ),
$this->identifier( $table_name ),
- \implode( ', ', $cols )
+ \implode( ', ', $cols ),
);
return $this->execute_ddl( $sql );
@@ -658,7 +658,7 @@ public function add_timestamps( $table_name, $created_column_name, $updated_colu
'null' => false,
'default' => 'CURRENT_TIMESTAMP',
'extra' => 'ON UPDATE CURRENT_TIMESTAMP',
- ]
+ ],
);
return $created_at && $updated_at;
@@ -813,7 +813,7 @@ public function type_to_sql( $type, $options = [] ) {
else {
$column_type_sql .= \sprintf(
"('%s')",
- \implode( "','", \array_map( [ $this, 'quote_string' ], $values ) )
+ \implode( "','", \array_map( [ $this, 'quote_string' ], $values ) ),
);
}
}
diff --git a/lib/migrations/table.php b/lib/migrations/table.php
index 8ad2228cb42..5ca7adf27aa 100644
--- a/lib/migrations/table.php
+++ b/lib/migrations/table.php
@@ -150,7 +150,7 @@ public function timestamps( $created_column_name = 'created_at', $updated_column
'null' => false,
'default' => 'CURRENT_TIMESTAMP',
'extra' => 'ON UPDATE CURRENT_TIMESTAMP',
- ]
+ ],
);
}
@@ -208,7 +208,7 @@ public function finish( $wants_sql = false ) {
'unsigned' => true,
'null' => false,
'auto_increment' => true,
- ]
+ ],
);
$create_table_sql .= $primary_id->to_sql() . ",\n";
}
diff --git a/lib/model.php b/lib/model.php
index eb767b1d1d5..2b8b6c693ee 100644
--- a/lib/model.php
+++ b/lib/model.php
@@ -484,7 +484,7 @@ protected function has_many_through( $associated_class_name, $join_class_name =
"{$associated_table_name}.{$associated_table_id_column}",
'=',
"{$join_table_name}.{$key_to_associated_table}",
- ]
+ ],
)
->where( "{$join_table_name}.{$key_to_base_table}", $this->{$base_table_id_column} );
}
diff --git a/lib/orm.php b/lib/orm.php
index 8681f22dc20..afaff54c56a 100644
--- a/lib/orm.php
+++ b/lib/orm.php
@@ -281,7 +281,7 @@ protected static function execute( $query, $parameters = [] ) {
$parameters,
static function ( $parameter ) {
return $parameter !== null;
- }
+ },
);
if ( ! empty( $parameters ) ) {
$query = $wpdb->prepare( $query, $parameters );
@@ -1080,7 +1080,7 @@ protected function add_condition( $type, $fragment, $values = [] ) {
[
self::CONDITION_FRAGMENT => $fragment,
self::CONDITION_VALUES => $values,
- ]
+ ],
);
return $this;
@@ -1742,7 +1742,7 @@ protected function build_select() {
$this->build_order_by(),
$this->build_limit(),
$this->build_offset(),
- ]
+ ],
);
}
@@ -2439,7 +2439,7 @@ public function delete_many() {
'DELETE FROM',
$this->quote_identifier( $this->table_name ),
$this->build_where(),
- ]
+ ],
);
return self::execute( $query, $this->values );
diff --git a/readme.txt b/readme.txt
index ba48f80a4a1..4254ed6cd4e 100644
--- a/readme.txt
+++ b/readme.txt
@@ -309,17 +309,17 @@ Release date: 2026-02-17
#### Enhancements
-* Adds `html-react-parser` dependency for improved HTML string handling in React components.
-* Adds `images` array to FAQ and How-to blocks attributes for explicit image handling.
-* Migrates FAQ block's question/answer fields from array-based formats to HTML strings for better compatibility with WordPress components.
-* Migrates How-to block's step name/text fields from array-based formats to HTML strings for better compatibility with WordPress components.
-* Updates the design for the search appearance mode switcher.
+* Introduces an `images` array attribute to FAQ and How-to blocks to allow for explicit image handling.
+* Integrates `html-react-parser` to improve HTML string handling within React components.
+* Migrates FAQ block question and answer fields from arrays to HTML strings to improve compatibility with WordPress components.
+* Migrates How-to block step name and text fields from arrays to HTML strings to improve compatibility with WordPress components.
+* Refines the design of the search appearance mode switcher.
#### Bugfixes
-* Fixes a bug where inline link icon was missing when editing a sync pattern in the block editor with WordPress 6.9.
+* Fixes a bug where the inline link icon was missing when editing a synced pattern in the Block Editor on WordPress 6.9.
* Fixes a bug where the AI Optimize buttons remained active even when another button had been pressed.
-* Fixes a bug where the _subheading distribution assessment_ threw an error when there was some text with no subheadings plus a block containing a subheading (like the Yoast Table of contents block).
+* Fixes a bug where the subheading distribution assessment threw an error when the content contained text without subheadings followed by a block that included a subheading (such as a Table of Contents block).
#### Other
diff --git a/src/actions/configuration/first-time-configuration-action.php b/src/actions/configuration/first-time-configuration-action.php
index 6b518540d68..6fb3595b47f 100644
--- a/src/actions/configuration/first-time-configuration-action.php
+++ b/src/actions/configuration/first-time-configuration-action.php
@@ -151,7 +151,7 @@ public function set_person_social_profiles( $params ) {
static function ( $key ) {
return $key !== 'user_id';
},
- \ARRAY_FILTER_USE_KEY
+ \ARRAY_FILTER_USE_KEY,
);
$failures = $this->social_profiles_helper->set_person_social_profiles( $params['user_id'], $social_profiles );
diff --git a/src/actions/importing/aioseo/aioseo-cleanup-action.php b/src/actions/importing/aioseo/aioseo-cleanup-action.php
index 13195bfba72..c2f90288223 100644
--- a/src/actions/importing/aioseo/aioseo-cleanup-action.php
+++ b/src/actions/importing/aioseo/aioseo-cleanup-action.php
@@ -130,7 +130,7 @@ public function cleanup_postmeta_query() {
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input.
return $this->wpdb->prepare(
"DELETE FROM {$table} WHERE meta_key IN (" . \implode( ', ', \array_fill( 0, \count( $meta_keys_to_delete ), '%s' ) ) . ')',
- $meta_keys_to_delete
+ $meta_keys_to_delete,
);
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
}
diff --git a/src/actions/importing/aioseo/aioseo-posts-importing-action.php b/src/actions/importing/aioseo/aioseo-posts-importing-action.php
index 71bdbdbc1ec..eff92311c25 100644
--- a/src/actions/importing/aioseo/aioseo-posts-importing-action.php
+++ b/src/actions/importing/aioseo/aioseo-posts-importing-action.php
@@ -461,7 +461,7 @@ public function query( $limit = false, $just_detect = false ) {
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input.
return $this->wpdb->prepare(
"SELECT {$select_statement} FROM {$table} WHERE id > %d ORDER BY id{$limit_statement}",
- $replacements
+ $replacements,
);
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
}
diff --git a/src/actions/importing/aioseo/aioseo-validate-data-action.php b/src/actions/importing/aioseo/aioseo-validate-data-action.php
index 17817f1d1f2..72a3f03aa2e 100644
--- a/src/actions/importing/aioseo/aioseo-validate-data-action.php
+++ b/src/actions/importing/aioseo/aioseo-validate-data-action.php
@@ -142,7 +142,7 @@ public function validate_aioseo_table() {
$aioseo_columns = $this->wpdb->get_col(
"SHOW COLUMNS FROM {$table}", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input.
- 0
+ 0,
);
return $needed_data === \array_intersect( $needed_data, $aioseo_columns );
diff --git a/src/actions/indexing/indexable-post-indexation-action.php b/src/actions/indexing/indexable-post-indexation-action.php
index d549a2b9842..88854226147 100644
--- a/src/actions/indexing/indexable-post-indexation-action.php
+++ b/src/actions/indexing/indexable-post-indexation-action.php
@@ -143,7 +143,7 @@ protected function get_count_query() {
$excluded_post_statuses = $this->post_helper->get_excluded_post_statuses();
$replacements = \array_merge(
$post_types,
- $excluded_post_statuses
+ $excluded_post_statuses,
);
$replacements[] = $this->version;
@@ -160,7 +160,7 @@ protected function get_count_query() {
SELECT I.object_id from $indexable_table as I
WHERE I.object_type = 'post'
AND I.version = %d )",
- $replacements
+ $replacements,
);
}
@@ -178,7 +178,7 @@ protected function get_select_query( $limit = false ) {
$excluded_post_statuses = $this->post_helper->get_excluded_post_statuses();
$replacements = \array_merge(
$post_types,
- $excluded_post_statuses
+ $excluded_post_statuses,
);
$replacements[] = $this->version;
@@ -201,7 +201,7 @@ protected function get_select_query( $limit = false ) {
WHERE I.object_type = 'post'
AND I.version = %d )
$limit_query",
- $replacements
+ $replacements,
);
}
}
diff --git a/src/actions/indexing/indexable-term-indexation-action.php b/src/actions/indexing/indexable-term-indexation-action.php
index b1dbfd356a8..0d0b54d24ea 100644
--- a/src/actions/indexing/indexable-term-indexation-action.php
+++ b/src/actions/indexing/indexable-term-indexation-action.php
@@ -148,7 +148,7 @@ protected function get_count_query() {
AND I.version = %d
WHERE I.object_id IS NULL
AND taxonomy IN ($taxonomies_placeholders)",
- $replacements
+ $replacements,
);
}
@@ -191,7 +191,7 @@ protected function get_select_query( $limit = false ) {
WHERE I.object_id IS NULL
AND taxonomy IN ($placeholders)
$limit_query",
- $replacements
+ $replacements,
);
}
}
diff --git a/src/actions/indexing/post-link-indexing-action.php b/src/actions/indexing/post-link-indexing-action.php
index 3f96a5ec9a8..0d13a0741be 100644
--- a/src/actions/indexing/post-link-indexing-action.php
+++ b/src/actions/indexing/post-link-indexing-action.php
@@ -63,7 +63,7 @@ static function ( $post ) {
'content' => $post->post_content,
];
},
- $posts
+ $posts,
);
}
@@ -94,7 +94,7 @@ protected function get_count_query() {
WHERE ( I.object_id IS NULL OR L.post_id IS NOT NULL )
AND P.post_status = 'publish'
AND P.post_type IN (" . \implode( ', ', \array_fill( 0, \count( $public_post_types ), '%s' ) ) . ')',
- $public_post_types
+ $public_post_types,
);
}
@@ -136,7 +136,7 @@ protected function get_select_query( $limit = false ) {
AND P.post_status = 'publish'
AND P.post_type IN (" . \implode( ', ', \array_fill( 0, \count( $public_post_types ), '%s' ) ) . ")
$limit_query",
- $replacements
+ $replacements,
);
}
}
diff --git a/src/actions/indexing/term-link-indexing-action.php b/src/actions/indexing/term-link-indexing-action.php
index 3e6a4bc3a31..68a3432f5aa 100644
--- a/src/actions/indexing/term-link-indexing-action.php
+++ b/src/actions/indexing/term-link-indexing-action.php
@@ -67,7 +67,7 @@ static function ( $term ) {
'content' => $term->description,
];
},
- $terms
+ $terms,
);
}
@@ -97,7 +97,7 @@ protected function get_count_query() {
AND I.link_count IS NOT NULL
WHERE I.object_id IS NULL
AND T.taxonomy IN ($placeholders)",
- $public_taxonomies
+ $public_taxonomies,
);
}
@@ -136,7 +136,7 @@ protected function get_select_query( $limit = false ) {
WHERE I.object_id IS NULL
AND T.taxonomy IN (" . \implode( ', ', \array_fill( 0, \count( $public_taxonomies ), '%s' ) ) . ")
$limit_query",
- $replacements
+ $replacements,
);
}
}
diff --git a/src/actions/wincher/wincher-keyphrases-action.php b/src/actions/wincher/wincher-keyphrases-action.php
index dd51f5b6658..5b469682ba2 100644
--- a/src/actions/wincher/wincher-keyphrases-action.php
+++ b/src/actions/wincher/wincher-keyphrases-action.php
@@ -85,7 +85,7 @@ public function track_keyphrases( $keyphrases, $limits ) {
try {
$endpoint = \sprintf(
self::KEYPHRASES_ADD_URL,
- $this->options_helper->get( 'wincher_website_id' )
+ $this->options_helper->get( 'wincher_website_id' ),
);
// Enforce arrrays to ensure a consistent way of preparing the request.
@@ -113,8 +113,8 @@ static function ( $keyphrase ) {
'groups' => [],
];
},
- $keyphrases
- )
+ $keyphrases,
+ ),
);
$results = $this->client->post( $endpoint, WPSEO_Utils::format_json_encode( $formatted_keyphrases ) );
@@ -131,12 +131,12 @@ static function ( $keyphrase ) {
'keyword' => $keyphrase['keyword'],
];
},
- $results['data']
+ $results['data'],
);
$results['data'] = \array_combine(
\array_column( $results['data'], 'keyword' ),
- \array_values( $results['data'] )
+ \array_values( $results['data'] ),
);
return $this->to_result_object( $results );
@@ -160,7 +160,7 @@ public function untrack_keyphrase( $keyphrase_id ) {
$endpoint = \sprintf(
self::KEYPHRASE_DELETE_URL,
$this->options_helper->get( 'wincher_website_id' ),
- $keyphrase_id
+ $keyphrase_id,
);
$this->client->delete( $endpoint );
@@ -188,9 +188,7 @@ public function untrack_keyphrase( $keyphrase_id ) {
*/
public function get_tracked_keyphrases( $used_keyphrases = null, $permalink = null, $start_at = null ) {
try {
- if ( $used_keyphrases === null ) {
- $used_keyphrases = $this->collect_all_keyphrases();
- }
+ $used_keyphrases ??= $this->collect_all_keyphrases();
// If we still have no keyphrases the API will return an error, so
// don't even bother sending a request.
@@ -199,13 +197,13 @@ public function get_tracked_keyphrases( $used_keyphrases = null, $permalink = nu
[
'data' => [],
'status' => 200,
- ]
+ ],
);
}
$endpoint = \sprintf(
self::KEYPHRASES_URL,
- $this->options_helper->get( 'wincher_website_id' )
+ $this->options_helper->get( 'wincher_website_id' ),
);
$results = $this->client->post(
@@ -215,11 +213,11 @@ public function get_tracked_keyphrases( $used_keyphrases = null, $permalink = nu
'keywords' => $used_keyphrases,
'url' => $permalink,
'start_at' => $start_at,
- ]
+ ],
),
[
'timeout' => 60,
- ]
+ ],
);
if ( ! \array_key_exists( 'data', $results ) ) {
@@ -231,7 +229,7 @@ public function get_tracked_keyphrases( $used_keyphrases = null, $permalink = nu
// Extract the positional data and assign it to the keyphrase.
$results['data'] = \array_combine(
\array_column( $results['data'], 'keyword' ),
- \array_values( $results['data'] )
+ \array_values( $results['data'] ),
);
return $this->to_result_object( $results );
@@ -287,7 +285,7 @@ protected function collect_all_keyphrases() {
->where_not_equal( 'post_status', 'trash' )
->distinct()
->find_array(),
- 'primary_focus_keyword'
+ 'primary_focus_keyword',
);
/**
@@ -314,7 +312,7 @@ protected function filter_results_by_used_keyphrases( $results, $used_keyphrases
$results,
static function ( $result ) use ( $used_keyphrases ) {
return \in_array( $result['keyword'], \array_map( 'strtolower', $used_keyphrases ), true );
- }
+ },
);
}
diff --git a/src/ai-authorization/application/token-manager.php b/src/ai-authorization/application/token-manager.php
index 42b6eadddc9..8b62c724360 100644
--- a/src/ai-authorization/application/token-manager.php
+++ b/src/ai-authorization/application/token-manager.php
@@ -156,8 +156,8 @@ public function token_invalidate( string $user_id ): void {
new Request(
'/token/invalidate',
$request_body,
- $request_headers
- )
+ $request_headers,
+ ),
);
} catch ( Unauthorized_Exception | Forbidden_Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch -- Reason: Ignored on purpose.
// If the credentials in our request were already invalid, our job is done and we continue to remove the tokens client-side.
diff --git a/src/ai-authorization/infrastructure/access-token-user-meta-repository.php b/src/ai-authorization/infrastructure/access-token-user-meta-repository.php
index 2dc0a3f02b5..41315edc16a 100644
--- a/src/ai-authorization/infrastructure/access-token-user-meta-repository.php
+++ b/src/ai-authorization/infrastructure/access-token-user-meta-repository.php
@@ -57,7 +57,7 @@ public function store_token( int $user_id, string $value ): void {
$this->user_helper->update_meta(
$user_id,
self::META_KEY,
- $value
+ $value,
); }
/**
diff --git a/src/ai-authorization/infrastructure/code-verifier-user-meta-repository.php b/src/ai-authorization/infrastructure/code-verifier-user-meta-repository.php
index f281da8381d..be5a1dad6d5 100644
--- a/src/ai-authorization/infrastructure/code-verifier-user-meta-repository.php
+++ b/src/ai-authorization/infrastructure/code-verifier-user-meta-repository.php
@@ -55,7 +55,7 @@ public function store_code_verifier( int $user_id, string $code, int $created_at
[
'code' => $code,
'created_at' => $created_at,
- ]
+ ],
);
}
diff --git a/src/ai-authorization/infrastructure/refresh-token-user-meta-repository.php b/src/ai-authorization/infrastructure/refresh-token-user-meta-repository.php
index ae7da309465..948940c1931 100644
--- a/src/ai-authorization/infrastructure/refresh-token-user-meta-repository.php
+++ b/src/ai-authorization/infrastructure/refresh-token-user-meta-repository.php
@@ -57,7 +57,7 @@ public function store_token( int $user_id, string $value ): void {
$this->user_helper->update_meta(
$user_id,
self::META_KEY,
- $value
+ $value,
); }
/**
diff --git a/src/ai-authorization/user-interface/abstract-callback-route.php b/src/ai-authorization/user-interface/abstract-callback-route.php
index 5129b19db2e..e104c1b17cd 100644
--- a/src/ai-authorization/user-interface/abstract-callback-route.php
+++ b/src/ai-authorization/user-interface/abstract-callback-route.php
@@ -101,7 +101,7 @@ public function callback( WP_REST_Request $request ): WP_REST_Response {
[
'message' => 'Tokens successfully stored.',
'code_verifier' => $code_verifier->get_code(),
- ]
+ ],
);
}
diff --git a/src/ai-authorization/user-interface/callback-route.php b/src/ai-authorization/user-interface/callback-route.php
index ac22f0005b4..a653b93ef1a 100644
--- a/src/ai-authorization/user-interface/callback-route.php
+++ b/src/ai-authorization/user-interface/callback-route.php
@@ -54,7 +54,7 @@ public function register_routes() {
],
'callback' => [ $this, 'callback' ],
'permission_callback' => '__return_true',
- ]
+ ],
);
}
}
diff --git a/src/ai-authorization/user-interface/refresh-callback-route.php b/src/ai-authorization/user-interface/refresh-callback-route.php
index b9d81cee557..ccb58b55843 100644
--- a/src/ai-authorization/user-interface/refresh-callback-route.php
+++ b/src/ai-authorization/user-interface/refresh-callback-route.php
@@ -54,7 +54,7 @@ public function register_routes() {
],
'callback' => [ $this, 'callback' ],
'permission_callback' => '__return_true',
- ]
+ ],
);
}
}
diff --git a/src/ai-consent/user-interface/consent-route.php b/src/ai-consent/user-interface/consent-route.php
index e5dca97430f..922896a6d2b 100644
--- a/src/ai-consent/user-interface/consent-route.php
+++ b/src/ai-consent/user-interface/consent-route.php
@@ -97,7 +97,7 @@ public function register_routes() {
],
'callback' => [ $this, 'consent' ],
'permission_callback' => [ $this, 'check_permissions' ],
- ]
+ ],
);
}
@@ -110,7 +110,7 @@ public function register_routes() {
*/
public function consent( WP_REST_Request $request ): WP_REST_Response {
$user_id = \get_current_user_id();
- $consent = \boolval( $request->get_param( 'consent' ) );
+ $consent = (bool) $request->get_param( 'consent' );
try {
if ( $consent ) {
diff --git a/src/ai-free-sparks/user-interface/free-sparks-route.php b/src/ai-free-sparks/user-interface/free-sparks-route.php
index 8e2c6a27320..664d6922d97 100644
--- a/src/ai-free-sparks/user-interface/free-sparks-route.php
+++ b/src/ai-free-sparks/user-interface/free-sparks-route.php
@@ -66,7 +66,7 @@ public function register_routes() {
'methods' => 'POST',
'callback' => [ $this, 'start' ],
'permission_callback' => [ $this, 'can_edit_posts' ],
- ]
+ ],
);
}
diff --git a/src/ai-generator/domain/suggestions-bucket.php b/src/ai-generator/domain/suggestions-bucket.php
index 71399b567ed..478c07e2d9c 100644
--- a/src/ai-generator/domain/suggestions-bucket.php
+++ b/src/ai-generator/domain/suggestions-bucket.php
@@ -43,7 +43,7 @@ public function to_array() {
static function ( $item ) {
return $item->get_value();
},
- $this->suggestions
+ $this->suggestions,
);
}
}
diff --git a/src/ai-generator/user-interface/bust-subscription-cache-route.php b/src/ai-generator/user-interface/bust-subscription-cache-route.php
index 2a9a87ce7a2..33f830a286e 100644
--- a/src/ai-generator/user-interface/bust-subscription-cache-route.php
+++ b/src/ai-generator/user-interface/bust-subscription-cache-route.php
@@ -73,7 +73,7 @@ public function register_routes() {
'args' => [],
'callback' => [ $this, 'bust_subscription_cache' ],
'permission_callback' => [ $this, 'check_permissions' ],
- ]
+ ],
);
}
diff --git a/src/ai-generator/user-interface/get-suggestions-route.php b/src/ai-generator/user-interface/get-suggestions-route.php
index 5135ddcb85e..03e4b657dad 100644
--- a/src/ai-generator/user-interface/get-suggestions-route.php
+++ b/src/ai-generator/user-interface/get-suggestions-route.php
@@ -131,7 +131,7 @@ public function register_routes() {
],
'callback' => [ $this, 'get_suggestions' ],
'permission_callback' => [ $this, 'check_permissions' ],
- ]
+ ],
);
}
@@ -152,7 +152,7 @@ public function get_suggestions( WP_REST_Request $request ): WP_REST_Response {
$request->get_param( 'focus_keyphrase' ),
$request->get_param( 'language' ),
$request->get_param( 'platform' ),
- $request->get_param( 'editor' )
+ $request->get_param( 'editor' ),
);
} catch ( Remote_Request_Exception $e ) {
$message = [
@@ -164,7 +164,7 @@ public function get_suggestions( WP_REST_Request $request ): WP_REST_Response {
}
return new WP_REST_Response(
$message,
- $e->getCode()
+ $e->getCode(),
);
} catch ( RuntimeException $e ) {
return new WP_REST_Response( 'Failed to get suggestions.', 500 );
diff --git a/src/ai-generator/user-interface/get-usage-route.php b/src/ai-generator/user-interface/get-usage-route.php
index 32f5acfa27a..adf1e640a29 100644
--- a/src/ai-generator/user-interface/get-usage-route.php
+++ b/src/ai-generator/user-interface/get-usage-route.php
@@ -102,7 +102,7 @@ public function register_routes() {
],
'callback' => [ $this, 'get_usage' ],
'permission_callback' => [ $this, 'check_permissions' ],
- ]
+ ],
);
}
@@ -135,7 +135,7 @@ public function get_usage( $request ): WP_REST_Response {
}
return new WP_REST_Response(
$message,
- $e->getCode()
+ $e->getCode(),
);
}
diff --git a/src/ai-http-request/application/request-handler.php b/src/ai-http-request/application/request-handler.php
index efd51bfc23a..757298d1a12 100644
--- a/src/ai-http-request/application/request-handler.php
+++ b/src/ai-http-request/application/request-handler.php
@@ -76,7 +76,7 @@ public function handle( Request $request ): Response {
$request->get_action_path(),
$request->get_body(),
$request->get_headers(),
- $request->is_post()
+ $request->is_post(),
);
$response = $this->response_parser->parse( $api_response );
diff --git a/src/alerts/application/default-seo-data/default-seo-data-alert.php b/src/alerts/application/default-seo-data/default-seo-data-alert.php
index 60af7692a26..915e7eaf7cd 100644
--- a/src/alerts/application/default-seo-data/default-seo-data-alert.php
+++ b/src/alerts/application/default-seo-data/default-seo-data-alert.php
@@ -160,7 +160,7 @@ private function get_default_seo_data_notification( $has_enough_posts_with_defau
'id' => self::NOTIFICATION_ID,
'type' => Yoast_Notification::WARNING,
'capabilities' => [ 'wpseo_manage_options' ],
- ]
+ ],
);
}
@@ -197,7 +197,7 @@ private function get_default_seo_data_message( $has_enough_posts_with_default_ti
'',
'',
'',
- ''
+ '',
);
}
}
diff --git a/src/alerts/application/ping-other-admins/ping-other-admins-alert.php b/src/alerts/application/ping-other-admins/ping-other-admins-alert.php
index 25b0866fd08..b2cab981aee 100644
--- a/src/alerts/application/ping-other-admins/ping-other-admins-alert.php
+++ b/src/alerts/application/ping-other-admins/ping-other-admins-alert.php
@@ -160,7 +160,7 @@ private function get_ping_other_admins_notification(): Yoast_Notification {
'capabilities' => [ 'wpseo_manage_options' ],
'priority' => 20,
'resolve_nonce' => \wp_create_nonce( 'wpseo-resolve-alert-nonce' ),
- ]
+ ],
);
}
@@ -173,7 +173,7 @@ private function get_message() {
$message = \sprintf(
/* translators: %1$s expands to "Yoast SEO". */
\esc_html__( 'Looks like you’re new here. %1$s makes it easy to optimize your website for search engines. Want to keep your site healthy and easier to find? Sign up below to receive practical emails to get you started!', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
$notification_text = '
' . $message . '
';
diff --git a/src/alerts/user-interface/default-seo-data/default-seo-data-cron-callback-integration.php b/src/alerts/user-interface/default-seo-data/default-seo-data-cron-callback-integration.php
index d30dd12bac0..1117fbcc3f3 100644
--- a/src/alerts/user-interface/default-seo-data/default-seo-data-cron-callback-integration.php
+++ b/src/alerts/user-interface/default-seo-data/default-seo-data-cron-callback-integration.php
@@ -67,7 +67,7 @@ public function register_hooks() {
[
$this,
'detect_default_seo_data_in_recent',
- ]
+ ],
);
}
diff --git a/src/alerts/user-interface/resolve-alert-route.php b/src/alerts/user-interface/resolve-alert-route.php
index 5b2a49cdd2a..0e24582890b 100644
--- a/src/alerts/user-interface/resolve-alert-route.php
+++ b/src/alerts/user-interface/resolve-alert-route.php
@@ -64,7 +64,7 @@ public function resolve_alert() {
\wp_send_json_error(
[
'message' => 'Security check failed.',
- ]
+ ],
);
return;
}
@@ -73,7 +73,7 @@ public function resolve_alert() {
\wp_send_json_error(
[
'message' => 'Alert ID is missing.',
- ]
+ ],
);
return;
}
@@ -86,7 +86,7 @@ public function resolve_alert() {
\wp_send_json_success(
[
'message' => 'Alert resolved successfully.',
- ]
+ ],
);
}
}
diff --git a/src/analytics/application/missing-indexables-collector.php b/src/analytics/application/missing-indexables-collector.php
index 957d4127367..28d71b53093 100644
--- a/src/analytics/application/missing-indexables-collector.php
+++ b/src/analytics/application/missing-indexables-collector.php
@@ -66,7 +66,7 @@ private function add_additional_indexing_actions() {
$indexing_actions,
static function ( $indexing_action ) {
return \is_a( $indexing_action, Indexation_Action_Interface::class );
- }
+ },
);
}
}
diff --git a/src/analytics/domain/missing-indexable-bucket.php b/src/analytics/domain/missing-indexable-bucket.php
index f384c5a1c65..391da0059d7 100644
--- a/src/analytics/domain/missing-indexable-bucket.php
+++ b/src/analytics/domain/missing-indexable-bucket.php
@@ -42,7 +42,7 @@ public function to_array() {
static function ( $item ) {
return $item->to_array();
},
- $this->missing_indexable_counts
+ $this->missing_indexable_counts,
);
}
}
diff --git a/src/analytics/domain/to-be-cleaned-indexable-bucket.php b/src/analytics/domain/to-be-cleaned-indexable-bucket.php
index abaf1f886c9..5aa5cf3cafb 100644
--- a/src/analytics/domain/to-be-cleaned-indexable-bucket.php
+++ b/src/analytics/domain/to-be-cleaned-indexable-bucket.php
@@ -42,7 +42,7 @@ public function to_array() {
static function ( $item ) {
return $item->to_array();
},
- $this->to_be_cleaned_indexable_counts
+ $this->to_be_cleaned_indexable_counts,
);
}
}
diff --git a/src/analytics/user-interface/last-completed-indexation-integration.php b/src/analytics/user-interface/last-completed-indexation-integration.php
index 6360b70f86c..ec7eef1b395 100644
--- a/src/analytics/user-interface/last-completed-indexation-integration.php
+++ b/src/analytics/user-interface/last-completed-indexation-integration.php
@@ -42,7 +42,7 @@ public function register_hooks(): void {
'maybe_set_indexables_unindexed_calculated',
],
10,
- 2
+ 2,
);
}
diff --git a/src/builders/indexable-author-builder.php b/src/builders/indexable-author-builder.php
index 6977ed9e6f0..ba1d3ed6289 100644
--- a/src/builders/indexable-author-builder.php
+++ b/src/builders/indexable-author-builder.php
@@ -163,7 +163,7 @@ protected function find_alternative_image( Indexable $indexable ) {
[
'size' => 500,
'scheme' => 'https',
- ]
+ ],
);
if ( $gravatar_image ) {
return [
@@ -208,8 +208,8 @@ protected function get_object_timestamps( $author_id ) {
AND p.%i = ''
AND p.%i = %d
",
- $replacements
- )
+ $replacements,
+ ),
);
//phpcs:enable
}
diff --git a/src/builders/indexable-builder.php b/src/builders/indexable-builder.php
index ac556a05f5a..719b90a2f9b 100644
--- a/src/builders/indexable-builder.php
+++ b/src/builders/indexable-builder.php
@@ -278,7 +278,7 @@ protected function maybe_build_author_indexable( $author_id ) {
$author_indexable = $this->indexable_repository->find_by_id_and_type(
$author_id,
'user',
- false
+ false,
);
if ( ! $author_indexable || $this->version_manager->indexable_needs_upgrade( $author_indexable ) ) {
// Try to build the author.
@@ -398,7 +398,7 @@ public function build( $indexable, $defaults = null ) {
'object_type' => $indexable->object_type,
'post_status' => 'unindexed',
'version' => 0,
- ]
+ ],
);
// If we already had an existing indexable, mark it as unindexed. We cannot rely on its validity anymore.
$indexable->post_status = 'unindexed';
diff --git a/src/builders/indexable-home-page-builder.php b/src/builders/indexable-home-page-builder.php
index bb803fa3e05..86bf4edf0d1 100644
--- a/src/builders/indexable-home-page-builder.php
+++ b/src/builders/indexable-home-page-builder.php
@@ -140,8 +140,8 @@ protected function get_object_timestamps() {
AND p.%i = ''
AND p.%i = 'post'
",
- $replacements
- )
+ $replacements,
+ ),
);
//phpcs:enable
}
diff --git a/src/builders/indexable-link-builder.php b/src/builders/indexable-link-builder.php
index 48520c7485d..3e04055b91a 100644
--- a/src/builders/indexable-link-builder.php
+++ b/src/builders/indexable-link-builder.php
@@ -254,14 +254,14 @@ protected function create_links( $indexable, $links, $images ) {
function ( $link ) use ( $home_url, $indexable ) {
return $this->create_internal_link( $link, $home_url, $indexable );
},
- $links
+ $links,
);
// Filter out links to the same page with a fragment or query.
$links = \array_filter(
$links,
function ( $link ) use ( $current_url ) {
return $this->filter_link( $link, $current_url );
- }
+ },
);
$image_links = [];
@@ -314,7 +314,7 @@ protected function create_internal_link( $url, $home_url, $indexable, $is_image
'type' => $link_type,
'indexable_id' => $indexable->id,
'post_id' => $indexable->object_id,
- ]
+ ],
);
$model->parsed_url = $parsed_url;
@@ -503,7 +503,7 @@ protected function links_diff( $links_a, $links_b ) {
$links_b,
static function ( SEO_Links $link_a, SEO_Links $link_b ) {
return \strcmp( $link_a->url, $link_b->url );
- }
+ },
);
}
diff --git a/src/builders/indexable-post-builder.php b/src/builders/indexable-post-builder.php
index e5d9c3efab5..2784f552169 100644
--- a/src/builders/indexable-post-builder.php
+++ b/src/builders/indexable-post-builder.php
@@ -133,7 +133,7 @@ public function build( $post_id, $indexable ) {
$indexable->primary_focus_keyword_score = $this->get_keyword_score(
$this->meta->get_value( 'focuskw', $post_id ),
- (int) $this->meta->get_value( 'linkdex', $post_id )
+ (int) $this->meta->get_value( 'linkdex', $post_id ),
);
$indexable->readability_score = (int) $this->meta->get_value( 'content_score', $post_id );
@@ -142,7 +142,7 @@ public function build( $post_id, $indexable ) {
$indexable->is_cornerstone = ( $this->meta->get_value( 'is_cornerstone', $post_id ) === '1' );
$indexable->is_robots_noindex = $this->get_robots_noindex(
- (int) $this->meta->get_value( 'meta-robots-noindex', $post_id )
+ (int) $this->meta->get_value( 'meta-robots-noindex', $post_id ),
);
// Set additional meta-robots values.
diff --git a/src/builders/indexable-post-type-archive-builder.php b/src/builders/indexable-post-type-archive-builder.php
index 3d04aa5d5cc..1b4de3fde97 100644
--- a/src/builders/indexable-post-type-archive-builder.php
+++ b/src/builders/indexable-post-type-archive-builder.php
@@ -160,8 +160,8 @@ protected function get_object_timestamps( $post_type ) {
AND p.%i = ''
AND p.%i = %s
",
- $replacements
- )
+ $replacements,
+ ),
);
//phpcs:enable
}
diff --git a/src/builders/indexable-term-builder.php b/src/builders/indexable-term-builder.php
index 3484a37dda5..78eb342161c 100644
--- a/src/builders/indexable-term-builder.php
+++ b/src/builders/indexable-term-builder.php
@@ -101,7 +101,7 @@ public function build( $term_id, $indexable ) {
$indexable->primary_focus_keyword_score = $this->get_keyword_score(
$this->get_meta_value( 'wpseo_focuskw', $term_meta ),
- $this->get_meta_value( 'wpseo_linkdex', $term_meta )
+ $this->get_meta_value( 'wpseo_linkdex', $term_meta ),
);
$indexable->is_robots_noindex = $this->get_noindex_value( $this->get_meta_value( 'wpseo_noindex', $term_meta ) );
@@ -283,8 +283,8 @@ protected function get_object_timestamps( $term_id, $taxonomy ) {
WHERE p.%i IN (' . \implode( ', ', \array_fill( 0, \count( $post_statuses ), '%s' ) ) . ")
AND p.%i = ''
",
- $replacements
- )
+ $replacements,
+ ),
);
//phpcs:enable
}
diff --git a/src/commands/cleanup-command.php b/src/commands/cleanup-command.php
index 7bbba3dedfa..dbc565c2bf0 100644
--- a/src/commands/cleanup-command.php
+++ b/src/commands/cleanup-command.php
@@ -98,10 +98,10 @@ public function cleanup( $args = null, $assoc_args = null ) {
'Cleaned up %1$d record.',
'Cleaned up %1$d records.',
$total_removed,
- 'wordpress-seo'
+ 'wordpress-seo',
),
- $total_removed
- )
+ $total_removed,
+ ),
);
}
@@ -184,11 +184,11 @@ private function cleanup_current_site( $assoc_args ) {
'Cleaned up %1$d record from %2$s.',
'Cleaned up %1$d records from %2$s.',
$total_removed,
- 'wordpress-seo'
+ 'wordpress-seo',
),
$total_removed,
- $site_url
- )
+ $site_url,
+ ),
);
return $total_removed;
diff --git a/src/commands/index-command.php b/src/commands/index-command.php
index ac612cd101f..4b860e16154 100644
--- a/src/commands/index-command.php
+++ b/src/commands/index-command.php
@@ -171,7 +171,7 @@ public static function get_namespace() {
public function index( $args = null, $assoc_args = null ) {
if ( ! $this->indexable_helper->should_index_indexables() ) {
WP_CLI::log(
- \__( 'Your WordPress environment is running on a non-production site. Indexables can only be created on production environments. Please check your `WP_ENVIRONMENT_TYPE` settings.', 'wordpress-seo' )
+ \__( 'Your WordPress environment is running on a non-production site. Indexables can only be created on production environments. Please check your `WP_ENVIRONMENT_TYPE` settings.', 'wordpress-seo' ),
);
return;
@@ -282,14 +282,14 @@ protected function clear() {
$wpdb->query(
$wpdb->prepare(
'TRUNCATE TABLE %1$s',
- Model::get_table_name( 'Indexable' )
- )
+ Model::get_table_name( 'Indexable' ),
+ ),
);
$wpdb->query(
$wpdb->prepare(
'TRUNCATE TABLE %1$s',
- Model::get_table_name( 'Indexable_Hierarchy' )
- )
+ Model::get_table_name( 'Indexable_Hierarchy' ),
+ ),
);
// phpcs:enable
}
diff --git a/src/config/badge-group-names.php b/src/config/badge-group-names.php
index 59ae793cf76..e8ba39e87f6 100644
--- a/src/config/badge-group-names.php
+++ b/src/config/badge-group-names.php
@@ -53,9 +53,7 @@ public function is_still_eligible_for_new_badge( $group, $current_version = null
$group_version = $this::GROUP_NAMES[ $group ];
- if ( $current_version === null ) {
- $current_version = $this->version;
- }
+ $current_version ??= $this->version;
return (bool) \version_compare( $group_version, $current_version, '>' );
}
diff --git a/src/config/conflicting-plugins.php b/src/config/conflicting-plugins.php
index b6e2b67c6cd..769df5d65a0 100644
--- a/src/config/conflicting-plugins.php
+++ b/src/config/conflicting-plugins.php
@@ -105,7 +105,7 @@ public static function all_plugins() {
self::OPEN_GRAPH_PLUGINS,
self::XML_SITEMAPS_PLUGINS,
self::CLOAKING_PLUGINS,
- self::SEO_PLUGINS
+ self::SEO_PLUGINS,
);
}
}
diff --git a/src/config/migrations/20171228151840_WpYoastIndexable.php b/src/config/migrations/20171228151840_WpYoastIndexable.php
index 5ed29a66554..0b8d2020259 100644
--- a/src/config/migrations/20171228151840_WpYoastIndexable.php
+++ b/src/config/migrations/20171228151840_WpYoastIndexable.php
@@ -53,7 +53,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
// Object information.
@@ -64,7 +64,7 @@ private function add_table() {
'unsigned' => true,
'null' => true,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column(
'object_type',
@@ -72,7 +72,7 @@ private function add_table() {
[
'null' => false,
'limit' => 32,
- ]
+ ],
);
$indexable_table->column(
'object_sub_type',
@@ -80,7 +80,7 @@ private function add_table() {
[
'null' => true,
'limit' => 32,
- ]
+ ],
);
// Ownership.
@@ -91,7 +91,7 @@ private function add_table() {
'unsigned' => true,
'null' => true,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column(
'post_parent',
@@ -100,7 +100,7 @@ private function add_table() {
'unsigned' => true,
'null' => true,
'limit' => 11,
- ]
+ ],
);
// Title and description.
@@ -110,7 +110,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column( 'description', 'text', [ 'null' => true ] );
$indexable_table->column(
@@ -119,7 +119,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
// Post metadata: status, public, protected.
@@ -129,7 +129,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column(
'is_public',
@@ -137,7 +137,7 @@ private function add_table() {
[
'null' => true,
'default' => null,
- ]
+ ],
);
$indexable_table->column( 'is_protected', 'boolean', [ 'default' => false ] );
$indexable_table->column(
@@ -146,7 +146,7 @@ private function add_table() {
[
'null' => true,
'default' => null,
- ]
+ ],
);
$indexable_table->column(
@@ -157,7 +157,7 @@ private function add_table() {
'null' => true,
'default' => null,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column( 'canonical', 'mediumtext', [ 'null' => true ] );
@@ -169,7 +169,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column(
'primary_focus_keyword_score',
@@ -177,7 +177,7 @@ private function add_table() {
[
'null' => true,
'limit' => 3,
- ]
+ ],
);
$indexable_table->column(
'readability_score',
@@ -185,7 +185,7 @@ private function add_table() {
[
'null' => true,
'limit' => 3,
- ]
+ ],
);
$indexable_table->column( 'is_cornerstone', 'boolean', [ 'default' => false ] );
@@ -196,7 +196,7 @@ private function add_table() {
[
'null' => true,
'default' => false,
- ]
+ ],
);
$indexable_table->column(
'is_robots_nofollow',
@@ -204,7 +204,7 @@ private function add_table() {
[
'null' => true,
'default' => false,
- ]
+ ],
);
$indexable_table->column(
'is_robots_noarchive',
@@ -212,7 +212,7 @@ private function add_table() {
[
'null' => true,
'default' => false,
- ]
+ ],
);
$indexable_table->column(
'is_robots_noimageindex',
@@ -220,7 +220,7 @@ private function add_table() {
[
'null' => true,
'default' => false,
- ]
+ ],
);
$indexable_table->column(
'is_robots_nosnippet',
@@ -228,7 +228,7 @@ private function add_table() {
[
'null' => true,
'default' => false,
- ]
+ ],
);
// Twitter.
@@ -238,7 +238,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column( 'twitter_image', 'mediumtext', [ 'null' => true ] );
$indexable_table->column( 'twitter_description', 'mediumtext', [ 'null' => true ] );
@@ -248,7 +248,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column(
'twitter_image_source',
@@ -256,7 +256,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
// Open-Graph.
@@ -266,7 +266,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column( 'open_graph_description', 'mediumtext', [ 'null' => true ] );
$indexable_table->column( 'open_graph_image', 'mediumtext', [ 'null' => true ] );
@@ -276,7 +276,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column(
'open_graph_image_source',
@@ -284,7 +284,7 @@ private function add_table() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$indexable_table->column( 'open_graph_image_meta', 'text', [ 'null' => true ] );
@@ -295,7 +295,7 @@ private function add_table() {
[
'null' => true,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column(
'incoming_link_count',
@@ -303,7 +303,7 @@ private function add_table() {
[
'null' => true,
'limit' => 11,
- ]
+ ],
);
// Prominent words.
@@ -315,7 +315,7 @@ private function add_table() {
'limit' => 11,
'unsigned' => true,
'default' => null,
- ]
+ ],
);
$indexable_table->finish();
@@ -341,7 +341,7 @@ private function add_indexes( $indexable_table_name ) {
],
[
'name' => 'object_type_and_sub_type',
- ]
+ ],
);
$this->add_index(
@@ -349,7 +349,7 @@ private function add_indexes( $indexable_table_name ) {
'permalink_hash',
[
'name' => 'permalink_hash',
- ]
+ ],
);
}
diff --git a/src/config/migrations/20171228151841_WpYoastPrimaryTerm.php b/src/config/migrations/20171228151841_WpYoastPrimaryTerm.php
index e68f316b5a6..c65f83c7936 100644
--- a/src/config/migrations/20171228151841_WpYoastPrimaryTerm.php
+++ b/src/config/migrations/20171228151841_WpYoastPrimaryTerm.php
@@ -34,7 +34,7 @@ public function up() {
'unsigned' => true,
'null' => false,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column(
'term_id',
@@ -43,7 +43,7 @@ public function up() {
'unsigned' => true,
'null' => false,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column(
'taxonomy',
@@ -51,7 +51,7 @@ public function up() {
[
'null' => false,
'limit' => 32,
- ]
+ ],
);
// Executes the SQL to create the table.
@@ -65,7 +65,7 @@ public function up() {
],
[
'name' => 'post_taxonomy',
- ]
+ ],
);
$this->add_index(
@@ -76,7 +76,7 @@ public function up() {
],
[
'name' => 'post_term',
- ]
+ ],
);
$this->add_timestamps( $table_name );
diff --git a/src/config/migrations/20191011111109_WpYoastIndexableHierarchy.php b/src/config/migrations/20191011111109_WpYoastIndexableHierarchy.php
index 6d36d1a56af..cd5478a6cf3 100644
--- a/src/config/migrations/20191011111109_WpYoastIndexableHierarchy.php
+++ b/src/config/migrations/20191011111109_WpYoastIndexableHierarchy.php
@@ -35,7 +35,7 @@ public function up() {
'unsigned' => true,
'null' => true,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column(
'ancestor_id',
@@ -45,7 +45,7 @@ public function up() {
'unsigned' => true,
'null' => true,
'limit' => 11,
- ]
+ ],
);
$indexable_table->column(
'depth',
@@ -54,7 +54,7 @@ public function up() {
'unsigned' => true,
'null' => true,
'limit' => 11,
- ]
+ ],
);
$indexable_table->finish();
diff --git a/src/config/migrations/20200420073606_AddColumnsToIndexables.php b/src/config/migrations/20200420073606_AddColumnsToIndexables.php
index 6b77bc10780..d39ac705b2c 100644
--- a/src/config/migrations/20200420073606_AddColumnsToIndexables.php
+++ b/src/config/migrations/20200420073606_AddColumnsToIndexables.php
@@ -34,7 +34,7 @@ public function up() {
'null' => false,
'limit' => 20,
'default' => $blog_id,
- ]
+ ],
);
}
diff --git a/src/config/migrations/20200428123747_BreadcrumbTitleAndHierarchyReset.php b/src/config/migrations/20200428123747_BreadcrumbTitleAndHierarchyReset.php
index 83fcb74c6b3..21a96dac33a 100644
--- a/src/config/migrations/20200428123747_BreadcrumbTitleAndHierarchyReset.php
+++ b/src/config/migrations/20200428123747_BreadcrumbTitleAndHierarchyReset.php
@@ -40,7 +40,7 @@ public function down() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
}
diff --git a/src/config/migrations/20200428194858_ExpandIndexableColumnLengths.php b/src/config/migrations/20200428194858_ExpandIndexableColumnLengths.php
index 2633ae61549..aaac655fa81 100644
--- a/src/config/migrations/20200428194858_ExpandIndexableColumnLengths.php
+++ b/src/config/migrations/20200428194858_ExpandIndexableColumnLengths.php
@@ -45,31 +45,31 @@ public function down() {
$this->get_table_name(),
'title',
'string',
- $attr_limit_191
+ $attr_limit_191,
);
$this->change_column(
$this->get_table_name(),
'opengraph_title',
'string',
- $attr_limit_191
+ $attr_limit_191,
);
$this->change_column(
$this->get_table_name(),
'twitter_title',
'string',
- $attr_limit_191
+ $attr_limit_191,
);
$this->change_column(
$this->get_table_name(),
'open_graph_image_source',
'string',
- $attr_limit_191
+ $attr_limit_191,
);
$this->change_column(
$this->get_table_name(),
'twitter_image_source',
'string',
- $attr_limit_191
+ $attr_limit_191,
);
}
diff --git a/src/config/migrations/20200430075614_AddIndexableObjectIdAndTypeIndex.php b/src/config/migrations/20200430075614_AddIndexableObjectIdAndTypeIndex.php
index f4a702705f7..5884496c833 100644
--- a/src/config/migrations/20200430075614_AddIndexableObjectIdAndTypeIndex.php
+++ b/src/config/migrations/20200430075614_AddIndexableObjectIdAndTypeIndex.php
@@ -31,7 +31,7 @@ public function up() {
],
[
'name' => 'object_id_and_type',
- ]
+ ],
);
}
@@ -49,7 +49,7 @@ public function down() {
],
[
'name' => 'object_id_and_type',
- ]
+ ],
);
}
diff --git a/src/config/migrations/20200609154515_AddHasAncestorsColumn.php b/src/config/migrations/20200609154515_AddHasAncestorsColumn.php
index 34adf8b2604..f2c1e55ba43 100644
--- a/src/config/migrations/20200609154515_AddHasAncestorsColumn.php
+++ b/src/config/migrations/20200609154515_AddHasAncestorsColumn.php
@@ -30,7 +30,7 @@ public function up() {
'boolean',
[
'default' => false,
- ]
+ ],
);
Wrapper::get_wpdb()->query(
@@ -38,7 +38,7 @@ public function up() {
UPDATE ' . Model::get_table_name( 'Indexable' ) . '
SET has_ancestors = 1
WHERE id IN ( SELECT indexable_id FROM ' . Model::get_table_name( 'Indexable_Hierarchy' ) . ' )
- '
+ ',
);
}
diff --git a/src/config/migrations/20200616130143_ReplacePermalinkHashIndex.php b/src/config/migrations/20200616130143_ReplacePermalinkHashIndex.php
index bfb4c359e25..4961fc22a90 100644
--- a/src/config/migrations/20200616130143_ReplacePermalinkHashIndex.php
+++ b/src/config/migrations/20200616130143_ReplacePermalinkHashIndex.php
@@ -37,7 +37,7 @@ public function up() {
[
'null' => true,
'limit' => 40,
- ]
+ ],
);
if ( $adapter->has_index( $table_name, [ 'permalink_hash' ], [ 'name' => 'permalink_hash' ] ) ) {
@@ -48,7 +48,7 @@ public function up() {
],
[
'name' => 'permalink_hash',
- ]
+ ],
);
}
@@ -61,7 +61,7 @@ public function up() {
],
[
'name' => 'permalink_hash_and_object_type',
- ]
+ ],
);
}
}
@@ -88,7 +88,7 @@ public function down() {
],
[
'name' => 'permalink_hash_and_object_type',
- ]
+ ],
);
}
@@ -99,7 +99,7 @@ public function down() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
if ( ! $adapter->has_index( $table_name, [ 'permalink_hash' ], [ 'name' => 'permalink_hash' ] ) ) {
@@ -110,7 +110,7 @@ public function down() {
],
[
'name' => 'permalink_hash',
- ]
+ ],
);
}
}
diff --git a/src/config/migrations/20200617122511_CreateSEOLinksTable.php b/src/config/migrations/20200617122511_CreateSEOLinksTable.php
index c9b2fb6bcb4..067b42641b9 100644
--- a/src/config/migrations/20200617122511_CreateSEOLinksTable.php
+++ b/src/config/migrations/20200617122511_CreateSEOLinksTable.php
@@ -38,7 +38,7 @@ public function up() {
'limit' => 20,
'unsigned' => true,
'auto_increment' => true,
- ]
+ ],
);
$table->column( 'url', 'string', [ 'limit' => 255 ] );
$table->column(
@@ -47,7 +47,7 @@ public function up() {
[
'limit' => 20,
'unsigned' => true,
- ]
+ ],
);
$table->column(
'target_post_id',
@@ -55,7 +55,7 @@ public function up() {
[
'limit' => 20,
'unsigned' => true,
- ]
+ ],
);
$table->column( 'type', 'string', [ 'limit' => 8 ] );
$table->finish();
diff --git a/src/config/migrations/20200702141921_CreateIndexableSubpagesIndex.php b/src/config/migrations/20200702141921_CreateIndexableSubpagesIndex.php
index ba1d13c8361..0c4084f63ba 100644
--- a/src/config/migrations/20200702141921_CreateIndexableSubpagesIndex.php
+++ b/src/config/migrations/20200702141921_CreateIndexableSubpagesIndex.php
@@ -30,12 +30,12 @@ public function up() {
[
'null' => true,
'limit' => 20,
- ]
+ ],
);
$this->add_index(
$this->get_table_name(),
[ 'post_parent', 'object_type', 'post_status', 'object_id' ],
- [ 'name' => 'subpages' ]
+ [ 'name' => 'subpages' ],
);
}
@@ -52,12 +52,12 @@ public function down() {
[
'null' => true,
'limit' => 191,
- ]
+ ],
);
$this->remove_index(
$this->get_table_name(),
[ 'post_parent', 'object_type', 'post_status', 'object_id' ],
- [ 'name' => 'subpages' ]
+ [ 'name' => 'subpages' ],
);
}
diff --git a/src/config/migrations/20200728095334_AddIndexesForProminentWordsOnIndexables.php b/src/config/migrations/20200728095334_AddIndexesForProminentWordsOnIndexables.php
index 51566ca5a3b..093259d9841 100644
--- a/src/config/migrations/20200728095334_AddIndexesForProminentWordsOnIndexables.php
+++ b/src/config/migrations/20200728095334_AddIndexesForProminentWordsOnIndexables.php
@@ -44,7 +44,7 @@ public function up() {
$this->columns_with_index,
[
'name' => 'prominent_words',
- ]
+ ],
);
}
}
diff --git a/src/config/migrations/20201202144329_AddEstimatedReadingTime.php b/src/config/migrations/20201202144329_AddEstimatedReadingTime.php
index f0d94cf3b78..8cdea8e0c05 100644
--- a/src/config/migrations/20201202144329_AddEstimatedReadingTime.php
+++ b/src/config/migrations/20201202144329_AddEstimatedReadingTime.php
@@ -32,7 +32,7 @@ public function up() {
[
'null' => true,
'default' => null,
- ]
+ ],
);
}
diff --git a/src/config/migrations/20201216124002_ExpandIndexableIDColumnLengths.php b/src/config/migrations/20201216124002_ExpandIndexableIDColumnLengths.php
index 5d46c997c4c..361ea495543 100644
--- a/src/config/migrations/20201216124002_ExpandIndexableIDColumnLengths.php
+++ b/src/config/migrations/20201216124002_ExpandIndexableIDColumnLengths.php
@@ -39,7 +39,7 @@ public function up() {
$this->get_table_name(),
$column,
'biginteger',
- [ 'limit' => 20 ]
+ [ 'limit' => 20 ],
);
}
}
diff --git a/src/config/migrations/20201216141134_ExpandPrimaryTermIDColumnLengths.php b/src/config/migrations/20201216141134_ExpandPrimaryTermIDColumnLengths.php
index 9105bae72f0..f3a6137928a 100644
--- a/src/config/migrations/20201216141134_ExpandPrimaryTermIDColumnLengths.php
+++ b/src/config/migrations/20201216141134_ExpandPrimaryTermIDColumnLengths.php
@@ -38,7 +38,7 @@ public function up() {
$this->get_table_name(),
$column,
'biginteger',
- [ 'limit' => 20 ]
+ [ 'limit' => 20 ],
);
}
}
diff --git a/src/config/migrations/20210817092415_AddVersionColumnToIndexables.php b/src/config/migrations/20210817092415_AddVersionColumnToIndexables.php
index 2d179abcd12..ddd6562e846 100644
--- a/src/config/migrations/20210817092415_AddVersionColumnToIndexables.php
+++ b/src/config/migrations/20210817092415_AddVersionColumnToIndexables.php
@@ -29,7 +29,7 @@ public function up() {
'integer',
[
'default' => 1,
- ]
+ ],
);
}
@@ -41,7 +41,7 @@ public function up() {
public function down() {
$this->remove_column(
$this->get_table_name(),
- 'version'
+ 'version',
);
}
diff --git a/src/config/migrations/20211020091404_AddObjectTimestamps.php b/src/config/migrations/20211020091404_AddObjectTimestamps.php
index eece2639781..271d53c9118 100644
--- a/src/config/migrations/20211020091404_AddObjectTimestamps.php
+++ b/src/config/migrations/20211020091404_AddObjectTimestamps.php
@@ -30,7 +30,7 @@ public function up() {
[
'null' => true,
'default' => null,
- ]
+ ],
);
$this->add_column(
$this->get_table_name(),
@@ -39,7 +39,7 @@ public function up() {
[
'null' => true,
'default' => null,
- ]
+ ],
);
$this->add_index(
$this->get_table_name(),
@@ -51,7 +51,7 @@ public function up() {
],
[
'name' => 'published_sitemap_index',
- ]
+ ],
);
}
@@ -73,7 +73,7 @@ public function down() {
],
[
'name' => 'published_sitemap_index',
- ]
+ ],
);
}
diff --git a/src/config/migrations/20230417083836_AddInclusiveLanguageScore.php b/src/config/migrations/20230417083836_AddInclusiveLanguageScore.php
index ab2fdc7c30e..6792220eb43 100644
--- a/src/config/migrations/20230417083836_AddInclusiveLanguageScore.php
+++ b/src/config/migrations/20230417083836_AddInclusiveLanguageScore.php
@@ -32,7 +32,7 @@ public function up() {
[
'null' => true,
'limit' => 3,
- ]
+ ],
);
}
diff --git a/src/config/migrations/20260105111111_AddSeoLinksIndex.php b/src/config/migrations/20260105111111_AddSeoLinksIndex.php
index 3a4d7ea8209..94ac2b69b56 100644
--- a/src/config/migrations/20260105111111_AddSeoLinksIndex.php
+++ b/src/config/migrations/20260105111111_AddSeoLinksIndex.php
@@ -30,7 +30,7 @@ public function up() {
'url',
[
'name' => 'url_index',
- ]
+ ],
);
$this->add_index(
@@ -38,7 +38,7 @@ public function up() {
'target_indexable_id',
[
'name' => 'target_indexable_id_index',
- ]
+ ],
);
}
@@ -55,14 +55,14 @@ public function down() {
'url',
[
'name' => 'url_index',
- ]
+ ],
);
$this->remove_index(
$table_name,
'target_indexable_id',
[
'name' => 'target_indexable_id_index',
- ]
+ ],
);
}
diff --git a/src/config/oauth-client.php b/src/config/oauth-client.php
index 5ba1ec22d87..09a653306f8 100644
--- a/src/config/oauth-client.php
+++ b/src/config/oauth-client.php
@@ -72,7 +72,7 @@ public function __construct(
$tokens['expires'],
$tokens['has_expired'],
$tokens['created_at'],
- ( $tokens['error_count'] ?? 0 )
+ ( $tokens['error_count'] ?? 0 ),
);
}
}
@@ -93,7 +93,7 @@ public function request_tokens( $code ) {
'authorization_code',
[
'code' => $code,
- ]
+ ],
);
$token = OAuth_Token::from_response( $response );
@@ -274,7 +274,7 @@ protected function refresh_tokens( OAuth_Token $tokens ) {
'refresh_token',
[
'refresh_token' => $tokens->refresh_token,
- ]
+ ],
);
$token_obj = OAuth_Token::from_response( $new_tokens );
diff --git a/src/config/schema-types.php b/src/config/schema-types.php
index e0f76202631..25d5dcf3871 100644
--- a/src/config/schema-types.php
+++ b/src/config/schema-types.php
@@ -163,7 +163,7 @@ public function get_article_type_options() {
'name' => \__( 'None', 'wordpress-seo' ),
'value' => 'None',
],
- ]
+ ],
);
}
}
diff --git a/src/config/semrush-client.php b/src/config/semrush-client.php
index da45140bf17..41f2a1cd895 100644
--- a/src/config/semrush-client.php
+++ b/src/config/semrush-client.php
@@ -41,13 +41,13 @@ public function __construct( Options_Helper $options_helper, WP_Remote_Handler $
],
[
'httpClient' => new Client( [ 'handler' => $wp_remote_handler ] ),
- ]
+ ],
);
parent::__construct(
self::TOKEN_OPTION,
$provider,
- $options_helper
+ $options_helper,
);
}
@@ -75,7 +75,7 @@ public function do_request( $method, $url, array $options ) {
'params' => [
'access_token' => $this->get_tokens()->access_token,
],
- ]
+ ],
);
return parent::do_request( $method, $url, $options );
diff --git a/src/config/wincher-client.php b/src/config/wincher-client.php
index 7f9b58302f2..4c4ade7b5d3 100644
--- a/src/config/wincher-client.php
+++ b/src/config/wincher-client.php
@@ -56,13 +56,13 @@ public function __construct( Options_Helper $options_helper, WP_Remote_Handler $
],
[
'httpClient' => new Client( [ 'handler' => $wp_remote_handler ] ),
- ]
+ ],
);
parent::__construct(
self::TOKEN_OPTION,
$provider,
- $options_helper
+ $options_helper,
);
}
@@ -77,7 +77,7 @@ public function get_authorization_url() {
$url = $this->provider->getAuthorizationUrl(
[
'state' => WPSEO_Utils::format_json_encode( [ 'domain' => $parsed_site_url['host'] ] ),
- ]
+ ],
);
$pkce_code = $this->provider->getPkceCode();
diff --git a/src/config/wincher-pkce-provider.php b/src/config/wincher-pkce-provider.php
index 58c67bed32c..ce59c755306 100644
--- a/src/config/wincher-pkce-provider.php
+++ b/src/config/wincher-pkce-provider.php
@@ -80,10 +80,10 @@ protected function getRandomPkceCode( $length = 64 ) {
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
\base64_encode( \random_bytes( $length ) ),
'+/',
- '-_'
+ '-_',
),
0,
- $length
+ $length,
);
}
@@ -136,9 +136,9 @@ protected function getAuthorizationParameters( array $options ) {
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
\base64_encode( \hash( 'sha256', $this->pkceCode, true ) ),
'+/',
- '-_'
+ '-_',
),
- '='
+ '=',
);
}
elseif ( $pkce_method === 'plain' ) {
@@ -190,7 +190,7 @@ public function getAccessToken( $grant, array $options = [] ) {
if ( \is_array( $response ) === false ) {
throw new UnexpectedValueException(
- 'Invalid response received from Authorization Server. Expected JSON.'
+ 'Invalid response received from Authorization Server. Expected JSON.',
);
}
@@ -217,7 +217,7 @@ protected function getConfigurableOptions() {
'responseResourceOwnerId',
'scopes',
'pkceMethod',
- ]
+ ],
);
}
diff --git a/src/content-type-visibility/application/content-type-visibility-watcher-actions.php b/src/content-type-visibility/application/content-type-visibility-watcher-actions.php
index e9b60b2b7d0..06103973d4a 100644
--- a/src/content-type-visibility/application/content-type-visibility-watcher-actions.php
+++ b/src/content-type-visibility/application/content-type-visibility-watcher-actions.php
@@ -156,7 +156,7 @@ private function add_notification() {
/* translators: 1: Opening tag of the link to the Search appearance settings page, 2: Link closing tag. */
\esc_html__( 'You\'ve added a new type of content. We recommend that you review the corresponding %1$sSearch appearance settings%2$s.', 'wordpress-seo' ),
'',
- ''
+ '',
);
$notification = new Yoast_Notification(
@@ -166,7 +166,7 @@ private function add_notification() {
'id' => 'content-types-made-public',
'capabilities' => 'wpseo_manage_options',
'priority' => 0.8,
- ]
+ ],
);
$this->notification_center->add_notification( $notification );
diff --git a/src/content-type-visibility/user-interface/content-type-visibility-dismiss-new-route.php b/src/content-type-visibility/user-interface/content-type-visibility-dismiss-new-route.php
index df999e16528..292742196b9 100644
--- a/src/content-type-visibility/user-interface/content-type-visibility-dismiss-new-route.php
+++ b/src/content-type-visibility/user-interface/content-type-visibility-dismiss-new-route.php
@@ -120,7 +120,7 @@ public function post_type_dismiss_callback( $request ) {
return new WP_REST_Response(
(object) $response,
- $response['status']
+ $response['status'],
);
}
@@ -149,7 +149,7 @@ public function taxonomy_dismiss_callback( WP_REST_Request $request ) {
return new WP_REST_Response(
(object) $response,
- $response['status']
+ $response['status'],
);
}
}
diff --git a/src/context/meta-tags-context.php b/src/context/meta-tags-context.php
index 55452c72ab8..0676ac7a2a0 100644
--- a/src/context/meta-tags-context.php
+++ b/src/context/meta-tags-context.php
@@ -522,10 +522,8 @@ public function generate_schema_page_type() {
$type = 'CollectionPage';
break;
default:
- $additional_type = $this->indexable->schema_page_type;
- if ( $additional_type === null ) {
- $additional_type = $this->options->get( 'schema-page-type-' . $this->indexable->object_sub_type );
- }
+ $additional_type = $this->indexable->schema_page_type;
+ $additional_type ??= $this->options->get( 'schema-page-type-' . $this->indexable->object_sub_type );
$type = [ 'WebPage', $additional_type ];
@@ -552,10 +550,8 @@ public function generate_schema_page_type() {
* @return string|array The schema article type.
*/
public function generate_schema_article_type() {
- $additional_type = $this->indexable->schema_article_type;
- if ( $additional_type === null ) {
- $additional_type = $this->options->get( 'schema-article-type-' . $this->indexable->object_sub_type );
- }
+ $additional_type = $this->indexable->schema_article_type;
+ $additional_type ??= $this->options->get( 'schema-article-type-' . $this->indexable->object_sub_type );
/** This filter is documented in inc/options/class-wpseo-option-titles.php */
$allowed_article_types = \apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES );
diff --git a/src/dashboard/application/configuration/dashboard-configuration.php b/src/dashboard/application/configuration/dashboard-configuration.php
index 60c0e00397b..1baa57295d4 100644
--- a/src/dashboard/application/configuration/dashboard-configuration.php
+++ b/src/dashboard/application/configuration/dashboard-configuration.php
@@ -134,7 +134,7 @@ public function get_configuration(): array {
[
Readability_Analysis::NAME,
Keyphrase_Analysis::NAME,
- ]
+ ],
)->to_array(),
'endpoints' => $this->endpoints_repository->get_all_endpoints()->to_array(),
'nonce' => $this->nonce_repository->get_rest_nonce(),
diff --git a/src/dashboard/infrastructure/browser-cache/browser-cache-configuration.php b/src/dashboard/infrastructure/browser-cache/browser-cache-configuration.php
index ed9261201aa..d55dc19bf1b 100644
--- a/src/dashboard/infrastructure/browser-cache/browser-cache-configuration.php
+++ b/src/dashboard/infrastructure/browser-cache/browser-cache-configuration.php
@@ -42,7 +42,7 @@ private function get_storage_prefix() {
$current_user = \wp_get_current_user();
$auth_cookie = \wp_parse_auth_cookie();
$blog_id = \get_current_blog_id();
- $session_token = isset( $auth_cookie['token'] ) ? $auth_cookie['token'] : '';
+ $session_token = ( $auth_cookie['token'] ?? '' );
return \wp_hash( $current_user->user_login . '|' . $session_token . '|' . $blog_id );
}
diff --git a/src/dashboard/infrastructure/integrations/site-kit.php b/src/dashboard/infrastructure/integrations/site-kit.php
index 56ef67bc9c4..fe06032308f 100644
--- a/src/dashboard/infrastructure/integrations/site-kit.php
+++ b/src/dashboard/infrastructure/integrations/site-kit.php
@@ -154,7 +154,7 @@ public function is_onboarded(): bool {
* @return bool If the user can read the data.
*/
private function can_read_data( array $module ): bool {
- return ( ! \is_null( $module['can_view'] ) ? $module['can_view'] : false );
+ return ( $module['can_view'] ?? false );
}
/**
@@ -269,7 +269,7 @@ public function get_preloaded_data( array $paths ): array {
return \array_reduce(
\array_unique( $actual_paths ),
'rest_preload_api_request',
- []
+ [],
);
}
@@ -282,8 +282,8 @@ public function get_activate_url(): string {
return \html_entity_decode(
\wp_nonce_url(
\self_admin_url( 'plugins.php?action=activate&plugin=' . self::SITE_KIT_FILE ),
- 'activate-plugin_' . self::SITE_KIT_FILE
- )
+ 'activate-plugin_' . self::SITE_KIT_FILE,
+ ),
);
}
@@ -296,8 +296,8 @@ public function get_install_url(): string {
return \html_entity_decode(
\wp_nonce_url(
\self_admin_url( 'update.php?action=install-plugin&plugin=google-site-kit' ),
- 'install-plugin_google-site-kit'
- )
+ 'install-plugin_google-site-kit',
+ ),
);
}
@@ -310,8 +310,8 @@ public function get_update_url(): string {
return \html_entity_decode(
\wp_nonce_url(
\self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . self::SITE_KIT_FILE ),
- 'upgrade-plugin_' . self::SITE_KIT_FILE
- )
+ 'upgrade-plugin_' . self::SITE_KIT_FILE,
+ ),
);
}
diff --git a/src/dashboard/infrastructure/score-results/readability-score-results/readability-score-results-collector.php b/src/dashboard/infrastructure/score-results/readability-score-results/readability-score-results-collector.php
index f41a55f924e..5abf6f8cb1d 100644
--- a/src/dashboard/infrastructure/score-results/readability-score-results/readability-score-results-collector.php
+++ b/src/dashboard/infrastructure/score-results/readability-score-results/readability-score-results-collector.php
@@ -39,7 +39,7 @@ public function get_score_results( array $readability_score_groups, Content_Type
[
Model::get_table_name( 'Indexable' ),
$content_type_name,
- ]
+ ],
);
if ( $term_id === null ) {
@@ -52,7 +52,7 @@ public function get_score_results( array $readability_score_groups, Content_Type
WHERE ( I.post_status = 'publish' OR I.post_status IS NULL )
AND I.object_type = 'post'
AND I.object_sub_type = %s",
- $replacements
+ $replacements,
);
//phpcs:enable
}
@@ -74,7 +74,7 @@ public function get_score_results( array $readability_score_groups, Content_Type
FROM %i
WHERE term_taxonomy_id = %d
)",
- $replacements
+ $replacements,
);
//phpcs:enable
}
diff --git a/src/dashboard/infrastructure/score-results/seo-score-results/seo-score-results-collector.php b/src/dashboard/infrastructure/score-results/seo-score-results/seo-score-results-collector.php
index d5e7043e57e..75efe486d7c 100644
--- a/src/dashboard/infrastructure/score-results/seo-score-results/seo-score-results-collector.php
+++ b/src/dashboard/infrastructure/score-results/seo-score-results/seo-score-results-collector.php
@@ -39,7 +39,7 @@ public function get_score_results( array $seo_score_groups, Content_Type $conten
[
Model::get_table_name( 'Indexable' ),
$content_type_name,
- ]
+ ],
);
if ( $term_id === null ) {
@@ -53,7 +53,7 @@ public function get_score_results( array $seo_score_groups, Content_Type $conten
AND I.object_type = 'post'
AND I.object_sub_type = %s
AND ( I.is_robots_noindex IS NULL OR I.is_robots_noindex <> 1 )",
- $replacements
+ $replacements,
);
//phpcs:enable
}
@@ -76,7 +76,7 @@ public function get_score_results( array $seo_score_groups, Content_Type $conten
FROM %i
WHERE term_taxonomy_id = %d
)",
- $replacements
+ $replacements,
);
//phpcs:enable
}
diff --git a/src/dashboard/infrastructure/search-console/site-kit-search-console-adapter.php b/src/dashboard/infrastructure/search-console/site-kit-search-console-adapter.php
index 5a802704840..f7b7c6de59d 100644
--- a/src/dashboard/infrastructure/search-console/site-kit-search-console-adapter.php
+++ b/src/dashboard/infrastructure/search-console/site-kit-search-console-adapter.php
@@ -179,9 +179,9 @@ private function validate_response( WP_REST_Response $response ): void {
throw new Failed_Request_Exception(
\wp_kses_post(
$response->as_error()
- ->get_error_message()
+ ->get_error_message(),
),
- (int) $error_status_code
+ (int) $error_status_code,
);
}
diff --git a/src/dashboard/infrastructure/taxonomies/taxonomies-collector.php b/src/dashboard/infrastructure/taxonomies/taxonomies-collector.php
index a0714f5ad67..00c05593674 100644
--- a/src/dashboard/infrastructure/taxonomies/taxonomies-collector.php
+++ b/src/dashboard/infrastructure/taxonomies/taxonomies-collector.php
@@ -53,7 +53,7 @@ public function get_custom_filtering_taxonomy( string $content_type ) {
\_doing_it_wrong(
'Filter: \'wpseo_{$content_type}_filtering_taxonomy\'',
'The `wpseo_{$content_type}_filtering_taxonomy` filter should return a public taxonomy, available in REST API, that is associated with that content type.',
- 'YoastSEO v24.1'
+ 'YoastSEO v24.1',
);
}
diff --git a/src/dashboard/user-interface/configuration/site-kit-configuration-dismissal-route.php b/src/dashboard/user-interface/configuration/site-kit-configuration-dismissal-route.php
index ef922af786b..13c7041355d 100644
--- a/src/dashboard/user-interface/configuration/site-kit-configuration-dismissal-route.php
+++ b/src/dashboard/user-interface/configuration/site-kit-configuration-dismissal-route.php
@@ -88,7 +88,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -108,7 +108,7 @@ public function set_site_kit_configuration_permanent_dismissal( WP_REST_Request
return new WP_Error(
'wpseo_set_site_kit_configuration_permanent_dismissal_error',
$exception->getMessage(),
- (object) []
+ (object) [],
);
}
@@ -116,7 +116,7 @@ public function set_site_kit_configuration_permanent_dismissal( WP_REST_Request
[
'success' => $result,
],
- ( $result ) ? 200 : 400
+ ( $result ) ? 200 : 400,
);
}
diff --git a/src/dashboard/user-interface/configuration/site-kit-consent-management-route.php b/src/dashboard/user-interface/configuration/site-kit-consent-management-route.php
index 3063981a586..096d4866cb4 100644
--- a/src/dashboard/user-interface/configuration/site-kit-consent-management-route.php
+++ b/src/dashboard/user-interface/configuration/site-kit-consent-management-route.php
@@ -96,7 +96,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -116,7 +116,7 @@ public function set_site_kit_consent( WP_REST_Request $request ) {
return new WP_Error(
'wpseo_set_site_kit_consent_error',
$exception->getMessage(),
- (object) []
+ (object) [],
);
}
@@ -124,7 +124,7 @@ public function set_site_kit_consent( WP_REST_Request $request ) {
[
'success' => $result,
],
- ( $result ) ? 200 : 400
+ ( $result ) ? 200 : 400,
);
}
diff --git a/src/dashboard/user-interface/scores/abstract-scores-route.php b/src/dashboard/user-interface/scores/abstract-scores-route.php
index 11fa2e4d239..5da16f4eaae 100644
--- a/src/dashboard/user-interface/scores/abstract-scores-route.php
+++ b/src/dashboard/user-interface/scores/abstract-scores-route.php
@@ -146,7 +146,7 @@ public function register_routes() {
'type' => 'integer',
'default' => null,
'sanitize_callback' => static function ( $param ) {
- return \intval( $param );
+ return (int) $param;
},
],
'troubleshooting' => [
@@ -157,7 +157,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -180,13 +180,13 @@ public function get_scores( WP_REST_Request $request ) {
[
'error' => $exception->getMessage(),
],
- $exception->getCode()
+ $exception->getCode(),
);
}
return new WP_REST_Response(
$results,
- 200
+ 200,
);
}
diff --git a/src/dashboard/user-interface/setup/setup-url-interceptor.php b/src/dashboard/user-interface/setup/setup-url-interceptor.php
index bb488bf2d7d..b0ca0b8a270 100644
--- a/src/dashboard/user-interface/setup/setup-url-interceptor.php
+++ b/src/dashboard/user-interface/setup/setup-url-interceptor.php
@@ -93,7 +93,7 @@ public function add_redirect_page( $pages ) {
'',
'',
'wpseo_manage_options',
- self::PAGE
+ self::PAGE,
);
return $pages;
diff --git a/src/dashboard/user-interface/time-based-seo-metrics/time-based-seo-metrics-route.php b/src/dashboard/user-interface/time-based-seo-metrics/time-based-seo-metrics-route.php
index c30fbf8032a..7684d711bb1 100644
--- a/src/dashboard/user-interface/time-based-seo-metrics/time-based-seo-metrics-route.php
+++ b/src/dashboard/user-interface/time-based-seo-metrics/time-based-seo-metrics-route.php
@@ -151,7 +151,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -225,13 +225,13 @@ public function get_time_based_seo_metrics( WP_REST_Request $request ): WP_REST_
[
'error' => $exception->getMessage(),
],
- $exception->getCode()
+ $exception->getCode(),
);
}
return new WP_REST_Response(
$time_based_seo_metrics_container->to_array(),
- 200
+ 200,
);
}
diff --git a/src/dashboard/user-interface/tracking/setup-steps-tracking-route.php b/src/dashboard/user-interface/tracking/setup-steps-tracking-route.php
index aa30f8bd306..a0a2445a158 100644
--- a/src/dashboard/user-interface/tracking/setup-steps-tracking-route.php
+++ b/src/dashboard/user-interface/tracking/setup-steps-tracking-route.php
@@ -108,7 +108,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -133,7 +133,7 @@ public function track_setup_steps( WP_REST_Request $request ) {
$data,
static function ( $value ) {
return $value !== null;
- }
+ },
);
// Check if all values are null then return an error that no valid params were passed.
@@ -141,7 +141,7 @@ static function ( $value ) {
return new WP_Error(
'wpseo_set_site_kit_usage_tracking',
\__( 'No valid parameters were passed.', 'wordpress-seo' ),
- [ 'status' => 400 ]
+ [ 'status' => 400 ],
);
}
@@ -153,7 +153,7 @@ static function ( $value ) {
return new WP_Error(
'wpseo_set_site_kit_usage_tracking',
$exception->getMessage(),
- (object) []
+ (object) [],
);
}
if ( ! $result ) {
@@ -165,7 +165,7 @@ static function ( $value ) {
[
'success' => $result,
],
- ( $result ) ? 200 : 400
+ ( $result ) ? 200 : 400,
);
}
diff --git a/src/deprecated/frontend/breadcrumbs.php b/src/deprecated/frontend/breadcrumbs.php
index 5c9337eed2e..5b450fc378a 100644
--- a/src/deprecated/frontend/breadcrumbs.php
+++ b/src/deprecated/frontend/breadcrumbs.php
@@ -106,9 +106,7 @@ public function __toString() {
* @return static The instance.
*/
public static function get_instance() {
- if ( self::$instance === null ) {
- self::$instance = new self();
- }
+ self::$instance ??= new self();
return self::$instance;
}
diff --git a/src/deprecated/frontend/frontend.php b/src/deprecated/frontend/frontend.php
index c301ca03d0f..afb9a962827 100644
--- a/src/deprecated/frontend/frontend.php
+++ b/src/deprecated/frontend/frontend.php
@@ -92,9 +92,7 @@ public function __call( $method, $arguments ) {
* @return static The instance.
*/
public static function get_instance() {
- if ( self::$instance === null ) {
- self::$instance = new self();
- }
+ self::$instance ??= new self();
return self::$instance;
}
diff --git a/src/deprecated/src/promotions/domain/black-friday-checklist-promotion.php b/src/deprecated/src/promotions/domain/black-friday-checklist-promotion.php
index e5d2cc8fdb9..0e96e232cdb 100644
--- a/src/deprecated/src/promotions/domain/black-friday-checklist-promotion.php
+++ b/src/deprecated/src/promotions/domain/black-friday-checklist-promotion.php
@@ -22,8 +22,8 @@ public function __construct() {
'black-friday-2023-checklist',
new Time_Interval(
\gmmktime( 11, 00, 00, 9, 19, 2023 ),
- \gmmktime( 11, 00, 00, 10, 31, 2023 )
- )
+ \gmmktime( 11, 00, 00, 10, 31, 2023 ),
+ ),
);
}
}
diff --git a/src/exceptions/indexable/author-not-built-exception.php b/src/exceptions/indexable/author-not-built-exception.php
index 9363d0e187d..c09537b5854 100644
--- a/src/exceptions/indexable/author-not-built-exception.php
+++ b/src/exceptions/indexable/author-not-built-exception.php
@@ -17,7 +17,7 @@ class Author_Not_Built_Exception extends Not_Built_Exception {
*/
public static function author_archives_are_not_indexed_for_users_without_posts( $user_id ) {
return new self(
- 'Indexable for author with id ' . $user_id . ' is not being built, since author archives are not indexed for users without posts.'
+ 'Indexable for author with id ' . $user_id . ' is not being built, since author archives are not indexed for users without posts.',
);
}
@@ -31,7 +31,7 @@ public static function author_archives_are_not_indexed_for_users_without_posts(
*/
public static function author_archives_are_disabled( $user_id ) {
return new self(
- 'Indexable for author with id ' . $user_id . ' is not being built, since author archives are disabled.'
+ 'Indexable for author with id ' . $user_id . ' is not being built, since author archives are disabled.',
);
}
@@ -45,7 +45,7 @@ public static function author_archives_are_disabled( $user_id ) {
*/
public static function author_not_built_because_of_filter( $user_id ) {
return new self(
- 'Indexable for author with id ' . $user_id . ' is not being built, since it is excluded because of the \'wpseo_should_build_and_save_user_indexable\' filter.'
+ 'Indexable for author with id ' . $user_id . ' is not being built, since it is excluded because of the \'wpseo_should_build_and_save_user_indexable\' filter.',
);
}
}
diff --git a/src/exceptions/indexable/invalid-term-exception.php b/src/exceptions/indexable/invalid-term-exception.php
index 1c6a3178e58..bd0f733a1d8 100644
--- a/src/exceptions/indexable/invalid-term-exception.php
+++ b/src/exceptions/indexable/invalid-term-exception.php
@@ -19,8 +19,8 @@ public function __construct( $reason ) {
\sprintf(
/* translators: %s is the reason given by WordPress. */
\esc_html__( 'The term is considered invalid. The following reason was given by WordPress: %s', 'wordpress-seo' ),
- $reason
- )
+ $reason,
+ ),
);
}
}
diff --git a/src/exceptions/indexable/not-built-exception.php b/src/exceptions/indexable/not-built-exception.php
index decc356f0ee..fe70e839564 100644
--- a/src/exceptions/indexable/not-built-exception.php
+++ b/src/exceptions/indexable/not-built-exception.php
@@ -17,7 +17,7 @@ class Not_Built_Exception extends Indexable_Exception {
*/
public static function invalid_object_id( $object_id ) {
return new self(
- "Indexable was not built because it had an invalid object id of $object_id."
+ "Indexable was not built because it had an invalid object id of $object_id.",
);
}
}
diff --git a/src/exceptions/missing-method.php b/src/exceptions/missing-method.php
index 780cb6bc392..3dab2987ad9 100644
--- a/src/exceptions/missing-method.php
+++ b/src/exceptions/missing-method.php
@@ -23,8 +23,8 @@ public static function for_class( $method, $class_name ) {
/* translators: %1$s expands to the method name. %2$s expands to the class name */
\__( 'Method %1$s() does not exist in class %2$s', 'wordpress-seo' ),
$method,
- $class_name
- )
+ $class_name,
+ ),
);
}
}
diff --git a/src/general/user-interface/general-page-integration.php b/src/general/user-interface/general-page-integration.php
index 96857018b59..d7893ba41fd 100644
--- a/src/general/user-interface/general-page-integration.php
+++ b/src/general/user-interface/general-page-integration.php
@@ -215,7 +215,7 @@ public function add_page( $pages ) {
self::PAGE,
[ $this, 'display_page' ],
],
- ]
+ ],
);
return $pages;
diff --git a/src/general/user-interface/opt-in-route.php b/src/general/user-interface/opt-in-route.php
index dc66860c8ed..a43e924de92 100644
--- a/src/general/user-interface/opt-in-route.php
+++ b/src/general/user-interface/opt-in-route.php
@@ -108,7 +108,7 @@ public function set_opt_in_seen( $request ) {
'success' => $success,
'status' => $status,
],
- $status
+ $status,
);
}
diff --git a/src/generators/breadcrumbs-generator.php b/src/generators/breadcrumbs-generator.php
index a38691bf594..6cb882f795e 100644
--- a/src/generators/breadcrumbs-generator.php
+++ b/src/generators/breadcrumbs-generator.php
@@ -153,7 +153,7 @@ public function generate( Meta_Tags_Context $context ) {
$indexables,
static function ( $indexable ) {
return \is_a( $indexable, Indexable::class );
- }
+ },
);
$crumbs = \array_map( [ $this, 'get_post_type_crumb' ], $indexables );
@@ -176,7 +176,7 @@ static function ( $indexable ) {
\_doing_it_wrong(
'Filter: \'wpseo_breadcrumb_links\'',
'The `wpseo_breadcrumb_links` filter should return a multi-dimensional array.',
- 'YoastSEO v20.0'
+ 'YoastSEO v20.0',
);
}
else {
@@ -422,7 +422,7 @@ protected function add_paged_crumb( array $crumbs, $current_indexable ) {
'text' => \sprintf(
/* translators: %s expands to the current page number */
\__( 'Page %s', 'wordpress-seo' ),
- $current_page_number
+ $current_page_number,
),
];
diff --git a/src/generators/open-graph-image-generator.php b/src/generators/open-graph-image-generator.php
index aaf8ee7230a..de8f2cedd7b 100644
--- a/src/generators/open-graph-image-generator.php
+++ b/src/generators/open-graph-image-generator.php
@@ -162,8 +162,8 @@ protected function add_from_indexable( Indexable $indexable, Images $image_conta
(array) $meta_data,
[
'url' => $indexable->open_graph_image,
- ]
- )
+ ],
+ ),
);
}
}
diff --git a/src/generators/schema-generator.php b/src/generators/schema-generator.php
index 86e6bedab57..d640ffe53c8 100644
--- a/src/generators/schema-generator.php
+++ b/src/generators/schema-generator.php
@@ -272,7 +272,7 @@ public function protected_webpage_schema( $graph_piece ) {
'datePublished',
'dateModified',
'breadcrumb',
- ]
+ ],
);
$graph_piece = \array_intersect_key( $graph_piece, $properties_to_show );
diff --git a/src/helpers/crawl-cleanup-helper.php b/src/helpers/crawl-cleanup-helper.php
index 73d0d96626d..65c168d36d3 100644
--- a/src/helpers/crawl-cleanup-helper.php
+++ b/src/helpers/crawl-cleanup-helper.php
@@ -270,7 +270,7 @@ public function do_clean_redirect( $proper_url ) {
/* translators: %1$s: Yoast SEO */
\__( '%1$s: unregistered URL parameter removed. See %2$s', 'wordpress-seo' ),
'Yoast SEO',
- 'https://yoa.st/advanced-crawl-settings'
+ 'https://yoa.st/advanced-crawl-settings',
);
$this->redirect_helper->do_safe_redirect( $proper_url, 301, $message );
diff --git a/src/helpers/current-page-helper.php b/src/helpers/current-page-helper.php
index 09aae3e4aa8..39e632fee47 100644
--- a/src/helpers/current-page-helper.php
+++ b/src/helpers/current-page-helper.php
@@ -441,7 +441,7 @@ public function current_post_is_privacy_policy() {
return false;
}
- return \intval( $post->ID ) === \intval( \get_option( 'wp_page_for_privacy_policy', false ) );
+ return (int) $post->ID === (int) \get_option( 'wp_page_for_privacy_policy', false );
}
/**
diff --git a/src/helpers/home-url-helper.php b/src/helpers/home-url-helper.php
index 17197a7818c..6103fb0251c 100644
--- a/src/helpers/home-url-helper.php
+++ b/src/helpers/home-url-helper.php
@@ -27,9 +27,7 @@ class Home_Url_Helper {
* @return string The home url.
*/
public function get() {
- if ( static::$home_url === null ) {
- static::$home_url = \home_url();
- }
+ static::$home_url ??= \home_url();
return static::$home_url;
}
@@ -40,9 +38,7 @@ public function get() {
* @return array The parsed url.
*/
public function get_parsed() {
- if ( static::$parsed_home_url === null ) {
- static::$parsed_home_url = \wp_parse_url( $this->get() );
- }
+ static::$parsed_home_url ??= \wp_parse_url( $this->get() );
return static::$parsed_home_url;
}
diff --git a/src/helpers/indexing-helper.php b/src/helpers/indexing-helper.php
index a6c8a4b68e0..ddf852d5959 100644
--- a/src/helpers/indexing-helper.php
+++ b/src/helpers/indexing-helper.php
@@ -178,7 +178,7 @@ public function set_reason( $reason ) {
*/
protected function remove_indexing_notification() {
$this->notification_center->remove_notification_by_id(
- Indexing_Notification_Integration::NOTIFICATION_ID
+ Indexing_Notification_Integration::NOTIFICATION_ID,
);
}
diff --git a/src/helpers/notification-helper.php b/src/helpers/notification-helper.php
index 3989e14f1ec..cb127c4d3ee 100644
--- a/src/helpers/notification-helper.php
+++ b/src/helpers/notification-helper.php
@@ -69,7 +69,7 @@ function ( $notification ) {
'resolveNonce' => $notification->get_resolve_nonce(),
];
},
- $all_notifications
+ $all_notifications,
);
}
}
diff --git a/src/helpers/post-type-helper.php b/src/helpers/post-type-helper.php
index 92ee2cfcf42..7f45c006edc 100644
--- a/src/helpers/post-type-helper.php
+++ b/src/helpers/post-type-helper.php
@@ -225,7 +225,7 @@ public function is_post_type_archive_indexable( $post_type ) {
static function ( $post_type_object ) {
return $post_type_object->name;
},
- $public_type_objects
+ $public_type_objects,
);
return \in_array( $post_type, $public_types, true );
diff --git a/src/helpers/redirect-helper.php b/src/helpers/redirect-helper.php
index b2fba707677..2c0f8802831 100644
--- a/src/helpers/redirect-helper.php
+++ b/src/helpers/redirect-helper.php
@@ -21,7 +21,7 @@ class Redirect_Helper {
public function do_unsafe_redirect( $location, $status = 302, $reason = 'Yoast SEO' ) {
// phpcs:ignore WordPress.Security.SafeRedirect -- intentional, function has been renamed to make unsafe more clear.
\wp_redirect( $location, $status, $reason );
- exit;
+ exit();
}
/**
@@ -37,7 +37,7 @@ public function do_unsafe_redirect( $location, $status = 302, $reason = 'Yoast S
*/
public function do_safe_redirect( $location, $status = 302, $reason = 'Yoast SEO' ) {
\wp_safe_redirect( $location, $status, $reason );
- exit;
+ exit();
}
/**
diff --git a/src/helpers/schema/article-helper.php b/src/helpers/schema/article-helper.php
index d4661c25143..b31af3a5e2a 100644
--- a/src/helpers/schema/article-helper.php
+++ b/src/helpers/schema/article-helper.php
@@ -15,9 +15,7 @@ class Article_Helper {
* @return bool True if it has Article schema, false if not.
*/
public function is_article_post_type( $post_type = null ) {
- if ( $post_type === null ) {
- $post_type = \get_post_type();
- }
+ $post_type ??= \get_post_type();
return $this->is_author_supported( $post_type );
}
diff --git a/src/helpers/schema/replace-vars-helper.php b/src/helpers/schema/replace-vars-helper.php
index 6d09410befb..4b205d6a01b 100644
--- a/src/helpers/schema/replace-vars-helper.php
+++ b/src/helpers/schema/replace-vars-helper.php
@@ -116,7 +116,7 @@ public function register_replace_vars( $context ) {
protected function register_replacement( $variable, $value ) {
$this->replace_vars->safe_register_replacement(
$variable,
- $this->get_identity_function( $value )
+ $this->get_identity_function( $value ),
);
}
diff --git a/src/helpers/social-profiles-helper.php b/src/helpers/social-profiles-helper.php
index 4c2098f5b1a..a82f801efac 100644
--- a/src/helpers/social-profiles-helper.php
+++ b/src/helpers/social-profiles-helper.php
@@ -226,7 +226,7 @@ public function set_organization_social_profiles( $social_profiles ) {
$social_profiles[ $field_name ],
static function ( $other_social_url ) {
return $other_social_url !== '';
- }
+ },
);
$social_profiles[ $field_name ] = \array_values( $other_social_urls );
diff --git a/src/helpers/url-helper.php b/src/helpers/url-helper.php
index e5f5d2b7b26..e638ed81f4a 100644
--- a/src/helpers/url-helper.php
+++ b/src/helpers/url-helper.php
@@ -213,9 +213,7 @@ public function get_link_type( $url, $home_url = null, $is_image = false ) {
return ( $is_image ) ? SEO_Links::TYPE_EXTERNAL_IMAGE : SEO_Links::TYPE_EXTERNAL;
}
- if ( $home_url === null ) {
- $home_url = \wp_parse_url( \home_url() );
- }
+ $home_url ??= \wp_parse_url( \home_url() );
// When the base host is equal to the host.
if ( isset( $url['host'] ) && $url['host'] !== $home_url['host'] ) {
diff --git a/src/helpers/woocommerce-helper.php b/src/helpers/woocommerce-helper.php
index 05423808c47..edfe49a80e5 100644
--- a/src/helpers/woocommerce-helper.php
+++ b/src/helpers/woocommerce-helper.php
@@ -66,6 +66,6 @@ public function current_post_is_terms_and_conditions_page() {
return false;
}
- return \intval( $post->ID ) === \intval( \wc_terms_and_conditions_page_id() );
+ return (int) $post->ID === (int) \wc_terms_and_conditions_page_id();
}
}
diff --git a/src/initializers/crawl-cleanup-permalinks.php b/src/initializers/crawl-cleanup-permalinks.php
index c76dcd10559..a30e12badd3 100644
--- a/src/initializers/crawl-cleanup-permalinks.php
+++ b/src/initializers/crawl-cleanup-permalinks.php
@@ -142,7 +142,7 @@ public function utm_redirect() {
$message = \sprintf(
/* translators: %1$s: Yoast SEO */
\__( '%1$s: redirect utm variables to #', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
$this->redirect_helper->do_safe_redirect( \trailingslashit( $this->url_helper->recreate_current_url( false ) ) . \ltrim( $new_path, '/' ), 301, $message );
diff --git a/src/integrations/academy-integration.php b/src/integrations/academy-integration.php
index 4c8cd9be91e..b49a1f457e8 100644
--- a/src/integrations/academy-integration.php
+++ b/src/integrations/academy-integration.php
@@ -113,7 +113,7 @@ public function add_page( $pages ) {
self::PAGE,
[ $this, 'display_page' ],
],
- ]
+ ],
);
return $pages;
diff --git a/src/integrations/admin/addon-installation/dialog-integration.php b/src/integrations/admin/addon-installation/dialog-integration.php
index 6b0821492ae..fe360971bf7 100644
--- a/src/integrations/admin/addon-installation/dialog-integration.php
+++ b/src/integrations/admin/addon-installation/dialog-integration.php
@@ -93,9 +93,9 @@ public function throw_no_owned_addons_warning() {
/* translators: %1$s expands to Yoast SEO */
\esc_html__(
'No %1$s plugins have been installed. You don\'t seem to own any active subscriptions.',
- 'wordpress-seo'
+ 'wordpress-seo',
),
- 'Yoast SEO'
+ 'Yoast SEO',
)
. '
';
}
@@ -112,7 +112,7 @@ public function show_modal() {
[
'addons' => $this->owned_addons,
'nonce' => \wp_create_nonce( 'wpseo_addon_installation' ),
- ]
+ ],
);
$asset_manager = new WPSEO_Admin_Asset_Manager();
diff --git a/src/integrations/admin/addon-installation/installation-integration.php b/src/integrations/admin/addon-installation/installation-integration.php
index 1a0b8ea83b1..bc7369c5e29 100644
--- a/src/integrations/admin/addon-installation/installation-integration.php
+++ b/src/integrations/admin/addon-installation/installation-integration.php
@@ -103,7 +103,7 @@ public function install_and_activate_addons() {
\printf(
'
%s
',
- \esc_html__( 'Installing and activating addons', 'wordpress-seo' )
+ \esc_html__( 'Installing and activating addons', 'wordpress-seo' ),
);
$licensed_addons = $this->addon_manager->get_myyoast_site_information()->subscriptions;
@@ -129,12 +129,12 @@ public function install_and_activate_addons() {
\esc_html__( '%1$s Continue to %2$s%3$s', 'wordpress-seo' ),
'',
'Yoast SEO Premium',
- ''
+ '',
);
echo '
';
- exit;
+ exit();
}
/**
@@ -158,7 +158,7 @@ public function activate_addon( $addon_slug ) {
$output[] = \sprintf(
/* Translators:%s expands to the error message. */
\__( 'Addon activation failed because of an error: %s.', 'wordpress-seo' ),
- $exception->getMessage()
+ $exception->getMessage(),
);
}
@@ -190,7 +190,7 @@ public function install_addon( $addon_slug, $addon_download ) {
$output[] = \sprintf(
/* Translators: %s expands to the error message. */
\__( 'Addon installation failed because of an error: %s.', 'wordpress-seo' ),
- $exception->getMessage()
+ $exception->getMessage(),
);
}
diff --git a/src/integrations/admin/check-required-version.php b/src/integrations/admin/check-required-version.php
index a82e0d7d991..125593b24af 100644
--- a/src/integrations/admin/check-required-version.php
+++ b/src/integrations/admin/check-required-version.php
@@ -83,13 +83,13 @@ public function check_required_version( $source, $remote_source = null, $upgrade
/* translators: 1: Current Yoast SEO version, 2: Version required by the uploaded plugin. */
\__( 'The Yoast SEO version on your site is %1$s, however the uploaded plugin requires %2$s.', 'wordpress-seo' ),
\WPSEO_VERSION,
- \esc_html( $requires_yoast_seo )
+ \esc_html( $requires_yoast_seo ),
);
return new WP_Error(
'incompatible_yoast_seo_required_version',
\__( 'The package could not be installed because it\'s not supported by the currently installed Yoast SEO version.', 'wordpress-seo' ),
- $error
+ $error,
);
}
@@ -114,7 +114,7 @@ public function update_comparison_table( $table, $current_plugin_data, $new_plug
'
%1$s
%2$s
%3$s
',
\__( 'Required Yoast SEO version', 'wordpress-seo' ),
( $requires_yoast_seo_current !== false ) ? \esc_html( $requires_yoast_seo_current ) : '-',
- ( $requires_yoast_seo_new !== false ) ? \esc_html( $requires_yoast_seo_new ) : '-'
+ ( $requires_yoast_seo_new !== false ) ? \esc_html( $requires_yoast_seo_new ) : '-',
);
$table = \str_replace( '', $new_row . '', $table );
diff --git a/src/integrations/admin/crawl-settings-integration.php b/src/integrations/admin/crawl-settings-integration.php
index 57a8dc0ae0b..8a31040ec97 100644
--- a/src/integrations/admin/crawl-settings-integration.php
+++ b/src/integrations/admin/crawl-settings-integration.php
@@ -203,10 +203,10 @@ private function add_crawl_settings( $yform ) {
/* Translators: %1$s expands to an opening anchor tag for a link leading to the Yoast SEO page of the Permalink Cleanup features, %2$s expands to a closing anchor tag. */
\esc_html__(
'These are expert features, so make sure you know what you\'re doing before removing the parameters. %1$sRead more about how your site can be affected%2$s.',
- 'wordpress-seo'
+ 'wordpress-seo',
),
'',
- ''
+ '',
);
$this->print_toggles( $this->permalink_cleanup_settings, $yform, \__( 'Permalink cleanup settings', 'wordpress-seo' ), [], $permalink_warning );
@@ -276,7 +276,7 @@ private function print_toggles( array $settings, Yoast_Form $yform, $title = '',
$toggles,
$label,
'',
- $attr
+ $attr,
);
if ( $this->should_feature_be_disabled_permalink( $setting ) ) {
echo '
',
),
[
'id' => self::NOTIFICATION_ID,
'type' => Yoast_Notification::WARNING,
- ]
+ ],
);
}
}
diff --git a/src/integrations/watchers/addon-update-watcher.php b/src/integrations/watchers/addon-update-watcher.php
index 2e6ef3eb742..133293c0cbc 100644
--- a/src/integrations/watchers/addon-update-watcher.php
+++ b/src/integrations/watchers/addon-update-watcher.php
@@ -83,8 +83,8 @@ public function replace_auto_update_toggles_of_addons( $old_html, $plugin ) {
\sprintf(
/* Translators: %1$s resolves to Yoast SEO. */
\esc_html__( 'Auto-updates are enabled based on this setting for %1$s.', 'wordpress-seo' ),
- 'Yoast SEO'
- )
+ 'Yoast SEO',
+ ),
);
}
@@ -93,8 +93,8 @@ public function replace_auto_update_toggles_of_addons( $old_html, $plugin ) {
\sprintf(
/* Translators: %1$s resolves to Yoast SEO. */
\esc_html__( 'Auto-updates are disabled based on this setting for %1$s.', 'wordpress-seo' ),
- 'Yoast SEO'
- )
+ 'Yoast SEO',
+ ),
);
}
diff --git a/src/integrations/watchers/indexable-ancestor-watcher.php b/src/integrations/watchers/indexable-ancestor-watcher.php
index 515f528a75a..bd47e6fb5c6 100644
--- a/src/integrations/watchers/indexable-ancestor-watcher.php
+++ b/src/integrations/watchers/indexable-ancestor-watcher.php
@@ -153,7 +153,7 @@ public function get_children_for_term( $term_id, array $child_indexables ) {
$child_indexables,
static function ( $indexable ) {
return $indexable->object_type === 'post';
- }
+ },
);
$existing_post_object_ids = \wp_list_pluck( $existing_post_indexables, 'object_id' );
@@ -218,8 +218,8 @@ protected function get_object_ids_for_term( $term_id, $child_indexables ) {
FROM %i
WHERE term_id IN( ' . \implode( ', ', \array_fill( 0, ( \count( $child_object_ids ) ), '%s' ) ) . ' )',
$wpdb->term_taxonomy,
- ...$child_object_ids
- )
+ ...$child_object_ids,
+ ),
);
// In the case of faulty data having been saved the above query can return 0 results.
@@ -235,8 +235,8 @@ protected function get_object_ids_for_term( $term_id, $child_indexables ) {
FROM %i
WHERE term_taxonomy_id IN( ' . \implode( ', ', \array_fill( 0, \count( $term_taxonomy_ids ), '%s' ) ) . ' )',
$wpdb->term_relationships,
- ...$term_taxonomy_ids
- )
+ ...$term_taxonomy_ids,
+ ),
);
}
}
diff --git a/src/integrations/watchers/indexable-author-archive-watcher.php b/src/integrations/watchers/indexable-author-archive-watcher.php
index 7452cc42161..f8ab5e67f4b 100644
--- a/src/integrations/watchers/indexable-author-archive-watcher.php
+++ b/src/integrations/watchers/indexable-author-archive-watcher.php
@@ -39,7 +39,7 @@ public function register_hooks() {
'update_option_wpseo_titles',
[ $this, 'reschedule_indexable_cleanup_when_author_archives_are_disabled' ],
10,
- 2
+ 2,
);
}
diff --git a/src/integrations/watchers/indexable-post-watcher.php b/src/integrations/watchers/indexable-post-watcher.php
index a9cf31f92b0..f8cd88d3214 100644
--- a/src/integrations/watchers/indexable-post-watcher.php
+++ b/src/integrations/watchers/indexable-post-watcher.php
@@ -321,7 +321,7 @@ protected function get_related_indexables( $post ) {
}
$related_indexables = \array_merge(
$related_indexables,
- $this->repository->find_by_multiple_ids_and_type( $term_ids, 'term', false )
+ $this->repository->find_by_multiple_ids_and_type( $term_ids, 'term', false ),
);
return \array_filter( $related_indexables );
diff --git a/src/integrations/watchers/option-titles-watcher.php b/src/integrations/watchers/option-titles-watcher.php
index 89bf758c845..0225ffa4748 100644
--- a/src/integrations/watchers/option-titles-watcher.php
+++ b/src/integrations/watchers/option-titles-watcher.php
@@ -121,8 +121,8 @@ protected function delete_ancestors( $post_types ) {
)',
$hierarchy_table,
$indexable_table,
- ...$post_types
- )
+ ...$post_types,
+ ),
);
return $result !== false;
diff --git a/src/integrations/watchers/search-engines-discouraged-watcher.php b/src/integrations/watchers/search-engines-discouraged-watcher.php
index 0ba2a5563b2..838d4d89f2e 100644
--- a/src/integrations/watchers/search-engines-discouraged-watcher.php
+++ b/src/integrations/watchers/search-engines-discouraged-watcher.php
@@ -212,7 +212,7 @@ protected function show_search_engines_discouraged_notice() {
\printf(
'
%1$s
',
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output from present() is considered safe.
- $this->presenter->present()
+ $this->presenter->present(),
);
}
@@ -229,7 +229,7 @@ protected function notification() {
'id' => self::NOTIFICATION_ID,
'capabilities' => 'wpseo_manage_options',
'priority' => 1,
- ]
+ ],
);
}
diff --git a/src/integrations/watchers/woocommerce-beta-editor-watcher.php b/src/integrations/watchers/woocommerce-beta-editor-watcher.php
index f8b9a773a58..88e0241e47c 100644
--- a/src/integrations/watchers/woocommerce-beta-editor-watcher.php
+++ b/src/integrations/watchers/woocommerce-beta-editor-watcher.php
@@ -140,7 +140,7 @@ protected function notification() {
'id' => self::NOTIFICATION_ID,
'capabilities' => 'wpseo_manage_options',
'priority' => 1,
- ]
+ ],
);
}
}
diff --git a/src/integrations/woocommerce-product-category-permalink-integration.php b/src/integrations/woocommerce-product-category-permalink-integration.php
index cd5ae3e3d94..a564724883a 100644
--- a/src/integrations/woocommerce-product-category-permalink-integration.php
+++ b/src/integrations/woocommerce-product-category-permalink-integration.php
@@ -69,7 +69,7 @@ public function restore_legacy_permalink_category( $category, $terms ) {
[
'parent' => 'DESC',
'term_id' => 'ASC',
- ]
+ ],
);
return $sorted_terms[0];
}
diff --git a/src/introductions/application/delayed-premium-upsell.php b/src/introductions/application/delayed-premium-upsell.php
index bfce0b1a474..2564a81f345 100644
--- a/src/introductions/application/delayed-premium-upsell.php
+++ b/src/introductions/application/delayed-premium-upsell.php
@@ -134,7 +134,7 @@ private function is_last_introduction_seen_older_than_a_week(): bool {
$seen_introductions,
static function ( $item ) {
return \is_bool( $item );
- }
+ },
);
if ( ! empty( $old_format_introductions ) ) {
@@ -151,7 +151,7 @@ static function ( $carry, $item ) {
return $item;
}
return $carry;
- }
+ },
);
// If the most recent introduction seen is older than a week, return true.
diff --git a/src/introductions/application/introductions-collector.php b/src/introductions/application/introductions-collector.php
index 317cd49d4f1..815680616af 100644
--- a/src/introductions/application/introductions-collector.php
+++ b/src/introductions/application/introductions-collector.php
@@ -47,7 +47,7 @@ public function get_for( $user_id ) {
continue;
}
$bucket->add_introduction(
- new Introduction_Item( $introduction->get_id(), $introduction->get_priority() )
+ new Introduction_Item( $introduction->get_id(), $introduction->get_priority() ),
);
}
@@ -76,7 +76,7 @@ private function add_introductions( Introduction_Interface ...$introductions ) {
$filtered_introductions,
static function ( $introduction ) {
return \is_a( $introduction, Introduction_Interface::class );
- }
+ },
);
}
diff --git a/src/introductions/domain/introductions-bucket.php b/src/introductions/domain/introductions-bucket.php
index 51a24806ae0..08018c3d9d7 100644
--- a/src/introductions/domain/introductions-bucket.php
+++ b/src/introductions/domain/introductions-bucket.php
@@ -43,7 +43,7 @@ public function to_array() {
static function ( $item ) {
return $item->to_array();
},
- $this->introductions
+ $this->introductions,
);
}
}
diff --git a/src/introductions/user-interface/introductions-integration.php b/src/introductions/user-interface/introductions-integration.php
index 4ab5faefaae..7075ccc364f 100644
--- a/src/introductions/user-interface/introductions-integration.php
+++ b/src/introductions/user-interface/introductions-integration.php
@@ -153,7 +153,7 @@ public function enqueue_assets() {
'pluginUrl' => \plugins_url( '', \WPSEO_FILE ),
'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( $user_id ),
'isWooEnabled' => $this->woocommerce_conditional->is_met(),
- ]
+ ],
);
$this->admin_asset_manager->enqueue_style( 'introductions' );
}
@@ -182,7 +182,7 @@ private function update_user_introductions( $user_id, $introductions ) {
static function ( $carry, $item ) {
return ( $carry === null || $item['priority'] < $carry['priority'] ) ? $item : $carry;
},
- null
+ null,
);
if ( $highest_priority_intro === null ) {
diff --git a/src/introductions/user-interface/introductions-seen-route.php b/src/introductions/user-interface/introductions-seen-route.php
index f19e86c3d79..dcf39b7544d 100644
--- a/src/introductions/user-interface/introductions-seen-route.php
+++ b/src/introductions/user-interface/introductions-seen-route.php
@@ -95,7 +95,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -119,7 +119,7 @@ public function set_introduction_seen( WP_REST_Request $request ) {
return new WP_Error(
'wpseo_introductions_seen_error',
$exception->getMessage(),
- (object) []
+ (object) [],
);
}
@@ -129,7 +129,7 @@ public function set_introduction_seen( WP_REST_Request $request ) {
'success' => $result,
],
],
- ( $result ) ? 200 : 400
+ ( $result ) ? 200 : 400,
);
}
return new WP_REST_Response( [], 400 );
diff --git a/src/introductions/user-interface/wistia-embed-permission-route.php b/src/introductions/user-interface/wistia-embed-permission-route.php
index 619b811ac5a..a1b166748a6 100644
--- a/src/introductions/user-interface/wistia-embed-permission-route.php
+++ b/src/introductions/user-interface/wistia-embed-permission-route.php
@@ -81,7 +81,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -98,7 +98,7 @@ public function get_wistia_embed_permission() {
return new WP_Error(
'wpseo_wistia_embed_permission_error',
$exception->getMessage(),
- (object) []
+ (object) [],
);
}
@@ -107,7 +107,7 @@ public function get_wistia_embed_permission() {
'json' => (object) [
'value' => $value,
],
- ]
+ ],
);
}
@@ -120,7 +120,7 @@ public function get_wistia_embed_permission() {
*/
public function set_wistia_embed_permission( WP_REST_Request $request ) {
$params = $request->get_json_params();
- $value = \boolval( $params['value'] );
+ $value = (bool) $params['value'];
try {
$user_id = $this->user_helper->get_current_user_id();
@@ -129,7 +129,7 @@ public function set_wistia_embed_permission( WP_REST_Request $request ) {
return new WP_Error(
'wpseo_wistia_embed_permission_error',
$exception->getMessage(),
- (object) []
+ (object) [],
);
}
@@ -139,7 +139,7 @@ public function set_wistia_embed_permission( WP_REST_Request $request ) {
'success' => $result,
],
],
- ( $result ) ? 200 : 400
+ ( $result ) ? 200 : 400,
);
}
diff --git a/src/llms-txt/application/file/file-failure-notification-presenter.php b/src/llms-txt/application/file/file-failure-notification-presenter.php
index 36e9dfe33a9..c408871ce86 100644
--- a/src/llms-txt/application/file/file-failure-notification-presenter.php
+++ b/src/llms-txt/application/file/file-failure-notification-presenter.php
@@ -38,7 +38,7 @@ protected function get_message() {
/* translators: 1: Link start tag to the WordPress Reading Settings page, 2: Link closing tag. */
\esc_html__( 'An existing llms.txt file wasn\'t created by Yoast or has been edited manually. Yoast won\'t overwrite it. %1$sDelete it manually%2$s or turn off this feature.', 'wordpress-seo' ),
'',
- ''
+ '',
);
break;
case 'filesystem_permissions':
@@ -53,7 +53,7 @@ protected function get_message() {
return \sprintf(
'%1$s %2$s',
\esc_html__( 'Your llms.txt file couldn\'t be auto-generated', 'wordpress-seo' ),
- $message
+ $message,
);
}
}
diff --git a/src/llms-txt/application/markdown-builders/intro-builder.php b/src/llms-txt/application/markdown-builders/intro-builder.php
index 9cdfc8fd634..2b28885db4e 100644
--- a/src/llms-txt/application/markdown-builders/intro-builder.php
+++ b/src/llms-txt/application/markdown-builders/intro-builder.php
@@ -27,7 +27,7 @@ protected function get_generator_version(): string {
public function build_intro(): Intro {
$intro_content = \sprintf(
'Generated by %s, this is an llms.txt file, meant for consumption by LLMs.',
- $this->get_generator_version()
+ $this->get_generator_version(),
);
return new Intro( $intro_content, [] );
diff --git a/src/llms-txt/application/markdown-builders/link-lists-builder.php b/src/llms-txt/application/markdown-builders/link-lists-builder.php
index edee4c9f0ee..b1dcd516b5b 100644
--- a/src/llms-txt/application/markdown-builders/link-lists-builder.php
+++ b/src/llms-txt/application/markdown-builders/link-lists-builder.php
@@ -48,7 +48,7 @@ public function __construct(
public function build_link_lists(): array {
return \array_merge(
$this->content_types_collector->get_content_types_lists(),
- $this->terms_collector->get_terms_lists()
+ $this->terms_collector->get_terms_lists(),
);
}
}
diff --git a/src/llms-txt/domain/content-types/content-type-entry.php b/src/llms-txt/domain/content-types/content-type-entry.php
index 9264cba6b21..b2ab07d67d7 100644
--- a/src/llms-txt/domain/content-types/content-type-entry.php
+++ b/src/llms-txt/domain/content-types/content-type-entry.php
@@ -127,7 +127,7 @@ public static function from_meta( Meta $meta ): self {
$meta->post->post_title,
$meta->canonical,
$meta->post->post_excerpt,
- $meta->post->post_name
+ $meta->post->post_name,
);
}
@@ -145,7 +145,7 @@ public static function from_post( WP_Post $post, string $permalink ): self {
$post->post_title,
$permalink,
$post->post_excerpt,
- $post->post_name
+ $post->post_name,
);
}
}
diff --git a/src/llms-txt/domain/markdown/sections/intro.php b/src/llms-txt/domain/markdown/sections/intro.php
index 855452f7187..3fef9827fb8 100644
--- a/src/llms-txt/domain/markdown/sections/intro.php
+++ b/src/llms-txt/domain/markdown/sections/intro.php
@@ -73,12 +73,12 @@ public function render(): string {
static function ( $link ) {
return $link->render();
},
- $this->intro_links
+ $this->intro_links,
);
$this->intro_content = \sprintf(
$this->intro_content,
- ...$rendered_links
+ ...$rendered_links,
);
return $this->intro_content;
}
diff --git a/src/llms-txt/infrastructure/file/wordpress-file-system-adapter.php b/src/llms-txt/infrastructure/file/wordpress-file-system-adapter.php
index 1add0ed8f63..edeeab169f2 100644
--- a/src/llms-txt/infrastructure/file/wordpress-file-system-adapter.php
+++ b/src/llms-txt/infrastructure/file/wordpress-file-system-adapter.php
@@ -23,7 +23,7 @@ public function set_file_content( string $content ): bool {
$result = $wp_filesystem->put_contents(
$this->get_llms_file_path(),
$content,
- \FS_CHMOD_FILE
+ \FS_CHMOD_FILE,
);
return $result;
diff --git a/src/llms-txt/infrastructure/markdown-services/terms-collector.php b/src/llms-txt/infrastructure/markdown-services/terms-collector.php
index ca50caf2acf..abfa8ca3d40 100644
--- a/src/llms-txt/infrastructure/markdown-services/terms-collector.php
+++ b/src/llms-txt/infrastructure/markdown-services/terms-collector.php
@@ -48,7 +48,7 @@ public function get_terms_lists(): array {
'number' => 5,
'orderby' => 'count',
'order' => 'DESC',
- ]
+ ],
);
$term_links = new Link_List( $taxonomy->label, [] );
diff --git a/src/llms-txt/user-interface/available-posts-route.php b/src/llms-txt/user-interface/available-posts-route.php
index 0734d0f78d6..517f4a5fb60 100644
--- a/src/llms-txt/user-interface/available-posts-route.php
+++ b/src/llms-txt/user-interface/available-posts-route.php
@@ -91,7 +91,7 @@ public function register_routes() {
],
],
],
- ]
+ ],
);
}
@@ -113,13 +113,13 @@ public function get_available_posts( WP_REST_Request $request ): WP_REST_Respons
[
'error' => $exception->getMessage(),
],
- $exception->getCode()
+ $exception->getCode(),
);
}
return new WP_REST_Response(
$available_posts_container->to_array(),
- 200
+ 200,
);
}
diff --git a/src/llms-txt/user-interface/file-failure-llms-txt-notification-integration.php b/src/llms-txt/user-interface/file-failure-llms-txt-notification-integration.php
index ae8c82e7f77..0f72c6ade2c 100644
--- a/src/llms-txt/user-interface/file-failure-llms-txt-notification-integration.php
+++ b/src/llms-txt/user-interface/file-failure-llms-txt-notification-integration.php
@@ -121,7 +121,7 @@ private function maybe_add_file_failure_notification() {
'id' => self::NOTIFICATION_ID,
'capabilities' => 'wpseo_manage_options',
'priority' => 1,
- ]
+ ],
);
$this->notification_center->restore_notification( $notification );
$this->notification_center->add_notification( $notification );
diff --git a/src/llms-txt/user-interface/health-check/file-reports.php b/src/llms-txt/user-interface/health-check/file-reports.php
index 1949fafa3ab..2dbb040ed4b 100644
--- a/src/llms-txt/user-interface/health-check/file-reports.php
+++ b/src/llms-txt/user-interface/health-check/file-reports.php
@@ -68,7 +68,7 @@ public function get_generation_failure_result( $reason ) {
'
',
'
',
'
',
- '
'
+ '',
);
break;
case 'filesystem_permissions':
@@ -79,7 +79,7 @@ public function get_generation_failure_result( $reason ) {
'
',
'
',
'
',
- '
'
+ '',
);
break;
default:
diff --git a/src/llms-txt/user-interface/llms-txt-cron-callback-integration.php b/src/llms-txt/user-interface/llms-txt-cron-callback-integration.php
index 0380afcde0e..c451256e6ca 100644
--- a/src/llms-txt/user-interface/llms-txt-cron-callback-integration.php
+++ b/src/llms-txt/user-interface/llms-txt-cron-callback-integration.php
@@ -75,7 +75,7 @@ public function register_hooks() {
[
$this,
'populate_file',
- ]
+ ],
);
}
diff --git a/src/loader.php b/src/loader.php
index 5ebb14ef71b..22f46433c80 100644
--- a/src/loader.php
+++ b/src/loader.php
@@ -257,8 +257,8 @@ protected function conditionals_are_met( $loadable_class ) {
/* translators: %1$s expands to Yoast SEO, %2$s expands to the name of the class that could not be found. */
\__( '%1$s attempted to load the class %2$s but it could not be found.', 'wordpress-seo' ),
'Yoast SEO',
- $loadable_class
- )
+ $loadable_class,
+ ),
);
}
return false;
diff --git a/src/main.php b/src/main.php
index 9040dbb9984..37b0328eaf5 100644
--- a/src/main.php
+++ b/src/main.php
@@ -49,7 +49,7 @@ protected function get_container() {
__DIR__ . '/generated/container.php',
__DIR__ . '/../config/dependency-injection/services.php',
__DIR__ . '/../vendor/composer/autoload_classmap.php',
- 'Yoast\WP\SEO\Generated'
+ 'Yoast\WP\SEO\Generated',
);
}
diff --git a/src/memoizers/meta-tags-context-memoizer.php b/src/memoizers/meta-tags-context-memoizer.php
index b54aa929381..d293456e7c5 100644
--- a/src/memoizers/meta-tags-context-memoizer.php
+++ b/src/memoizers/meta-tags-context-memoizer.php
@@ -146,7 +146,7 @@ public function get( Indexable $indexable, $page_type ) {
'blocks' => $blocks,
'post' => $post,
'page_type' => $page_type,
- ]
+ ],
);
$context->presentation = $this->presentation_memoizer->get( $indexable, $context, $page_type );
diff --git a/src/memoizers/presentation-memoizer.php b/src/memoizers/presentation-memoizer.php
index 366f00be59e..fb619564a46 100644
--- a/src/memoizers/presentation-memoizer.php
+++ b/src/memoizers/presentation-memoizer.php
@@ -57,7 +57,7 @@ public function get( Indexable $indexable, Meta_Tags_Context $context, $page_typ
[
'model' => $indexable,
'context' => $context,
- ]
+ ],
);
$this->cache[ $indexable->id ] = $context->presentation;
diff --git a/src/models/indexable-extension.php b/src/models/indexable-extension.php
index 72b9fdaf31b..19b4a254d8d 100644
--- a/src/models/indexable-extension.php
+++ b/src/models/indexable-extension.php
@@ -22,9 +22,7 @@ abstract class Indexable_Extension extends Model {
* @return Indexable The indexable.
*/
public function indexable() {
- if ( $this->indexable === null ) {
- $this->indexable = $this->belongs_to( 'Indexable', 'indexable_id', 'id' )->find_one();
- }
+ $this->indexable ??= $this->belongs_to( 'Indexable', 'indexable_id', 'id' )->find_one();
return $this->indexable;
}
diff --git a/src/plans/user-interface/upgrade-sidebar-menu-integration.php b/src/plans/user-interface/upgrade-sidebar-menu-integration.php
index 178e22e5175..d4e94c8fa11 100644
--- a/src/plans/user-interface/upgrade-sidebar-menu-integration.php
+++ b/src/plans/user-interface/upgrade-sidebar-menu-integration.php
@@ -160,6 +160,6 @@ public function do_redirect(): void {
}
\wp_redirect( $link );//phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- Safe redirect is used here.
- exit;
+ exit();
}
}
diff --git a/src/presentations/indexable-post-type-presentation.php b/src/presentations/indexable-post-type-presentation.php
index e497ef14abf..dfd150cb125 100644
--- a/src/presentations/indexable-post-type-presentation.php
+++ b/src/presentations/indexable-post-type-presentation.php
@@ -314,7 +314,7 @@ public function generate_robots() {
'imageindex' => ( $this->model->is_robots_noimageindex === true ) ? 'noimageindex' : null,
'archive' => ( $this->model->is_robots_noarchive === true ) ? 'noarchive' : null,
'snippet' => ( $this->model->is_robots_nosnippet === true ) ? 'nosnippet' : null,
- ]
+ ],
);
// No snippet means max snippet can be omitted.
diff --git a/src/presenters/abstract-indexable-tag-presenter.php b/src/presenters/abstract-indexable-tag-presenter.php
index b9cef1acb17..41e92bb10c0 100644
--- a/src/presenters/abstract-indexable-tag-presenter.php
+++ b/src/presenters/abstract-indexable-tag-presenter.php
@@ -48,7 +48,7 @@ public function present() {
$this->tag_format,
$this->escape_value( $value ),
$this->key,
- \is_admin_bar_showing() ? ' class="yoast-seo-meta-tag"' : ''
+ \is_admin_bar_showing() ? ' class="yoast-seo-meta-tag"' : '',
);
}
diff --git a/src/presenters/admin/badge-presenter.php b/src/presenters/admin/badge-presenter.php
index 217eb9977e2..088aa244ebe 100644
--- a/src/presenters/admin/badge-presenter.php
+++ b/src/presenters/admin/badge-presenter.php
@@ -77,14 +77,14 @@ public function present() {
'%3$s',
\esc_attr( $this->id ),
\esc_url( $this->link ),
- \esc_html__( 'New', 'wordpress-seo' )
+ \esc_html__( 'New', 'wordpress-seo' ),
);
}
return \sprintf(
'%2$s',
\esc_attr( $this->id ),
- \esc_html__( 'New', 'wordpress-seo' )
+ \esc_html__( 'New', 'wordpress-seo' ),
);
}
diff --git a/src/presenters/admin/beta-badge-presenter.php b/src/presenters/admin/beta-badge-presenter.php
index 684d1eb7bd1..04fce751857 100644
--- a/src/presenters/admin/beta-badge-presenter.php
+++ b/src/presenters/admin/beta-badge-presenter.php
@@ -46,14 +46,14 @@ public function present() {
'%3$s',
\esc_attr( $this->id ),
\esc_url( $this->link ),
- 'Beta' // We don't want this string to be translatable.
+ 'Beta', // We don't want this string to be translatable.
);
}
return \sprintf(
'%2$s',
\esc_attr( $this->id ),
- 'Beta' // We don't want this string to be translatable.
+ 'Beta', // We don't want this string to be translatable.
);
}
}
diff --git a/src/presenters/admin/help-link-presenter.php b/src/presenters/admin/help-link-presenter.php
index 45db58bfa64..b8a7256c72b 100644
--- a/src/presenters/admin/help-link-presenter.php
+++ b/src/presenters/admin/help-link-presenter.php
@@ -80,7 +80,7 @@ public function present() {
'%3$s',
\esc_url( $this->link ),
$target_blank_attribute,
- \esc_html( $this->link_text . $new_tab_message )
+ \esc_html( $this->link_text . $new_tab_message ),
);
}
}
diff --git a/src/presenters/admin/indexing-error-presenter.php b/src/presenters/admin/indexing-error-presenter.php
index e5079f0a9af..7c773569880 100644
--- a/src/presenters/admin/indexing-error-presenter.php
+++ b/src/presenters/admin/indexing-error-presenter.php
@@ -63,7 +63,7 @@ public function __construct(
protected function generate_first_paragraph( $is_premium, $has_valid_premium_subscription ) {
$message = \__(
'Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please click the button again to re-start the process. ',
- 'wordpress-seo'
+ 'wordpress-seo',
);
if ( $is_premium ) {
@@ -75,10 +75,10 @@ protected function generate_first_paragraph( $is_premium, $has_valid_premium_sub
/* translators: %1$s expands to an opening anchor tag for a link leading to the Premium installation page, %2$s expands to a closing anchor tag. */
\__(
'Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please make sure to activate your subscription in MyYoast by completing %1$sthese steps%2$s.',
- 'wordpress-seo'
+ 'wordpress-seo',
),
'',
- ''
+ '',
);
}
}
@@ -101,10 +101,10 @@ protected function generate_second_paragraph( $is_premium, $has_valid_premium_su
/* translators: %1$s expands to an opening anchor tag for a link leading to the Premium installation page, %2$s expands to a closing anchor tag. */
\__(
'Below are the technical details for the error. See %1$sthis page%2$s for a more detailed explanation.',
- 'wordpress-seo'
+ 'wordpress-seo',
),
'',
- ''
+ '',
);
}
diff --git a/src/presenters/admin/indexing-failed-notification-presenter.php b/src/presenters/admin/indexing-failed-notification-presenter.php
index 28ce7287ae4..0ba6d675412 100644
--- a/src/presenters/admin/indexing-failed-notification-presenter.php
+++ b/src/presenters/admin/indexing-failed-notification-presenter.php
@@ -58,10 +58,10 @@ public function present() {
/* Translators: %1$s expands to an opening anchor tag for a link leading to the Yoast SEO tools page, %2$s expands to a closing anchor tag. */
\esc_html__(
'Something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please %1$sre-start the process%2$s.',
- 'wordpress-seo'
+ 'wordpress-seo',
),
'',
- ''
+ '',
);
if ( $this->product_helper->is_premium() ) {
@@ -76,10 +76,10 @@ public function present() {
/* Translators: %1$s expands to an opening anchor tag for a link leading to the Premium installation page, %2$s expands to a closing anchor tag. */
\esc_html__(
'Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please make sure to activate your subscription in MyYoast by completing %1$sthese steps%2$s.',
- 'wordpress-seo'
+ 'wordpress-seo',
),
'',
- ''
+ '',
);
}
}
diff --git a/src/presenters/admin/indexing-list-item-presenter.php b/src/presenters/admin/indexing-list-item-presenter.php
index 09a0458ec46..38f24353d62 100644
--- a/src/presenters/admin/indexing-list-item-presenter.php
+++ b/src/presenters/admin/indexing-list-item-presenter.php
@@ -39,7 +39,7 @@ public function present() {
'%1$s %3$s',
\esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. If you have a lot of content it might take a while, but trust us, it\'s worth it.', 'wordpress-seo' ),
\esc_url( $this->short_link_helper->get( 'https://yoa.st/3-z' ) ),
- \esc_html__( 'Learn more about the benefits of optimized SEO data.', 'wordpress-seo' )
+ \esc_html__( 'Learn more about the benefits of optimized SEO data.', 'wordpress-seo' ),
);
$output .= '';
diff --git a/src/presenters/admin/indexing-notification-presenter.php b/src/presenters/admin/indexing-notification-presenter.php
index f57b343a971..03b96c2fefd 100644
--- a/src/presenters/admin/indexing-notification-presenter.php
+++ b/src/presenters/admin/indexing-notification-presenter.php
@@ -127,7 +127,7 @@ protected function get_time_estimate( $total_unindexed ) {
$estimate .= \sprintf(
/* translators: 1: Expands to Yoast SEO */
\esc_html__( 'Wait for a week or so, until %1$s automatically processes most of your content in the background.', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
$estimate .= '';
$estimate .= '
';
@@ -136,7 +136,7 @@ protected function get_time_estimate( $total_unindexed ) {
\esc_html__( '%1$sRun the indexation process on your server%2$s using %3$sWP CLI%2$s.', 'wordpress-seo' ),
'',
'',
- ''
+ '',
);
$estimate .= '
';
diff --git a/src/presenters/admin/light-switch-presenter.php b/src/presenters/admin/light-switch-presenter.php
index 837c4bc4642..2ad3ec1d26c 100644
--- a/src/presenters/admin/light-switch-presenter.php
+++ b/src/presenters/admin/light-switch-presenter.php
@@ -137,7 +137,7 @@ public function present() {
$strong_class, // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $strong_class output is hardcoded.
\esc_attr( $this->var . '-label' ),
\esc_html( $this->label ),
- $this->help // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: The help contains HTML.
+ $this->help, // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: The help contains HTML.
);
$output .= '
';
$out .= '
';
diff --git a/src/presenters/admin/premium-badge-presenter.php b/src/presenters/admin/premium-badge-presenter.php
index bfb8d95ad4c..3b4de118658 100644
--- a/src/presenters/admin/premium-badge-presenter.php
+++ b/src/presenters/admin/premium-badge-presenter.php
@@ -46,14 +46,14 @@ public function present() {
'%3$s',
\esc_attr( $this->id ),
\esc_url( $this->link ),
- 'Premium' // We don't want this string to be translatable.
+ 'Premium', // We don't want this string to be translatable.
);
}
return \sprintf(
'%2$s',
\esc_attr( $this->id ),
- 'Premium' // We don't want this string to be translatable.
+ 'Premium', // We don't want this string to be translatable.
);
}
}
diff --git a/src/presenters/admin/search-engines-discouraged-presenter.php b/src/presenters/admin/search-engines-discouraged-presenter.php
index c8ef2a30e86..035872f53b9 100644
--- a/src/presenters/admin/search-engines-discouraged-presenter.php
+++ b/src/presenters/admin/search-engines-discouraged-presenter.php
@@ -35,10 +35,10 @@ protected function get_message() {
/* translators: 1: Link start tag to the WordPress Reading Settings page, 2: Link closing tag. */
\esc_html__( 'If you want search engines to show this site in their results, you must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility.', 'wordpress-seo' ),
'',
- ''
+ '',
),
\esc_js( \wp_create_nonce( 'wpseo-ignore' ) ),
- \esc_html__( 'I don\'t want this site to show in the search results.', 'wordpress-seo' )
+ \esc_html__( 'I don\'t want this site to show in the search results.', 'wordpress-seo' ),
);
}
}
diff --git a/src/presenters/admin/woocommerce-beta-editor-presenter.php b/src/presenters/admin/woocommerce-beta-editor-presenter.php
index 048121b51c6..feada41238f 100644
--- a/src/presenters/admin/woocommerce-beta-editor-presenter.php
+++ b/src/presenters/admin/woocommerce-beta-editor-presenter.php
@@ -53,8 +53,8 @@ protected function get_message() {
\esc_html__( 'The %1$s interface is currently unavailable in the beta WooCommerce product editor. To resolve any issues, please disable the beta editor. %2$sLearn how to disable the beta WooCommerce product editor.%3$s', 'wordpress-seo' ),
'Yoast SEO',
'',
- ''
- )
+ '',
+ ),
);
}
}
diff --git a/src/presenters/debug/marker-close-presenter.php b/src/presenters/debug/marker-close-presenter.php
index b36ad7fa6f5..8b534442069 100644
--- a/src/presenters/debug/marker-close-presenter.php
+++ b/src/presenters/debug/marker-close-presenter.php
@@ -26,7 +26,7 @@ public function present() {
return \sprintf(
'',
- \esc_html( $this->helpers->product->get_name() )
+ \esc_html( $this->helpers->product->get_name() ),
);
}
diff --git a/src/presenters/debug/marker-open-presenter.php b/src/presenters/debug/marker-open-presenter.php
index 09c821a65f4..b6679213bcd 100644
--- a/src/presenters/debug/marker-open-presenter.php
+++ b/src/presenters/debug/marker-open-presenter.php
@@ -34,7 +34,7 @@ public function present() {
'',
$product_name,
$version,
- $url
+ $url,
);
}
diff --git a/src/presenters/meta-description-presenter.php b/src/presenters/meta-description-presenter.php
index 699632a6e86..57ead3c5aaf 100644
--- a/src/presenters/meta-description-presenter.php
+++ b/src/presenters/meta-description-presenter.php
@@ -34,7 +34,7 @@ public function present() {
/* translators: %1$s resolves to Yoast SEO, %2$s resolves to the Settings submenu item. */
\esc_html__( 'Admin only notice: this page does not show a meta description because it does not have one, either write it for this page specifically or go into the [%1$s - %2$s] menu and set up a template.', 'wordpress-seo' ),
\esc_html__( 'Yoast SEO', 'wordpress-seo' ),
- \esc_html__( 'Settings', 'wordpress-seo' )
+ \esc_html__( 'Settings', 'wordpress-seo' ),
)
. ' -->';
}
diff --git a/src/presenters/open-graph/image-presenter.php b/src/presenters/open-graph/image-presenter.php
index 7da1a3119b7..f2e0f8944de 100644
--- a/src/presenters/open-graph/image-presenter.php
+++ b/src/presenters/open-graph/image-presenter.php
@@ -78,7 +78,7 @@ public function get() {
// First filter the object.
$this->filter( $open_graph_image ),
// Then strip all keys that aren't in the image tags or the url.
- \array_flip( \array_merge( static::$image_tags, [ 'url' ] ) )
+ \array_flip( \array_merge( static::$image_tags, [ 'url' ] ) ),
);
}
diff --git a/src/presenters/score-icon-presenter.php b/src/presenters/score-icon-presenter.php
index 322684c15c4..eb3d122eeee 100644
--- a/src/presenters/score-icon-presenter.php
+++ b/src/presenters/score-icon-presenter.php
@@ -42,7 +42,7 @@ public function present() {
'
%2$s
',
\esc_attr( $this->title ),
\esc_html( $this->title ),
- \esc_attr( $this->css_class )
+ \esc_attr( $this->css_class ),
);
}
}
diff --git a/src/promotions/domain/black-friday-promotion.php b/src/promotions/domain/black-friday-promotion.php
index fbf0e4958e4..fba11dded86 100644
--- a/src/promotions/domain/black-friday-promotion.php
+++ b/src/promotions/domain/black-friday-promotion.php
@@ -13,7 +13,7 @@ class Black_Friday_Promotion extends Abstract_Promotion implements Promotion_Int
public function __construct() {
parent::__construct(
'black-friday-promotion',
- new Time_Interval( \gmmktime( 10, 00, 00, 11, 27, 2025 ), \gmmktime( 10, 00, 00, 12, 2, 2025 ) )
+ new Time_Interval( \gmmktime( 10, 00, 00, 11, 27, 2025 ), \gmmktime( 10, 00, 00, 12, 2, 2025 ) ),
);
}
}
diff --git a/src/repositories/indexable-cleanup-repository.php b/src/repositories/indexable-cleanup-repository.php
index 11c630a8880..61ece88f8fc 100644
--- a/src/repositories/indexable-cleanup-repository.php
+++ b/src/repositories/indexable-cleanup-repository.php
@@ -149,7 +149,7 @@ public function clean_indexables_for_non_publicly_viewable_post( $limit ) {
WHERE object_type = 'post'
AND object_sub_type IS NOT NULL
LIMIT %d",
- $limit
+ $limit,
);
}
else {
@@ -160,7 +160,7 @@ public function clean_indexables_for_non_publicly_viewable_post( $limit ) {
AND object_sub_type IS NOT NULL
AND object_sub_type NOT IN ( " . \implode( ', ', \array_fill( 0, \count( $included_post_types ), '%s' ) ) . ' )
LIMIT %d',
- \array_merge( $included_post_types, [ $limit ] )
+ \array_merge( $included_post_types, [ $limit ] ),
);
}
// phpcs:enable
@@ -217,7 +217,7 @@ public function clean_indexables_for_non_publicly_viewable_taxonomies( $limit )
WHERE object_type = 'term'
AND object_sub_type IS NOT NULL
LIMIT %d",
- $limit
+ $limit,
);
}
else {
@@ -228,7 +228,7 @@ public function clean_indexables_for_non_publicly_viewable_taxonomies( $limit )
AND object_sub_type IS NOT NULL
AND object_sub_type NOT IN ( " . \implode( ', ', \array_fill( 0, \count( $included_taxonomies ), '%s' ) ) . ' )
LIMIT %d',
- \array_merge( $included_taxonomies, [ $limit ] )
+ \array_merge( $included_taxonomies, [ $limit ] ),
);
}
// phpcs:enable
@@ -265,7 +265,7 @@ public function clean_indexables_for_non_publicly_viewable_post_type_archive_pag
WHERE object_type = 'post-type-archive'
AND object_sub_type IS NOT NULL
LIMIT %d",
- $limit
+ $limit,
);
}
else {
@@ -276,7 +276,7 @@ public function clean_indexables_for_non_publicly_viewable_post_type_archive_pag
AND object_sub_type IS NOT NULL
AND object_sub_type NOT IN ( " . \implode( ', ', \array_fill( 0, \count( $post_archives ), '%s' ) ) . ' )
LIMIT %d',
- \array_merge( $post_archives, [ $limit ] )
+ \array_merge( $post_archives, [ $limit ] ),
);
}
// phpcs:enable
@@ -409,7 +409,7 @@ public function clean_indexables_for_authors_without_archive( $limit ) {
WHERE post_type IN ( " . \implode( ', ', \array_fill( 0, \count( $author_archive_post_types ), '%s' ) ) . ' )
AND post_status IN ( ' . \implode( ', ', \array_fill( 0, \count( $viewable_post_stati ), '%s' ) ) . ' )
) LIMIT %d',
- \array_merge( $author_archive_post_types, $viewable_post_stati, [ $limit ] )
+ \array_merge( $author_archive_post_types, $viewable_post_stati, [ $limit ] ),
);
// phpcs:enable
@@ -443,7 +443,7 @@ public function count_indexables_for_authors_without_archive() {
WHERE post_type IN ( " . \implode( ', ', \array_fill( 0, \count( $author_archive_post_types ), '%s' ) ) . ' )
AND post_status IN ( ' . \implode( ', ', \array_fill( 0, \count( $viewable_post_stati ), '%s' ) ) . ' )
)',
- \array_merge( $author_archive_post_types, $viewable_post_stati )
+ \array_merge( $author_archive_post_types, $viewable_post_stati ),
);
// phpcs:enable
@@ -480,7 +480,7 @@ public function clean_indexables_for_object_type_and_source_table( $source_table
AND indexable_table.object_id IS NOT NULL
AND indexable_table.object_type = '{$object_type}'
LIMIT %d",
- $limit
+ $limit,
);
// phpcs:enable
@@ -518,7 +518,7 @@ public function clean_indexables_for_orphaned_users( $limit ) {
AND indexable_table.object_id IS NOT NULL
AND indexable_table.object_type = 'user'
LIMIT %d",
- $limit
+ $limit,
);
// phpcs:enable
@@ -555,7 +555,7 @@ public function count_indexables_for_object_type_and_source_table( string $sourc
ON indexable_table.object_id = source_table.{$source_identifier}
WHERE source_table.{$source_identifier} IS NULL
AND indexable_table.object_id IS NOT NULL
- AND indexable_table.object_type = '{$object_type}'"
+ AND indexable_table.object_type = '{$object_type}'",
)[0];
// phpcs:enable
}
@@ -578,7 +578,7 @@ public function count_indexables_for_orphaned_users() {
ON indexable_table.object_id = source_table.ID
WHERE source_table.ID IS NULL
AND indexable_table.object_id IS NOT NULL
- AND indexable_table.object_type = 'user'"
+ AND indexable_table.object_type = 'user'",
)[0];
// phpcs:enable
}
@@ -609,7 +609,7 @@ public function cleanup_orphaned_from_table( $table, $column, $limit ) {
WHERE indexable_table.id IS NULL
AND table_to_clean.{$column} IS NOT NULL
LIMIT %d",
- $limit
+ $limit,
);
// phpcs:enable
@@ -647,7 +647,7 @@ public function count_orphaned_from_table( string $table, string $column ) {
LEFT JOIN {$indexable_table} AS indexable_table
ON table_to_clean.{$column} = indexable_table.id
WHERE indexable_table.id IS NULL
- AND table_to_clean.{$column} IS NOT NULL"
+ AND table_to_clean.{$column} IS NOT NULL",
)[0];
// phpcs:enable
}
@@ -697,7 +697,7 @@ private function get_reassigned_authors( $limit ) {
GROUP BY {$indexable_table}.author_id, {$posts_table}.post_author
ORDER BY {$indexable_table}.author_id
LIMIT %d",
- $limit
+ $limit,
);
// phpcs:enable
@@ -724,7 +724,7 @@ private function update_indexable_authors( $reassigned_authors_objs, $limit ) {
static function ( $obj ) {
return (array) $obj;
},
- $reassigned_authors_objs
+ $reassigned_authors_objs,
);
$reassigned_authors = \array_combine( \array_column( $reassigned_authors_array, 'author_id' ), \array_column( $reassigned_authors_array, 'post_author' ) );
@@ -738,7 +738,7 @@ static function ( $obj ) {
WHERE {$indexable_table}.author_id = {$old_author_id}
AND object_type='post'
LIMIT %d",
- $limit
+ $limit,
);
// phpcs:enable
diff --git a/src/repositories/indexable-hierarchy-repository.php b/src/repositories/indexable-hierarchy-repository.php
index 1d83ed759b7..3db994da330 100644
--- a/src/repositories/indexable-hierarchy-repository.php
+++ b/src/repositories/indexable-hierarchy-repository.php
@@ -84,7 +84,7 @@ public function add_ancestor( $indexable_id, $ancestor_id, $depth ) {
'ancestor_id' => $ancestor_id,
'depth' => $depth,
'blog_id' => \get_current_blog_id(),
- ]
+ ],
);
return $hierarchy->save();
diff --git a/src/repositories/indexable-repository.php b/src/repositories/indexable-repository.php
index 1839b86dc08..76ea78a3542 100644
--- a/src/repositories/indexable-repository.php
+++ b/src/repositories/indexable-repository.php
@@ -149,7 +149,7 @@ public function for_current_page() {
'object_type' => 'unknown',
'post_status' => 'unindexed',
'version' => 1,
- ]
+ ],
);
}
@@ -600,7 +600,7 @@ public function reset_permalink( $type = null, $subtype = null, $object_id = nul
'permalink' => null,
'permalink_hash' => null,
'version' => 0,
- ]
+ ],
);
if ( $type !== null ) {
diff --git a/src/repositories/seo-links-repository.php b/src/repositories/seo-links-repository.php
index 325f9ed2b65..a0648fe8050 100644
--- a/src/repositories/seo-links-repository.php
+++ b/src/repositories/seo-links-repository.php
@@ -175,7 +175,7 @@ public function get_incoming_link_counts_for_indexable_ids( $indexable_ids ) {
// Loop over the original ID's and search them in the returned ID's. If they don't exist, add them with an incoming count of 0.
foreach ( $indexable_ids as $id ) {
// Cast the ID to string, as the arrays only contain stringified versions of the ID.
- $id = \strval( $id );
+ $id = (string) $id;
if ( isset( $returned_ids[ $id ] ) === false ) {
$indexable_counts[] = [
'incoming' => '0',
diff --git a/src/routes/abstract-action-route.php b/src/routes/abstract-action-route.php
index 9ee3f07aa6e..e26ef329629 100644
--- a/src/routes/abstract-action-route.php
+++ b/src/routes/abstract-action-route.php
@@ -24,7 +24,7 @@ protected function respond_with( $objects, $next_url ) {
[
'objects' => $objects,
'next_url' => $next_url,
- ]
+ ],
);
}
}
diff --git a/src/routes/alert-dismissal-route.php b/src/routes/alert-dismissal-route.php
index b6056647f34..515eaf8cce9 100644
--- a/src/routes/alert-dismissal-route.php
+++ b/src/routes/alert-dismissal-route.php
@@ -89,7 +89,7 @@ public function dismiss( WP_REST_Request $request ) {
'success' => $success,
'status' => $status,
],
- $status
+ $status,
);
}
diff --git a/src/routes/first-time-configuration-route.php b/src/routes/first-time-configuration-route.php
index 7774bfe58dc..41b339a9a5a 100644
--- a/src/routes/first-time-configuration-route.php
+++ b/src/routes/first-time-configuration-route.php
@@ -218,7 +218,7 @@ public function set_social_profiles( WP_REST_Request $request ) {
->set_social_profiles( $request->get_json_params() );
return new WP_REST_Response(
- [ 'json' => $data ]
+ [ 'json' => $data ],
);
}
diff --git a/src/routes/importing-route.php b/src/routes/importing-route.php
index c30ad66f11e..91882146b4e 100644
--- a/src/routes/importing-route.php
+++ b/src/routes/importing-route.php
@@ -68,7 +68,7 @@ public function register_routes() {
'callback' => [ $this, 'execute' ],
'permission_callback' => [ $this, 'is_user_permitted_to_import' ],
'methods' => [ 'POST' ],
- ]
+ ],
);
}
@@ -94,7 +94,7 @@ public function execute( $data ) {
'Requested importer not found',
[
'status' => 404,
- ]
+ ],
);
}
@@ -106,21 +106,21 @@ public function execute( $data ) {
return $this->respond_with(
$result,
- $next_url
+ $next_url,
);
} catch ( Exception $exception ) {
if ( $exception instanceof Aioseo_Validation_Exception ) {
return new WP_Error(
'wpseo_error_validation',
$exception->getMessage(),
- [ 'stackTrace' => $exception->getTraceAsString() ]
+ [ 'stackTrace' => $exception->getTraceAsString() ],
);
}
return new WP_Error(
'wpseo_error_indexing',
$exception->getMessage(),
- [ 'stackTrace' => $exception->getTraceAsString() ]
+ [ 'stackTrace' => $exception->getTraceAsString() ],
);
}
}
diff --git a/src/routes/indexing-route.php b/src/routes/indexing-route.php
index 03f98c84d43..898907cefc3 100644
--- a/src/routes/indexing-route.php
+++ b/src/routes/indexing-route.php
@@ -424,7 +424,7 @@ protected function run_indexation_action( Indexation_Action_Interface $indexatio
return new WP_Error(
'wpseo_error_indexing',
$exception->getMessage(),
- [ 'stackTrace' => $exception->getTraceAsString() ]
+ [ 'stackTrace' => $exception->getTraceAsString() ],
);
}
}
diff --git a/src/routes/integrations-route.php b/src/routes/integrations-route.php
index 2e6dec53d14..b457735dcc3 100644
--- a/src/routes/integrations-route.php
+++ b/src/routes/integrations-route.php
@@ -95,7 +95,7 @@ public function set_integration_active( WP_REST_Request $request ) {
->set_integration_active( $integration_name, $value );
return new WP_REST_Response(
- [ 'json' => $data ]
+ [ 'json' => $data ],
);
}
}
diff --git a/src/routes/semrush-route.php b/src/routes/semrush-route.php
index 9e089c8714c..78176504a65 100644
--- a/src/routes/semrush-route.php
+++ b/src/routes/semrush-route.php
@@ -220,7 +220,7 @@ public function get_related_keyphrases( WP_REST_Request $request ) {
->phrases_action
->get_related_keyphrases(
$request['keyphrase'],
- $request['country_code']
+ $request['country_code'],
);
return new WP_REST_Response( $data, $data->status );
diff --git a/src/routes/supported-features-route.php b/src/routes/supported-features-route.php
index dd19898ef4d..14fc519d1ff 100644
--- a/src/routes/supported-features-route.php
+++ b/src/routes/supported-features-route.php
@@ -53,7 +53,7 @@ public function get_supported_features() {
return new WP_REST_Response(
[
'addon-installation' => 1,
- ]
+ ],
);
}
}
diff --git a/src/routes/workouts-route.php b/src/routes/workouts-route.php
index af97b54ad35..921e9a16701 100644
--- a/src/routes/workouts-route.php
+++ b/src/routes/workouts-route.php
@@ -81,7 +81,7 @@ public function get_workouts() {
$workouts_option = \apply_filters( 'Yoast\WP\SEO\workouts_options', $workouts_option );
return new WP_REST_Response(
- [ 'json' => $workouts_option ]
+ [ 'json' => $workouts_option ],
);
}
@@ -105,7 +105,7 @@ public function set_workouts( $request ) {
$result = \apply_filters( 'Yoast\WP\SEO\workouts_route_save', null, $workouts_data );
return new WP_REST_Response(
- [ 'json' => $result ]
+ [ 'json' => $result ],
);
}
diff --git a/src/schema/application/configuration/schema-configuration.php b/src/schema/application/configuration/schema-configuration.php
index 06c04080489..a9a7917fe3c 100644
--- a/src/schema/application/configuration/schema-configuration.php
+++ b/src/schema/application/configuration/schema-configuration.php
@@ -92,7 +92,7 @@ public function get_schema_api_integrations(): array {
$woocommerce_seo_activate_url = \wp_nonce_url(
\self_admin_url( 'plugins.php?action=activate&plugin=' . $woocommerce_seo_file ),
- 'activate-plugin_' . $woocommerce_seo_file
+ 'activate-plugin_' . $woocommerce_seo_file,
);
$is_premium = $this->product_helper->is_premium();
diff --git a/src/services/health-check/default-tagline-reports.php b/src/services/health-check/default-tagline-reports.php
index 413b0689b53..46aef484679 100644
--- a/src/services/health-check/default-tagline-reports.php
+++ b/src/services/health-check/default-tagline-reports.php
@@ -62,7 +62,7 @@ private function get_actions() {
/* translators: 1: link open tag; 2: link close tag. */
\esc_html__( '%1$sYou can change the tagline in the customizer%2$s.', 'wordpress-seo' ),
'',
- ''
+ '',
);
}
}
diff --git a/src/services/health-check/links-table-reports.php b/src/services/health-check/links-table-reports.php
index 1e71e23b712..e06bebd1b78 100644
--- a/src/services/health-check/links-table-reports.php
+++ b/src/services/health-check/links-table-reports.php
@@ -72,7 +72,7 @@ private function get_success_description() {
/* translators: 1: Link to the Yoast SEO blog, 2: Link closing tag. */
\esc_html__( 'The text link counter helps you improve your site structure. %1$sFind out how the text link counter can enhance your SEO%2$s.', 'wordpress-seo' ),
'',
- WPSEO_Admin_Utils::get_new_tab_message() . ''
+ WPSEO_Admin_Utils::get_new_tab_message() . '',
);
}
@@ -85,7 +85,7 @@ private function get_links_table_not_accessible_description() {
return \sprintf(
/* translators: 1: Yoast SEO. */
\__( 'For this feature to work, %1$s needs to create a table in your database. We were unable to create this table automatically.', 'wordpress-seo' ),
- 'Yoast SEO'
+ 'Yoast SEO',
);
}
@@ -99,7 +99,7 @@ private function get_actions() {
/* translators: 1: Link to the Yoast help center, 2: Link closing tag. */
\esc_html__( '%1$sFind out how to solve this problem on our help center%2$s.', 'wordpress-seo' ),
'',
- WPSEO_Admin_Utils::get_new_tab_message() . ''
+ WPSEO_Admin_Utils::get_new_tab_message() . '',
);
}
}
diff --git a/src/services/health-check/page-comments-reports.php b/src/services/health-check/page-comments-reports.php
index 17812d2c648..4e0f345c28a 100644
--- a/src/services/health-check/page-comments-reports.php
+++ b/src/services/health-check/page-comments-reports.php
@@ -57,7 +57,7 @@ private function get_has_comments_on_multiple_pages_actions() {
/* translators: 1: Opening tag of the link to the discussion settings page, 2: Link closing tag. */
\esc_html__( '%1$sGo to the Discussion Settings page%2$s', 'wordpress-seo' ),
'',
- ''
+ '',
);
}
}
diff --git a/src/services/health-check/postname-permalink-reports.php b/src/services/health-check/postname-permalink-reports.php
index 6cbe125363f..469f7fa7610 100644
--- a/src/services/health-check/postname-permalink-reports.php
+++ b/src/services/health-check/postname-permalink-reports.php
@@ -56,7 +56,7 @@ private function get_has_no_postname_in_permalink_description() {
return \sprintf(
/* translators: %s expands to '/%postname%/' */
\__( 'It\'s highly recommended to have your postname in the URL of your posts and pages. Consider setting your permalink structure to %s.', 'wordpress-seo' ),
- '/%postname%/'
+ '/%postname%/',
);
}
@@ -70,7 +70,7 @@ private function get_has_no_postname_in_permalink_actions() {
/* translators: %1$s is a link start tag to the permalink settings page, %2$s is the link closing tag. */
\__( 'You can fix this on the %1$sPermalink settings page%2$s.', 'wordpress-seo' ),
'',
- ''
+ '',
);
}
}
diff --git a/src/services/health-check/report-builder.php b/src/services/health-check/report-builder.php
index 1e56466191e..1d5ae6b98ec 100644
--- a/src/services/health-check/report-builder.php
+++ b/src/services/health-check/report-builder.php
@@ -201,7 +201,7 @@ private function get_signature() {
\esc_html__( '%1$sThis was reported by the %2$s plugin%3$s', 'wordpress-seo' ),
'
Optimize SEO Data You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. If you have a lot of content it might take a while, but trust us, it\'s worth it. Learn more about the benefits of optimized SEO data.
'
+ '
Optimize SEO Data You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. If you have a lot of content it might take a while, but trust us, it\'s worth it. Learn more about the benefits of optimized SEO data.
',
);
}
}
diff --git a/tests/Unit/Integrations/Admin/Installation_Success_Integration_Test.php b/tests/Unit/Integrations/Admin/Installation_Success_Integration_Test.php
index d62332bbf4b..6dee0d8ea38 100644
--- a/tests/Unit/Integrations/Admin/Installation_Success_Integration_Test.php
+++ b/tests/Unit/Integrations/Admin/Installation_Success_Integration_Test.php
@@ -66,7 +66,7 @@ protected function set_up() {
$this->options_helper,
$this->product_helper,
$this->shortlinker,
- ]
+ ],
)->makePartial();
}
@@ -82,7 +82,7 @@ public function test_get_conditionals() {
[
Admin_Conditional::class,
],
- Installation_Success_Integration::get_conditionals()
+ Installation_Success_Integration::get_conditionals(),
);
}
@@ -96,12 +96,12 @@ public function test_get_conditionals() {
public function test_constructor() {
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
$this->assertInstanceOf(
Product_Helper::class,
- $this->getPropertyValue( $this->instance, 'product_helper' )
+ $this->getPropertyValue( $this->instance, 'product_helper' ),
);
}
@@ -120,9 +120,9 @@ public function test_register_hooks() {
[
$this->instance,
'add_submenu_page',
- ]
+ ],
),
- 'Does not have expected admin_menu filter'
+ 'Does not have expected admin_menu filter',
);
$this->assertNotFalse(
Monkey\Actions\has(
@@ -130,9 +130,9 @@ public function test_register_hooks() {
[
$this->instance,
'enqueue_assets',
- ]
+ ],
),
- 'Does not have expected admin_enqueue_scripts action'
+ 'Does not have expected admin_enqueue_scripts action',
);
$this->assertNotFalse(
Monkey\Actions\has(
@@ -140,9 +140,9 @@ public function test_register_hooks() {
[
$this->instance,
'maybe_redirect',
- ]
+ ],
),
- 'Does not have expected admin_init action'
+ 'Does not have expected admin_init action',
);
}
@@ -421,7 +421,7 @@ public function test_add_submenu_page() {
[
$this->instance,
'render_page',
- ]
+ ],
);
$submenu_pages = [
diff --git a/tests/Unit/Integrations/Admin/Integrations_Page_Integration_Test.php b/tests/Unit/Integrations/Admin/Integrations_Page_Integration_Test.php
index 207153d59d4..c6179dca092 100644
--- a/tests/Unit/Integrations/Admin/Integrations_Page_Integration_Test.php
+++ b/tests/Unit/Integrations/Admin/Integrations_Page_Integration_Test.php
@@ -106,7 +106,7 @@ protected function set_up() {
$this->jetpack_conditional,
$this->site_kit_configuration,
$this->site_kit_consent_management_endpoint,
- $this->schema_configuration
+ $this->schema_configuration,
);
}
@@ -120,7 +120,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Admin_Conditional::class ],
- $this->instance->get_conditionals()
+ $this->instance->get_conditionals(),
);
}
@@ -243,7 +243,7 @@ public function test_enqueue_assets() {
'site_kit_configuration' => $site_kit_config,
'site_kit_consent_management_url' => 'https://www.example.com/manage-consent',
'schema_framework_enabled' => true,
- ]
+ ],
);
$this->instance->enqueue_assets();
diff --git a/tests/Unit/Integrations/Admin/Migration_Error_Integration_Test.php b/tests/Unit/Integrations/Admin/Migration_Error_Integration_Test.php
index 09b5162e9c2..859eeae08f1 100644
--- a/tests/Unit/Integrations/Admin/Migration_Error_Integration_Test.php
+++ b/tests/Unit/Integrations/Admin/Migration_Error_Integration_Test.php
@@ -60,7 +60,7 @@ protected function set_up() {
public function test_construct() {
$this->assertInstanceOf(
Migration_Status::class,
- $this->getPropertyValue( $this->instance, 'migration_status' )
+ $this->getPropertyValue( $this->instance, 'migration_status' ),
);
}
@@ -158,7 +158,7 @@ private function expect_shortlinker() {
$container = $this->create_container_with(
[
Short_Link_Helper::class => $short_link_mock,
- ]
+ ],
);
Monkey\Functions\expect( 'YoastSEO' )
diff --git a/tests/Unit/Integrations/Admin/Old_Configuration_Integration_Test.php b/tests/Unit/Integrations/Admin/Old_Configuration_Integration_Test.php
index 82d2f695045..739fc85acf6 100644
--- a/tests/Unit/Integrations/Admin/Old_Configuration_Integration_Test.php
+++ b/tests/Unit/Integrations/Admin/Old_Configuration_Integration_Test.php
@@ -47,7 +47,7 @@ public function test_get_conditionals() {
[
Admin_Conditional::class,
],
- Old_Configuration_Integration::get_conditionals()
+ Old_Configuration_Integration::get_conditionals(),
);
}
@@ -66,9 +66,9 @@ public function test_register_hooks() {
[
$this->instance,
'add_submenu_page',
- ]
+ ],
),
- 'Does not have expected admin_menu filter'
+ 'Does not have expected admin_menu filter',
);
$this->assertNotFalse(
Monkey\Actions\has(
@@ -76,9 +76,9 @@ public function test_register_hooks() {
[
$this->instance,
'redirect_to_new_configuration',
- ]
+ ],
),
- 'Does not have expected admin_init action'
+ 'Does not have expected admin_init action',
);
}
@@ -103,7 +103,7 @@ public function test_add_submenu_page() {
[
$this->instance,
'render_page',
- ]
+ ],
);
$submenu_pages = [
diff --git a/tests/Unit/Integrations/Admin/Redirect_Integration_Test.php b/tests/Unit/Integrations/Admin/Redirect_Integration_Test.php
index 34a2b884fc7..bfa40c901c4 100644
--- a/tests/Unit/Integrations/Admin/Redirect_Integration_Test.php
+++ b/tests/Unit/Integrations/Admin/Redirect_Integration_Test.php
@@ -77,7 +77,7 @@ public function test_get_conditionals() {
[
Admin_Conditional::class,
],
- Redirect_Integration::get_conditionals()
+ Redirect_Integration::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Admin/Redirects_Page_Integration_Test.php b/tests/Unit/Integrations/Admin/Redirects_Page_Integration_Test.php
index 03b868daab1..94cd45cd991 100644
--- a/tests/Unit/Integrations/Admin/Redirects_Page_Integration_Test.php
+++ b/tests/Unit/Integrations/Admin/Redirects_Page_Integration_Test.php
@@ -64,7 +64,7 @@ protected function set_up() {
$this->instance = new Redirects_Page_Integration(
$this->current_page_helper,
$this->user_helper,
- $this->wistia_embed_permission_repository
+ $this->wistia_embed_permission_repository,
);
}
@@ -81,7 +81,7 @@ public function test_get_conditionals() {
Admin_Conditional::class,
Premium_Inactive_Conditional::class,
],
- Redirects_Page_Integration::get_conditionals()
+ Redirects_Page_Integration::get_conditionals(),
);
}
@@ -102,9 +102,9 @@ public function test_register_hooks() {
[
$this->instance,
'add_submenu_page',
- ]
+ ],
),
- 'Does not have expected wpseo_submenu_pages filter'
+ 'Does not have expected wpseo_submenu_pages filter',
);
}
diff --git a/tests/Unit/Integrations/Blocks/Block_Editor_Integration_Test.php b/tests/Unit/Integrations/Blocks/Block_Editor_Integration_Test.php
index ab721813c3a..20be6084bdf 100644
--- a/tests/Unit/Integrations/Blocks/Block_Editor_Integration_Test.php
+++ b/tests/Unit/Integrations/Blocks/Block_Editor_Integration_Test.php
@@ -56,7 +56,7 @@ public function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Post_Conditional::class ],
- Block_Editor_Integration::get_conditionals()
+ Block_Editor_Integration::get_conditionals(),
);
}
@@ -70,7 +70,7 @@ public function test_get_conditionals() {
public function test_constructor() {
$this->assertInstanceOf(
WPSEO_Admin_Asset_Manager::class,
- $this->getPropertyValue( $this->instance, 'asset_manager' )
+ $this->getPropertyValue( $this->instance, 'asset_manager' ),
);
}
diff --git a/tests/Unit/Integrations/Blocks/Structured_Data_Blocks_Test.php b/tests/Unit/Integrations/Blocks/Structured_Data_Blocks_Test.php
index d3f90d7b704..8c9584cb636 100644
--- a/tests/Unit/Integrations/Blocks/Structured_Data_Blocks_Test.php
+++ b/tests/Unit/Integrations/Blocks/Structured_Data_Blocks_Test.php
@@ -54,7 +54,7 @@ protected function set_up() {
$this->instance = new Structured_Data_Blocks(
$this->asset_manager,
- $this->image_helper
+ $this->image_helper,
);
}
@@ -70,8 +70,8 @@ public function test_construct() {
Structured_Data_Blocks::class,
new Structured_Data_Blocks(
$this->asset_manager,
- $this->image_helper
- )
+ $this->image_helper,
+ ),
);
}
@@ -168,9 +168,9 @@ public function test_present_duration_text( $expected, $attributes, $content, $m
$expected,
$this->instance->present_duration_text(
$attributes,
- $content
+ $content,
),
- $message
+ $message,
);
}
@@ -234,9 +234,9 @@ public function test_optimize_how_to_images( $expected, $attributes, $content, $
$expected,
$this->instance->optimize_how_to_images(
$attributes,
- $content
+ $content,
),
- $message
+ $message,
);
}
}
diff --git a/tests/Unit/Integrations/Breadcrumbs_Integration_Test.php b/tests/Unit/Integrations/Breadcrumbs_Integration_Test.php
index 34924e0f727..a2482885172 100644
--- a/tests/Unit/Integrations/Breadcrumbs_Integration_Test.php
+++ b/tests/Unit/Integrations/Breadcrumbs_Integration_Test.php
@@ -53,7 +53,7 @@ protected function set_up() {
$this->instance = new Breadcrumbs_Integration(
Mockery::mock( Helpers_Surface::class ),
Mockery::mock( WPSEO_Replace_Vars::class ),
- $this->context_memoizer
+ $this->context_memoizer,
);
}
diff --git a/tests/Unit/Integrations/Cleanup_Integration_Test.php b/tests/Unit/Integrations/Cleanup_Integration_Test.php
index 274c73a5518..2c7c14acfc8 100644
--- a/tests/Unit/Integrations/Cleanup_Integration_Test.php
+++ b/tests/Unit/Integrations/Cleanup_Integration_Test.php
@@ -61,7 +61,7 @@ protected function set_up() {
$this->instance = new Cleanup_Integration(
$this->indexable_repository,
- $this->indexable_helper
+ $this->indexable_helper,
);
global $wpdb;
diff --git a/tests/Unit/Integrations/Estimated_Reading_Time_Test.php b/tests/Unit/Integrations/Estimated_Reading_Time_Test.php
index b9e0147ff1f..e7cdfc9aded 100644
--- a/tests/Unit/Integrations/Estimated_Reading_Time_Test.php
+++ b/tests/Unit/Integrations/Estimated_Reading_Time_Test.php
@@ -58,7 +58,7 @@ public function test_register_hooks() {
public function test_get_conditionals() {
$this->assertEquals(
[ Estimated_Reading_Time_Conditional::class ],
- Estimated_Reading_Time::get_conditionals()
+ Estimated_Reading_Time::get_conditionals(),
);
}
@@ -79,7 +79,7 @@ public function test_add_estimated_reading_time_hidden_fields() {
'type' => 'hidden',
'title' => 'estimated-reading-time-minutes',
],
- $actual['estimated-reading-time-minutes']
+ $actual['estimated-reading-time-minutes'],
);
}
diff --git a/tests/Unit/Integrations/Feature_Flag_Integration_Test.php b/tests/Unit/Integrations/Feature_Flag_Integration_Test.php
index c00e4e1e7f1..e7da0ed7d22 100644
--- a/tests/Unit/Integrations/Feature_Flag_Integration_Test.php
+++ b/tests/Unit/Integrations/Feature_Flag_Integration_Test.php
@@ -69,14 +69,14 @@ public function set_up() {
public function test_constructor() {
self::assertInstanceOf(
WPSEO_Admin_Asset_Manager::class,
- self::getPropertyValue( $this->instance, 'asset_manager' )
+ self::getPropertyValue( $this->instance, 'asset_manager' ),
);
self::assertIsArray(
- self::getPropertyValue( $this->instance, 'feature_flags' )
+ self::getPropertyValue( $this->instance, 'feature_flags' ),
);
self::assertInstanceOf(
Feature_Flag_Conditional::class,
- self::getPropertyValue( $this->instance, 'feature_flags' )[0]
+ self::getPropertyValue( $this->instance, 'feature_flags' )[0],
);
}
diff --git a/tests/Unit/Integrations/Front_End/Category_Term_Description_Test.php b/tests/Unit/Integrations/Front_End/Category_Term_Description_Test.php
index a31caf9e8c7..d83eaa952c4 100644
--- a/tests/Unit/Integrations/Front_End/Category_Term_Description_Test.php
+++ b/tests/Unit/Integrations/Front_End/Category_Term_Description_Test.php
@@ -45,7 +45,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Category_Term_Description::get_conditionals()
+ Category_Term_Description::get_conditionals(),
);
}
@@ -76,7 +76,7 @@ public function test_add_shortcode_support() {
$this->assertEquals(
'This is a category text',
- $this->instance->add_shortcode_support( 'This is a category text' )
+ $this->instance->add_shortcode_support( 'This is a category text' ),
);
}
}
diff --git a/tests/Unit/Integrations/Front_End/Comment_Link_Fixer_Test.php b/tests/Unit/Integrations/Front_End/Comment_Link_Fixer_Test.php
index 44fc3d5f2ef..b24b4f026dc 100644
--- a/tests/Unit/Integrations/Front_End/Comment_Link_Fixer_Test.php
+++ b/tests/Unit/Integrations/Front_End/Comment_Link_Fixer_Test.php
@@ -66,7 +66,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Comment_Link_Fixer::get_conditionals()
+ Comment_Link_Fixer::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Basic_Test.php b/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Basic_Test.php
index 1a6da0ffb4d..f8835a4e663 100644
--- a/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Basic_Test.php
+++ b/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Basic_Test.php
@@ -55,7 +55,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Crawl_Cleanup_Basic::get_conditionals()
+ Crawl_Cleanup_Basic::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Rss_Test.php b/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Rss_Test.php
index 0292e460152..d7b1e36f7ba 100644
--- a/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Rss_Test.php
+++ b/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Rss_Test.php
@@ -55,7 +55,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Crawl_Cleanup_Rss::get_conditionals()
+ Crawl_Cleanup_Rss::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Searches_Test.php b/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Searches_Test.php
index c6b9d717ec8..5feb539a414 100644
--- a/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Searches_Test.php
+++ b/tests/Unit/Integrations/Front_End/Crawl_Cleanup_Searches_Test.php
@@ -67,7 +67,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Crawl_Cleanup_Searches::get_conditionals()
+ Crawl_Cleanup_Searches::get_conditionals(),
);
}
@@ -104,8 +104,8 @@ public function test_register_hooks() {
[
$this->instance,
'maybe_redirect_searches',
- ]
- )
+ ],
+ ),
);
}
diff --git a/tests/Unit/Integrations/Front_End/Force_Rewrite_Title_Test.php b/tests/Unit/Integrations/Front_End/Force_Rewrite_Title_Test.php
index 27c92058494..ad57f503290 100644
--- a/tests/Unit/Integrations/Front_End/Force_Rewrite_Title_Test.php
+++ b/tests/Unit/Integrations/Front_End/Force_Rewrite_Title_Test.php
@@ -66,7 +66,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Force_Rewrite_Title::get_conditionals()
+ Force_Rewrite_Title::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Front_End/Handle_404_Test.php b/tests/Unit/Integrations/Front_End/Handle_404_Test.php
index abae85fe66a..fb9111416b9 100644
--- a/tests/Unit/Integrations/Front_End/Handle_404_Test.php
+++ b/tests/Unit/Integrations/Front_End/Handle_404_Test.php
@@ -59,7 +59,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Handle_404::get_conditionals()
+ Handle_404::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Front_End/Indexing_Controls_Test.php b/tests/Unit/Integrations/Front_End/Indexing_Controls_Test.php
index 82c1521e85b..181ed59c85b 100644
--- a/tests/Unit/Integrations/Front_End/Indexing_Controls_Test.php
+++ b/tests/Unit/Integrations/Front_End/Indexing_Controls_Test.php
@@ -55,7 +55,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Indexing_Controls::get_conditionals()
+ Indexing_Controls::get_conditionals(),
);
}
@@ -104,7 +104,7 @@ public function test_no_index_and_is_no_robots() {
public function test_nofollow_link() {
$this->assertEquals(
'A link',
- $this->instance->nofollow_link( 'A link' )
+ $this->instance->nofollow_link( 'A link' ),
);
}
}
diff --git a/tests/Unit/Integrations/Front_End/Open_Graph_OEmbed_Test.php b/tests/Unit/Integrations/Front_End/Open_Graph_OEmbed_Test.php
index 45e6635aa90..0a1992598c8 100644
--- a/tests/Unit/Integrations/Front_End/Open_Graph_OEmbed_Test.php
+++ b/tests/Unit/Integrations/Front_End/Open_Graph_OEmbed_Test.php
@@ -59,7 +59,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class, Open_Graph_Conditional::class ],
- Open_Graph_OEmbed::get_conditionals()
+ Open_Graph_OEmbed::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Front_End/RSS_Footer_Embed_Test.php b/tests/Unit/Integrations/Front_End/RSS_Footer_Embed_Test.php
index 1e8db76fc09..119e6d120be 100644
--- a/tests/Unit/Integrations/Front_End/RSS_Footer_Embed_Test.php
+++ b/tests/Unit/Integrations/Front_End/RSS_Footer_Embed_Test.php
@@ -57,7 +57,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- RSS_Footer_Embed::get_conditionals()
+ RSS_Footer_Embed::get_conditionals(),
);
}
@@ -88,7 +88,7 @@ public function test_embed_rssfooter_not_on_feed_page() {
$this->assertEquals(
'Not on feed page',
- $this->instance->embed_rssfooter( 'Not on feed page' )
+ $this->instance->embed_rssfooter( 'Not on feed page' ),
);
}
@@ -109,7 +109,7 @@ public function test_embed_rssfooter_disabled_by_filter() {
$this->assertEquals(
'Disabled feature by filter.',
- $this->instance->embed_rssfooter( 'Disabled feature by filter.' )
+ $this->instance->embed_rssfooter( 'Disabled feature by filter.' ),
);
}
@@ -134,7 +134,7 @@ public function test_embed_rss_footer_with_no_set_option_values() {
$this->assertEquals(
'No options set',
- $this->instance->embed_rssfooter( 'No options set' )
+ $this->instance->embed_rssfooter( 'No options set' ),
);
}
@@ -168,7 +168,7 @@ public function test_embed_rss_footer() {
'%%POSTLINK%%' => 'post_link',
'%%BLOGLINK%%' => 'blog_link',
'%%BLOGDESCLINK%%' => 'blog_description_link',
- ]
+ ],
);
$this->options->expects( 'get' )->with( 'rssbefore', '' )->once()->andReturn( '%%authorlink%%' );
@@ -176,7 +176,7 @@ public function test_embed_rss_footer() {
$this->assertEquals(
'author_linkNo options set',
- $this->instance->embed_rssfooter( 'No options set' )
+ $this->instance->embed_rssfooter( 'No options set' ),
);
}
@@ -192,7 +192,7 @@ public function test_embed_rss_footer_excerpt_is_disabled() {
$this->assertEquals(
'Feature is disabled',
- $this->instance->embed_rssfooter_excerpt( 'Feature is disabled' )
+ $this->instance->embed_rssfooter_excerpt( 'Feature is disabled' ),
);
}
@@ -230,7 +230,7 @@ public function test_embed_rss_footer_excerpt() {
'%%POSTLINK%%' => 'post_link',
'%%BLOGLINK%%' => 'blog_link',
'%%BLOGDESCLINK%%' => 'blog_description_link',
- ]
+ ],
);
$this->options->expects( 'get' )->with( 'rssbefore', '' )->once()->andReturn( '%%authorlink%%' );
@@ -238,7 +238,7 @@ public function test_embed_rss_footer_excerpt() {
$this->assertEquals(
'author_linkNo options set',
- $this->instance->embed_rssfooter_excerpt( 'No options set' )
+ $this->instance->embed_rssfooter_excerpt( 'No options set' ),
);
}
}
diff --git a/tests/Unit/Integrations/Front_End/Redirects_Test.php b/tests/Unit/Integrations/Front_End/Redirects_Test.php
index 779a7ed3515..21481a1e614 100644
--- a/tests/Unit/Integrations/Front_End/Redirects_Test.php
+++ b/tests/Unit/Integrations/Front_End/Redirects_Test.php
@@ -93,7 +93,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Redirects::get_conditionals()
+ Redirects::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Front_End/Robots_Txt_Integration_Test.php b/tests/Unit/Integrations/Front_End/Robots_Txt_Integration_Test.php
index e2bef069556..f1154815d44 100644
--- a/tests/Unit/Integrations/Front_End/Robots_Txt_Integration_Test.php
+++ b/tests/Unit/Integrations/Front_End/Robots_Txt_Integration_Test.php
@@ -76,15 +76,15 @@ public function test_construct() {
$this->assertInstanceOf( Robots_Txt_Integration::class, $this->instance );
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
$this->assertInstanceOf(
Robots_Txt_Helper::class,
- $this->getPropertyValue( $this->instance, 'robots_txt_helper' )
+ $this->getPropertyValue( $this->instance, 'robots_txt_helper' ),
);
$this->assertInstanceOf(
Robots_Txt_Presenter::class,
- $this->getPropertyValue( $this->instance, 'robots_txt_presenter' )
+ $this->getPropertyValue( $this->instance, 'robots_txt_presenter' ),
);
}
@@ -98,7 +98,7 @@ public function test_construct() {
public function test_get_conditionals() {
$this->assertEquals(
[ Robots_Txt_Conditional::class ],
- Robots_Txt_Integration::get_conditionals()
+ Robots_Txt_Integration::get_conditionals(),
);
}
@@ -237,7 +237,7 @@ public function test_multisite_sitemaps( $multisite ) {
[
'allow_enable_xml_sitemap' => true,
'wordpress-seo/wp-seo.php' => true,
- ]
+ ],
);
foreach ( $multisite['sites'] as $blog_id => $site ) {
@@ -362,7 +362,7 @@ public function test_multisite_sitemaps_without_yoast_seo_active() {
Monkey\Functions\when( 'get_network_option' )->justReturn(
[
'allow_enable_xml_sitemap' => true,
- ]
+ ],
);
Monkey\Functions\expect( 'get_sites' )->andReturn( [ 1, 2 ] );
Monkey\Functions\expect( 'get_home_url' )
@@ -541,7 +541,7 @@ public function test_remove_default_robots( $input, $expected ) {
'wpseo_should_add_subdirectory_multisite_xml_sitemaps',
static function () {
return false;
- }
+ },
);
$this->options_helper
diff --git a/tests/Unit/Integrations/Front_End/WP_Robots_Integration_Test.php b/tests/Unit/Integrations/Front_End/WP_Robots_Integration_Test.php
index 66a832f43e8..27e84a1f5c5 100644
--- a/tests/Unit/Integrations/Front_End/WP_Robots_Integration_Test.php
+++ b/tests/Unit/Integrations/Front_End/WP_Robots_Integration_Test.php
@@ -55,7 +55,7 @@ protected function set_up() {
public function test_construct() {
$this->assertInstanceOf(
Meta_Tags_Context_Memoizer::class,
- $this->getPropertyValue( $this->instance, 'context_memoizer' )
+ $this->getPropertyValue( $this->instance, 'context_memoizer' ),
);
}
@@ -85,7 +85,7 @@ public function test_get_conditionals() {
Front_End_Conditional::class,
WP_Robots_Conditional::class,
],
- WP_Robots_Integration::get_conditionals()
+ WP_Robots_Integration::get_conditionals(),
);
}
@@ -117,7 +117,7 @@ public function test_add_robots_string_given() {
'index' => true,
'follow' => true,
],
- $this->instance->add_robots( 'robots_string' )
+ $this->instance->add_robots( 'robots_string' ),
);
}
@@ -153,7 +153,7 @@ public function test_add_robots_overwrite_robots_value_set_to_true() {
[
'index' => true,
'follow' => true,
- ]
+ ],
);
$this->assertEquals(
@@ -162,7 +162,7 @@ public function test_add_robots_overwrite_robots_value_set_to_true() {
'index' => true,
'max-image-preview' => 'large',
],
- $result
+ $result,
);
}
@@ -205,8 +205,8 @@ public function test_add_robots_with_noimageindex() {
[
'index' => true,
'follow' => true,
- ]
- )
+ ],
+ ),
);
}
@@ -248,8 +248,8 @@ public function test_add_robots_with_noindex_set() {
[
'index' => true,
'follow' => true,
- ]
- )
+ ],
+ ),
);
}
@@ -291,8 +291,8 @@ public function test_add_robots_with_index_true_and_noindex_false() {
[
'index' => true,
'noindex' => false,
- ]
- )
+ ],
+ ),
);
}
@@ -336,8 +336,8 @@ public function test_add_robots_with_noimageindex_and_maximagepreview_empty() {
[
'noimageindex' => true,
'max-image-preview' => '',
- ]
- )
+ ],
+ ),
);
}
@@ -385,8 +385,8 @@ public function test_enforce_robots_congruence() {
'archive' => true,
'imageindex' => true,
'snippet' => true,
- ]
- )
+ ],
+ ),
);
}
}
diff --git a/tests/Unit/Integrations/Front_End_Integration_Test.php b/tests/Unit/Integrations/Front_End_Integration_Test.php
index c492da93d07..808558c2abd 100644
--- a/tests/Unit/Integrations/Front_End_Integration_Test.php
+++ b/tests/Unit/Integrations/Front_End_Integration_Test.php
@@ -115,7 +115,7 @@ protected function set_up() {
Mockery::mock( WPSEO_Replace_Vars::class ),
$this->indexable_repository,
$this->permalink_helper,
- ]
+ ],
)->makePartial();
// Set up mocks for classes which which are used in multiple tests.
@@ -136,7 +136,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- Front_End_Integration::get_conditionals()
+ Front_End_Integration::get_conditionals(),
);
}
@@ -270,7 +270,7 @@ public function test_get_presenters_for_singular_page() {
$this->assertEquals(
$expected,
- \array_map( $callback, $this->instance->get_presenters( 'Post_Type' ) )
+ \array_map( $callback, $this->instance->get_presenters( 'Post_Type' ) ),
);
}
@@ -342,7 +342,7 @@ public function test_get_presenters_for_static_home_page() {
$this->assertEquals(
$expected,
- \array_map( $callback, $this->instance->get_presenters( 'Static_Home_Page' ) )
+ \array_map( $callback, $this->instance->get_presenters( 'Static_Home_Page' ) ),
);
}
@@ -390,7 +390,7 @@ public function test_get_presenters_for_error_page() {
'Yoast\WP\SEO\Presenters\Schema_Presenter',
'Yoast\WP\SEO\Presenters\Debug\Marker_Close_Presenter',
],
- $expected
+ $expected,
);
}
@@ -460,7 +460,7 @@ public function test_get_presenters_for_non_singular_page() {
'Yoast\WP\SEO\Presenters\Schema_Presenter',
'Yoast\WP\SEO\Presenters\Debug\Marker_Close_Presenter',
],
- $expected
+ $expected,
);
}
@@ -513,7 +513,7 @@ public function test_get_presenters_for_theme_without_title_tag_and_force_rewrit
'Yoast\WP\SEO\Presenters\Schema_Presenter',
'Yoast\WP\SEO\Presenters\Debug\Marker_Close_Presenter',
],
- $actual
+ $actual,
);
}
@@ -560,7 +560,7 @@ public function test_get_presenters_for_theme_on_rest_request() {
'Yoast\WP\SEO\Presenters\Schema_Presenter',
'Yoast\WP\SEO\Presenters\Debug\Marker_Close_Presenter',
],
- $actual
+ $actual,
);
}
@@ -614,7 +614,7 @@ public function test_get_presenters_for_theme_without_title_tag_and_force_rewrit
'Yoast\WP\SEO\Presenters\Schema_Presenter',
'Yoast\WP\SEO\Presenters\Debug\Marker_Close_Presenter',
],
- $expected
+ $expected,
);
}
@@ -681,7 +681,7 @@ public function test_filter_robots_presenter_and_wp_robots_to_wp_head_filter() {
'Yoast\WP\SEO\Presenters\Title_Presenter',
'Yoast\WP\SEO\Presenters\Meta_Description_Presenter',
],
- $this->instance->filter_robots_presenter( $presenters )
+ $this->instance->filter_robots_presenter( $presenters ),
);
}
@@ -713,7 +713,7 @@ public function test_rest_request_should_output_robots_presenter() {
'Yoast\WP\SEO\Presenters\Meta_Description_Presenter',
'Yoast\WP\SEO\Presenters\Robots_Presenter',
],
- $this->instance->filter_robots_presenter( $presenters )
+ $this->instance->filter_robots_presenter( $presenters ),
);
}
diff --git a/tests/Unit/Integrations/Settings_Integration_Test.php b/tests/Unit/Integrations/Settings_Integration_Test.php
index 59b7e01e83f..ca1907f425d 100644
--- a/tests/Unit/Integrations/Settings_Integration_Test.php
+++ b/tests/Unit/Integrations/Settings_Integration_Test.php
@@ -149,7 +149,7 @@ public function set_up() {
$manual_post_collection,
$file_runner,
$this->route_helper,
- $this->schema_configuration
+ $this->schema_configuration,
);
$this->instance_double = new Settings_Integration_Double(
@@ -170,7 +170,7 @@ public function set_up() {
$manual_post_collection,
$file_runner,
$this->route_helper,
- $this->schema_configuration
+ $this->schema_configuration,
);
}
@@ -186,7 +186,7 @@ public function test_get_conditionals() {
[
Settings_Conditional::class,
],
- Settings_Integration::get_conditionals()
+ Settings_Integration::get_conditionals(),
);
}
@@ -224,77 +224,77 @@ public function test_construct() {
$this->assertInstanceOf(
WPSEO_Admin_Asset_Manager::class,
$this->getPropertyValue( $this->instance, 'asset_manager' ),
- 'asset_manager is set.'
+ 'asset_manager is set.',
);
$this->assertInstanceOf(
WPSEO_Replace_Vars::class,
$this->getPropertyValue( $this->instance, 'replace_vars' ),
- 'replace_vars is set.'
+ 'replace_vars is set.',
);
$this->assertInstanceOf(
Schema_Types::class,
$this->getPropertyValue( $this->instance, 'schema_types' ),
- 'schema_types is set.'
+ 'schema_types is set.',
);
$this->assertInstanceOf(
Current_Page_Helper::class,
$this->getPropertyValue( $this->instance, 'current_page_helper' ),
- 'current_page_helper is set.'
+ 'current_page_helper is set.',
);
$this->assertInstanceOf(
Post_Type_Helper::class,
$this->getPropertyValue( $this->instance, 'post_type_helper' ),
- 'post_type_helper is set.'
+ 'post_type_helper is set.',
);
$this->assertInstanceOf(
Language_Helper::class,
$this->getPropertyValue( $this->instance, 'language_helper' ),
- 'language_helper is set.'
+ 'language_helper is set.',
);
$this->assertInstanceOf(
Taxonomy_Helper::class,
$this->getPropertyValue( $this->instance, 'taxonomy_helper' ),
- 'taxonomy_helper is set.'
+ 'taxonomy_helper is set.',
);
$this->assertInstanceOf(
Product_Helper::class,
$this->getPropertyValue( $this->instance, 'product_helper' ),
- 'product_helper is set.'
+ 'product_helper is set.',
);
$this->assertInstanceOf(
Woocommerce_Helper::class,
$this->getPropertyValue( $this->instance, 'woocommerce_helper' ),
- 'woocommerce_helper is set.'
+ 'woocommerce_helper is set.',
);
$this->assertInstanceOf(
Article_Helper::class,
$this->getPropertyValue( $this->instance, 'article_helper' ),
- 'article_helper is set.'
+ 'article_helper is set.',
);
$this->assertInstanceOf(
User_Helper::class,
$this->getPropertyValue( $this->instance, 'user_helper' ),
- 'user_helper is set.'
+ 'user_helper is set.',
);
$this->assertInstanceOf(
Options_Helper::class,
$this->getPropertyValue( $this->instance, 'options' ),
- 'Options helper is set.'
+ 'Options helper is set.',
);
$this->assertInstanceOf(
Content_Type_Visibility_Dismiss_Notifications::class,
$this->getPropertyValue( $this->instance, 'content_type_visibility' ),
- 'Content type visibility notifications is set.'
+ 'Content type visibility notifications is set.',
);
$this->assertInstanceOf(
Route_Helper::class,
$this->getPropertyValue( $this->instance, 'route_helper' ),
- 'Route_Helper is set.'
+ 'Route_Helper is set.',
);
$this->assertInstanceOf(
Schema_Configuration::class,
$this->getPropertyValue( $this->instance, 'schema_configuration' ),
- 'Schema_Configuration is set.'
+ 'Schema_Configuration is set.',
);
}
@@ -570,7 +570,7 @@ public function test_get_defaults_from_local_seo( $should_local_get_options, $mu
'location_email' => 'example@location.con',
'location_vat_id' => '123456',
'location_tax_id' => '654321',
- ]
+ ],
);
Monkey\Functions\expect( 'wpseo_has_primary_location' )
@@ -611,7 +611,7 @@ public function test_get_defaults_from_local_seo_when_there_is_primary_location(
'location_email' => 'example@location.con',
'location_vat_id' => '123456',
'location_tax_id' => '654321',
- ]
+ ],
);
Monkey\Functions\expect( 'wpseo_has_primary_location' )
@@ -681,7 +681,7 @@ public function test_get_defaults_from_local_seo_with_shared_business_info_and_p
'location_email' => 'example@location.con',
'location_vat_id' => '123456',
'location_tax_id' => '654321',
- ]
+ ],
);
Monkey\Functions\expect( 'wpseo_has_primary_location' )
diff --git a/tests/Unit/Integrations/Support_Integration_Test.php b/tests/Unit/Integrations/Support_Integration_Test.php
index 05e65248c69..cb0ac672200 100644
--- a/tests/Unit/Integrations/Support_Integration_Test.php
+++ b/tests/Unit/Integrations/Support_Integration_Test.php
@@ -131,8 +131,8 @@ public function test_construct() {
$this->product_helper,
$this->shortlink_helper,
$this->woocommerce_conditional,
- $this->addon_manager
- )
+ $this->addon_manager,
+ ),
);
}
@@ -149,7 +149,7 @@ public function test_get_conditionals() {
Admin_Conditional::class,
User_Can_Manage_Wpseo_Options_Conditional::class,
],
- Support_Integration::get_conditionals()
+ Support_Integration::get_conditionals(),
);
}
@@ -218,7 +218,7 @@ public function test_add_page() {
[ 'page1', '', 'Page 1', 'manage_options', 'page1', [ $this, 'display_page' ] ],
[ 'page2', '', 'Page 2', 'manage_options', 'page2', [ $this, 'display_page' ] ],
[ 'page3', '', 'Page 3', 'manage_options', 'page3', [ $this, 'display_page' ] ],
- ]
+ ],
);
// Assert that the new page was added at index 3.
diff --git a/tests/Unit/Integrations/Third_Party/AMP_Test.php b/tests/Unit/Integrations/Third_Party/AMP_Test.php
index d3aacbd6110..3681b174690 100644
--- a/tests/Unit/Integrations/Third_Party/AMP_Test.php
+++ b/tests/Unit/Integrations/Third_Party/AMP_Test.php
@@ -54,7 +54,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- AMP::get_conditionals()
+ AMP::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/BbPress_Test.php b/tests/Unit/Integrations/Third_Party/BbPress_Test.php
index 81b38255a8f..d6c4b6d4855 100644
--- a/tests/Unit/Integrations/Third_Party/BbPress_Test.php
+++ b/tests/Unit/Integrations/Third_Party/BbPress_Test.php
@@ -54,7 +54,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class ],
- BbPress::get_conditionals()
+ BbPress::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/Exclude_Elementor_Post_Types_Test.php b/tests/Unit/Integrations/Third_Party/Exclude_Elementor_Post_Types_Test.php
index 594e81afe7b..585f93f600e 100644
--- a/tests/Unit/Integrations/Third_Party/Exclude_Elementor_Post_Types_Test.php
+++ b/tests/Unit/Integrations/Third_Party/Exclude_Elementor_Post_Types_Test.php
@@ -45,7 +45,7 @@ public function set_up() {
public function test_get_conditionals() {
self::assertEquals(
[ Elementor_Activated_Conditional::class ],
- Exclude_Elementor_Post_Types::get_conditionals()
+ Exclude_Elementor_Post_Types::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/Exclude_WooCommerce_Post_Types_Test.php b/tests/Unit/Integrations/Third_Party/Exclude_WooCommerce_Post_Types_Test.php
index baf8430bd60..0526fb73f7d 100644
--- a/tests/Unit/Integrations/Third_Party/Exclude_WooCommerce_Post_Types_Test.php
+++ b/tests/Unit/Integrations/Third_Party/Exclude_WooCommerce_Post_Types_Test.php
@@ -45,7 +45,7 @@ public function set_up() {
public function test_get_conditionals() {
self::assertEquals(
[ WooCommerce_Conditional::class ],
- Exclude_WooCommerce_Post_Types::get_conditionals()
+ Exclude_WooCommerce_Post_Types::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/Jetpack_Test.php b/tests/Unit/Integrations/Third_Party/Jetpack_Test.php
index 77b98e6b570..e1ad22a1350 100644
--- a/tests/Unit/Integrations/Third_Party/Jetpack_Test.php
+++ b/tests/Unit/Integrations/Third_Party/Jetpack_Test.php
@@ -45,7 +45,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Front_End_Conditional::class, Jetpack_Conditional::class, Open_Graph_Conditional::class ],
- Jetpack::get_conditionals()
+ Jetpack::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/WPML_Test.php b/tests/Unit/Integrations/Third_Party/WPML_Test.php
index 97d8e4b3ff7..760a7715064 100644
--- a/tests/Unit/Integrations/Third_Party/WPML_Test.php
+++ b/tests/Unit/Integrations/Third_Party/WPML_Test.php
@@ -44,7 +44,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ WPML_Conditional::class ],
- WPML::get_conditionals()
+ WPML::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/WPML_WPSEO_Notification_Test.php b/tests/Unit/Integrations/Third_Party/WPML_WPSEO_Notification_Test.php
index b80aea3c10f..db9e4762baf 100644
--- a/tests/Unit/Integrations/Third_Party/WPML_WPSEO_Notification_Test.php
+++ b/tests/Unit/Integrations/Third_Party/WPML_WPSEO_Notification_Test.php
@@ -60,7 +60,7 @@ public function set_up() {
$this->instance = new WPML_WPSEO_Notification(
$this->short_link_helper,
$this->notification_center,
- $this->wpml_wpseo_conditional
+ $this->wpml_wpseo_conditional,
);
}
@@ -74,15 +74,15 @@ public function set_up() {
public function test_constructor() {
self::assertInstanceOf(
Yoast_Notification_Center::class,
- $this->getPropertyValue( $this->instance, 'notification_center' )
+ $this->getPropertyValue( $this->instance, 'notification_center' ),
);
self::assertInstanceOf(
WPML_WPSEO_Conditional::class,
- $this->getPropertyValue( $this->instance, 'wpml_wpseo_conditional' )
+ $this->getPropertyValue( $this->instance, 'wpml_wpseo_conditional' ),
);
self::assertInstanceOf(
Short_Link_Helper::class,
- $this->getPropertyValue( $this->instance, 'short_link_helper' )
+ $this->getPropertyValue( $this->instance, 'short_link_helper' ),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/Web_Stories_Post_Edit_Test.php b/tests/Unit/Integrations/Third_Party/Web_Stories_Post_Edit_Test.php
index 2ad0d61aa94..54d90674845 100644
--- a/tests/Unit/Integrations/Third_Party/Web_Stories_Post_Edit_Test.php
+++ b/tests/Unit/Integrations/Third_Party/Web_Stories_Post_Edit_Test.php
@@ -46,7 +46,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Web_Stories_Conditional::class, Post_Conditional::class ],
- Web_Stories_Post_Edit::get_conditionals()
+ Web_Stories_Post_Edit::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/Web_Stories_Test.php b/tests/Unit/Integrations/Third_Party/Web_Stories_Test.php
index bc222c9b13f..ddfb6c7d765 100644
--- a/tests/Unit/Integrations/Third_Party/Web_Stories_Test.php
+++ b/tests/Unit/Integrations/Third_Party/Web_Stories_Test.php
@@ -62,7 +62,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Web_Stories_Conditional::class ],
- Web_Stories::get_conditionals()
+ Web_Stories::get_conditionals(),
);
}
@@ -76,7 +76,7 @@ public function test_get_conditionals() {
public function test_constructor() {
$this->assertInstanceOf(
Front_End_Integration::class,
- $this->getPropertyValue( $this->instance, 'front_end' )
+ $this->getPropertyValue( $this->instance, 'front_end' ),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/Wincher_Publish_Test.php b/tests/Unit/Integrations/Third_Party/Wincher_Publish_Test.php
index e1c92a6a1c1..d358d8e0778 100644
--- a/tests/Unit/Integrations/Third_Party/Wincher_Publish_Test.php
+++ b/tests/Unit/Integrations/Third_Party/Wincher_Publish_Test.php
@@ -81,7 +81,7 @@ protected function set_up() {
$this->options_helper,
$this->keyphrases_action,
$this->account_action,
- ]
+ ],
)
->shouldAllowMockingProtectedMethods()
->makePartial();
@@ -102,7 +102,7 @@ public function test_get_conditionals() {
Wincher_Automatically_Track_Conditional::class,
Wincher_Token_Conditional::class,
],
- Wincher_Publish::get_conditionals()
+ Wincher_Publish::get_conditionals(),
);
}
@@ -118,27 +118,27 @@ public function test_constructor() {
$this->wincher_enabled,
$this->options_helper,
$this->keyphrases_action,
- $this->account_action
+ $this->account_action,
);
$this->assertInstanceOf(
Wincher_Enabled_Conditional::class,
- $this->getPropertyValue( $instance, 'wincher_enabled' )
+ $this->getPropertyValue( $instance, 'wincher_enabled' ),
);
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $instance, 'options_helper' )
+ $this->getPropertyValue( $instance, 'options_helper' ),
);
$this->assertInstanceOf(
Wincher_Keyphrases_Action::class,
- $this->getPropertyValue( $instance, 'keyphrases_action' )
+ $this->getPropertyValue( $instance, 'keyphrases_action' ),
);
$this->assertInstanceOf(
Wincher_Account_Action::class,
- $this->getPropertyValue( $instance, 'account_action' )
+ $this->getPropertyValue( $instance, 'account_action' ),
);
}
@@ -174,7 +174,7 @@ public function test_track_request() {
'yoast seo',
'blog seo',
'wincher',
- ]
+ ],
);
$this->account_action
@@ -186,7 +186,7 @@ public function test_track_request() {
'limit' => 100,
'usage' => 10,
'status' => 200,
- ]
+ ],
);
$this->keyphrases_action->expects( 'track_keyphrases' )->once();
diff --git a/tests/Unit/Integrations/Third_Party/WooCommerce_Permalinks_Test.php b/tests/Unit/Integrations/Third_Party/WooCommerce_Permalinks_Test.php
index b57b13e7187..02f2b43734b 100644
--- a/tests/Unit/Integrations/Third_Party/WooCommerce_Permalinks_Test.php
+++ b/tests/Unit/Integrations/Third_Party/WooCommerce_Permalinks_Test.php
@@ -57,7 +57,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ WooCommerce_Conditional::class, Migrations_Conditional::class ],
- Woocommerce_Permalinks::get_conditionals()
+ Woocommerce_Permalinks::get_conditionals(),
);
}
@@ -71,7 +71,7 @@ public function test_get_conditionals() {
public function test_constructor() {
$this->assertInstanceOf(
Indexable_Helper::class,
- $this->getPropertyValue( $this->instance, 'indexable_helper' )
+ $this->getPropertyValue( $this->instance, 'indexable_helper' ),
);
}
@@ -107,8 +107,8 @@ public function test_filter_product_from_post_types() {
'post' => 'post',
'page' => 'page',
'product' => 'product',
- ]
- )
+ ],
+ ),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/WooCommerce_Post_Edit_Test.php b/tests/Unit/Integrations/Third_Party/WooCommerce_Post_Edit_Test.php
index 97045487d84..6cb366949a3 100644
--- a/tests/Unit/Integrations/Third_Party/WooCommerce_Post_Edit_Test.php
+++ b/tests/Unit/Integrations/Third_Party/WooCommerce_Post_Edit_Test.php
@@ -46,7 +46,7 @@ protected function set_up() {
public function test_conditionals() {
$this->assertEquals(
[ WooCommerce_Conditional::class, Post_Conditional::class ],
- WooCommerce_Post_Edit::get_conditionals()
+ WooCommerce_Post_Edit::get_conditionals(),
);
}
@@ -66,8 +66,8 @@ public function test_register_hooks() {
[
$this->instance,
'remove_meta_description_date',
- ]
- )
+ ],
+ ),
);
}
diff --git a/tests/Unit/Integrations/Third_Party/WooCommerce_Test.php b/tests/Unit/Integrations/Third_Party/WooCommerce_Test.php
index 83fe51b6994..d04cdfcf13d 100644
--- a/tests/Unit/Integrations/Third_Party/WooCommerce_Test.php
+++ b/tests/Unit/Integrations/Third_Party/WooCommerce_Test.php
@@ -113,7 +113,7 @@ protected function set_up() {
$this->context_memoizer,
$this->repository,
$this->pagination_helper,
- $this->woocommerce_helper
+ $this->woocommerce_helper,
);
$presentation = new Indexable_Presentation();
@@ -131,7 +131,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ WooCommerce_Conditional::class, Front_End_Conditional::class ],
- WooCommerce::get_conditionals()
+ WooCommerce::get_conditionals(),
);
}
@@ -149,16 +149,16 @@ public function test_constructor() {
$this->context_memoizer,
$this->repository,
$this->pagination_helper,
- $this->woocommerce_helper
+ $this->woocommerce_helper,
);
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $instance, 'options' )
+ $this->getPropertyValue( $instance, 'options' ),
);
$this->assertInstanceOf(
WPSEO_Replace_Vars::class,
- $this->getPropertyValue( $instance, 'replace_vars' )
+ $this->getPropertyValue( $instance, 'replace_vars' ),
);
}
@@ -321,7 +321,7 @@ public function test_title( $expected, $model_value, $template_value, $is_shop_p
$this->assertEquals(
$expected,
- $this->instance->title( 'This is a value', $this->presentation )
+ $this->instance->title( 'This is a value', $this->presentation ),
);
}
@@ -366,7 +366,7 @@ public function test_description( $expected, $model_value, $template_value, $is_
$this->assertEquals(
$expected,
- $this->instance->description( 'This is a value', $this->presentation )
+ $this->instance->description( 'This is a value', $this->presentation ),
);
}
@@ -461,7 +461,7 @@ public function test_title_by_using_the_product_archive_template() {
$this->assertEquals(
'This is a template value',
- $this->instance->title( 'This is a value', $this->presentation )
+ $this->instance->title( 'This is a value', $this->presentation ),
);
}
@@ -498,7 +498,7 @@ public function test_description_by_using_the_product_archive_template() {
$this->assertEquals(
'This is a template value',
- $this->instance->description( 'This is a value', $this->presentation )
+ $this->instance->description( 'This is a value', $this->presentation ),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Addon_Update_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Addon_Update_Watcher_Test.php
index c1477324815..6306ff6f94b 100644
--- a/tests/Unit/Integrations/Watchers/Addon_Update_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Addon_Update_Watcher_Test.php
@@ -173,7 +173,7 @@ public function test_enable_auto_updates_for_add_ons_on_free_auto_update_enabled
$this->instance->toggle_auto_updates_for_add_ons(
'auto_update_plugins',
$new,
- $old
+ $old,
);
}
@@ -221,7 +221,7 @@ public function test_disable_auto_updates_for_add_ons_on_free_auto_update_disabl
$this->instance->toggle_auto_updates_for_add_ons(
'auto_update_plugins',
$new,
- $old
+ $old,
);
}
@@ -265,7 +265,7 @@ public function test_do_nothing_for_add_ons_when_nothing_happens_to_free_auto_up
$this->instance->toggle_auto_updates_for_add_ons(
'auto_update_plugins',
$new,
- $old
+ $old,
);
}
@@ -285,7 +285,7 @@ public function test_html_not_replaced_when_html_not_string() {
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- 'other-plugin/plugin-file.php'
+ 'other-plugin/plugin-file.php',
);
self::assertEquals( $old_html, $new_html );
@@ -308,7 +308,7 @@ public function test_html_not_replaced_when_auto_updated_plugins_does_not_exist(
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- 'wordpress-seo-premium/wp-seo-premium.php'
+ 'wordpress-seo-premium/wp-seo-premium.php',
);
self::assertEquals( 'Auto-updates are disabled based on this setting for Yoast SEO.', $new_html );
@@ -331,7 +331,7 @@ public function test_html_not_replaced_when_auto_updated_plugins_not_an_array()
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- 'wordpress-seo-premium/wp-seo-premium.php'
+ 'wordpress-seo-premium/wp-seo-premium.php',
);
self::assertEquals( 'Auto-updates are disabled based on this setting for Yoast SEO.', $new_html );
@@ -355,7 +355,7 @@ public function test_do_not_replace_auto_update_toggles_from_other_plugins() {
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- 'other-plugin/plugin-file.php'
+ 'other-plugin/plugin-file.php',
);
self::assertEquals( $old_html, $new_html );
@@ -383,7 +383,7 @@ public function test_replace_auto_update_toggles_from_addons_with_enabled_text(
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- $plugin
+ $plugin,
);
self::assertEquals( 'Auto-updates are enabled based on this setting for Yoast SEO.', $new_html );
@@ -412,7 +412,7 @@ public function test_replace_auto_update_toggles_from_addons_with_disabled_text(
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- $plugin
+ $plugin,
);
self::assertEquals( 'Auto-updates are disabled based on this setting for Yoast SEO.', $new_html );
@@ -441,7 +441,7 @@ public function test_replace_auto_update_toggles_from_addons_when_enabled_plugin
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- $plugin
+ $plugin,
);
self::assertEquals( 'Auto-updates are disabled based on this setting for Yoast SEO.', $new_html );
@@ -470,7 +470,7 @@ public function test_replace_auto_update_toggles_from_addons_when_enabled_plugin
$new_html = $this->instance->replace_auto_update_toggles_of_addons(
$old_html,
- $plugin
+ $plugin,
);
self::assertEquals( 'Auto-updates are disabled based on this setting for Yoast SEO.', $new_html );
diff --git a/tests/Unit/Integrations/Watchers/Auto_Update_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Auto_Update_Watcher_Test.php
index 08807215f49..fe858495a2f 100644
--- a/tests/Unit/Integrations/Watchers/Auto_Update_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Auto_Update_Watcher_Test.php
@@ -43,7 +43,7 @@ public function set_up() {
$this->notification_center = Mockery::mock( Yoast_Notification_Center::class );
$this->instance = new Auto_Update_Watcher(
- $this->notification_center
+ $this->notification_center,
);
}
@@ -57,7 +57,7 @@ public function set_up() {
public function test_constructor() {
self::assertInstanceOf(
Yoast_Notification_Center::class,
- self::getPropertyValue( $this->instance, 'notification_center' )
+ self::getPropertyValue( $this->instance, 'notification_center' ),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Ancestor_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Ancestor_Watcher_Test.php
index 30065b03a78..fe033cb19ac 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Ancestor_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Ancestor_Watcher_Test.php
@@ -96,7 +96,7 @@ protected function set_up() {
$this->indexable_hierarchy_repository,
$this->indexable_helper,
$this->permalink_helper,
- $this->post_type_helper
+ $this->post_type_helper,
);
}
@@ -145,15 +145,15 @@ public function test_reset_children_for_non_changed_permalink() {
public function test_construct() {
$this->assertInstanceOf(
Indexable_Repository::class,
- $this->getPropertyValue( $this->instance, 'indexable_repository' )
+ $this->getPropertyValue( $this->instance, 'indexable_repository' ),
);
$this->assertInstanceOf(
Indexable_Hierarchy_Builder::class,
- $this->getPropertyValue( $this->instance, 'indexable_hierarchy_builder' )
+ $this->getPropertyValue( $this->instance, 'indexable_hierarchy_builder' ),
);
$this->assertInstanceOf(
Permalink_Helper::class,
- $this->getPropertyValue( $this->instance, 'permalink_helper' )
+ $this->getPropertyValue( $this->instance, 'permalink_helper' ),
);
}
@@ -167,7 +167,7 @@ public function test_construct() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Ancestor_Watcher::get_conditionals()
+ Indexable_Ancestor_Watcher::get_conditionals(),
);
}
@@ -355,9 +355,9 @@ static function ( $haystack, $prop ) {
static function ( $e ) use ( $prop ) {
return $e->{$prop};
},
- $haystack
+ $haystack,
);
- }
+ },
);
$this->set_expectations_for_get_object_ids_for_term( $term_id, $indexable_1->object_id, $indexable_2->object_id );
@@ -375,7 +375,7 @@ static function ( $e ) use ( $prop ) {
2 => 21,
],
'post',
- false
+ false,
)
->andReturn( [ $indexable_term_1, $indexable_term_2 ] );
@@ -390,7 +390,7 @@ static function ( $e ) use ( $prop ) {
[
0 => 566,
2 => 569,
- ]
+ ],
)
->andReturn( [ $additional_indexable_2 ] );
@@ -418,7 +418,7 @@ private function set_expectations_for_get_object_ids_for_term( ...$object_ids )
FROM %i
WHERE term_id IN( ' . \implode( ', ', \array_fill( 0, ( \count( $object_ids ) ), '%s' ) ) . ' )',
$wpdb->term_taxonomy,
- ...$object_ids
+ ...$object_ids,
);
$wpdb->expects( 'get_col' )
@@ -432,7 +432,7 @@ private function set_expectations_for_get_object_ids_for_term( ...$object_ids )
$wpdb->term_relationships,
321,
322,
- 323
+ 323,
);
$wpdb->expects( 'get_col' )
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Attachment_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Attachment_Watcher_Test.php
index dfd2f04125f..6c535fa1cd4 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Attachment_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Attachment_Watcher_Test.php
@@ -78,7 +78,7 @@ protected function set_up() {
$this->indexing_helper,
$this->attachment_cleanup,
$this->notification_center,
- $this->indexable_helper
+ $this->indexable_helper,
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Author_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Author_Watcher_Test.php
index a831707de35..97d3b35dede 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Author_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Author_Watcher_Test.php
@@ -67,7 +67,7 @@ protected function set_up() {
$this->instance = new Indexable_Author_Watcher(
$this->repository,
$this->indexable_helper,
- $this->builder
+ $this->builder,
);
}
@@ -81,7 +81,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Author_Watcher::get_conditionals()
+ Indexable_Author_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Category_Permalink_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Category_Permalink_Watcher_Test.php
index 5332f00d481..a5faf118c72 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Category_Permalink_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Category_Permalink_Watcher_Test.php
@@ -71,7 +71,7 @@ protected function set_up() {
[
'wp_next_scheduled' => false,
'wp_schedule_event' => false,
- ]
+ ],
);
$this->options = Mockery::mock( Options_Helper::class );
@@ -83,7 +83,7 @@ protected function set_up() {
$this->post_type,
$this->options,
$this->indexable_helper,
- $this->taxonomy_helper
+ $this->taxonomy_helper,
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Date_Archive_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Date_Archive_Watcher_Test.php
index 2aad3381ebe..3b6bceefe9c 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Date_Archive_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Date_Archive_Watcher_Test.php
@@ -66,7 +66,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Date_Archive_Watcher::get_conditionals()
+ Indexable_Date_Archive_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_HomeUrl_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_HomeUrl_Watcher_Test.php
index 5e958e0a467..4e256ce770b 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_HomeUrl_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_HomeUrl_Watcher_Test.php
@@ -63,7 +63,7 @@ protected function set_up() {
[
'wp_next_scheduled' => false,
'wp_schedule_event' => false,
- ]
+ ],
);
$this->post_type = Mockery::mock( Post_Type_Helper::class );
@@ -84,7 +84,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_HomeUrl_Watcher::get_conditionals()
+ Indexable_HomeUrl_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Home_Page_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Home_Page_Watcher_Test.php
index 5daeae0d21c..00e2054f5e5 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Home_Page_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Home_Page_Watcher_Test.php
@@ -66,7 +66,7 @@ protected function set_up() {
$this->instance = new Indexable_Home_Page_Watcher(
$this->repository,
$this->indexable_helper,
- $this->builder
+ $this->builder,
);
}
@@ -80,7 +80,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Home_Page_Watcher::get_conditionals()
+ Indexable_Home_Page_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Permalink_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Permalink_Watcher_Test.php
index 364532e51f7..e0f701b65d9 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Permalink_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Permalink_Watcher_Test.php
@@ -71,7 +71,7 @@ protected function set_up() {
[
'wp_next_scheduled' => false,
'wp_schedule_event' => false,
- ]
+ ],
);
$this->post_type = Mockery::mock( Post_Type_Helper::class );
@@ -93,7 +93,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Permalink_Watcher::get_conditionals()
+ Indexable_Permalink_Watcher::get_conditionals(),
);
}
@@ -450,7 +450,7 @@ public function test_should_reset_altered_custom_taxonomies() {
[
'book-category' => 'book-category',
'book-genre' => 'book-genre',
- ]
+ ],
);
$this->options
@@ -461,7 +461,7 @@ public function test_should_reset_altered_custom_taxonomies() {
[
'book-category' => 'yoast-book-category',
'book-genre' => 'yoast-test-book-genre',
- ]
+ ],
);
$this->taxonomy_helper
@@ -480,7 +480,7 @@ public function test_should_reset_altered_custom_taxonomies() {
[
'book-category' => 'yoast-test-book-category',
'book-genre' => 'yoast-test-book-genre',
- ]
+ ],
);
$this->instance->reset_altered_custom_taxonomies();
@@ -501,7 +501,7 @@ public function test_shouldnt_reset_altered_custom_taxonomies() {
[
'book-category' => 'book-category',
'book-genre' => 'book-genre',
- ]
+ ],
);
$this->options
@@ -512,7 +512,7 @@ public function test_shouldnt_reset_altered_custom_taxonomies() {
[
'book-category' => 'yoast-test-book-category',
'book-genre' => 'yoast-test-book-genre',
- ]
+ ],
);
$this->taxonomy_helper
@@ -531,7 +531,7 @@ public function test_shouldnt_reset_altered_custom_taxonomies() {
[
'book-category' => 'yoast-test-book-category',
'book-genre' => 'yoast-test-book-genre',
- ]
+ ],
);
$this->instance->reset_altered_custom_taxonomies();
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Post_Meta_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Post_Meta_Watcher_Test.php
index e827878bc01..e1a5ffc002c 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Post_Meta_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Post_Meta_Watcher_Test.php
@@ -55,7 +55,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Post_Watcher::get_conditionals()
+ Indexable_Post_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Archive_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Archive_Watcher_Test.php
index b1a65c97312..ecd7b20b82c 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Archive_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Archive_Watcher_Test.php
@@ -68,7 +68,7 @@ protected function set_up() {
$this->instance = new Indexable_Post_Type_Archive_Watcher(
$this->repository,
$this->indexable_helper,
- $this->builder
+ $this->builder,
);
}
@@ -82,7 +82,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Post_Type_Archive_Watcher::get_conditionals()
+ Indexable_Post_Type_Archive_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Change_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Change_Watcher_Test.php
index 711f0ac39fb..bba9626ba39 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Change_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Post_Type_Change_Watcher_Test.php
@@ -93,7 +93,7 @@ protected function set_up() {
$this->indexing_helper,
$this->post_type_helper,
$this->notification_center,
- $this->indexable_helper
+ $this->indexable_helper,
);
}
@@ -111,7 +111,7 @@ public function test_get_conditionals() {
Admin_Conditional::class,
Migrations_Conditional::class,
],
- Indexable_Post_Type_Change_Watcher::get_conditionals()
+ Indexable_Post_Type_Change_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Post_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Post_Watcher_Test.php
index fd0f8942b5d..e1715455a7d 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Post_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Post_Watcher_Test.php
@@ -122,7 +122,7 @@ protected function set_up() {
$this->indexable_helper,
$this->post,
$this->logger,
- ]
+ ],
)
->makePartial()
->shouldAllowMockingProtectedMethods();
@@ -138,7 +138,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Post_Watcher::get_conditionals()
+ Indexable_Post_Watcher::get_conditionals(),
);
}
@@ -627,7 +627,7 @@ public function test_get_related_indexables() {
[
'taxonomy',
'another-taxonomy',
- ]
+ ],
);
Monkey\Functions\expect( 'is_taxonomy_viewable' )
@@ -651,7 +651,7 @@ public function test_get_related_indexables() {
(object) [
'term_id' => 1414,
],
- ]
+ ],
);
Monkey\Functions\expect( 'get_the_terms' )
@@ -670,7 +670,7 @@ public function test_get_related_indexables() {
'term_id' => 1414,
],
],
- 'term_id'
+ 'term_id',
)
->andReturn( [ 1337, 1414 ] );
@@ -702,7 +702,7 @@ public function test_get_related_indexables() {
$this->assertEquals(
[ $indexable, $indexable, $indexable, $indexable ],
- $this->instance->get_related_indexables( $post )
+ $this->instance->get_related_indexables( $post ),
);
}
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Static_Home_Page_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Static_Home_Page_Watcher_Test.php
index 7d546cbe578..dc26b5b3a18 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Static_Home_Page_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Static_Home_Page_Watcher_Test.php
@@ -57,7 +57,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Admin_Conditional::class ],
- Indexable_Static_Home_Page_Watcher::get_conditionals()
+ Indexable_Static_Home_Page_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_System_Page_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_System_Page_Watcher_Test.php
index 056bb4a4d31..d2be5b8df4d 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_System_Page_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_System_Page_Watcher_Test.php
@@ -66,7 +66,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_System_Page_Watcher::get_conditionals()
+ Indexable_System_Page_Watcher::get_conditionals(),
);
}
@@ -131,7 +131,7 @@ public function test_update_wpseo_titles_value_without_change() {
'other_key' => 'baz',
'title-search-wpseo' => 'baz',
'title-404-wpseo' => 'baz',
- ]
+ ],
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Taxonomy_Change_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Taxonomy_Change_Watcher_Test.php
index eaae46db50f..7b2b89d0acd 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Taxonomy_Change_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Taxonomy_Change_Watcher_Test.php
@@ -93,7 +93,7 @@ protected function set_up() {
$this->options,
$this->taxonomy_helper,
$this->notification_center,
- $this->indexable_helper
+ $this->indexable_helper,
);
}
@@ -111,7 +111,7 @@ public function test_get_conditionals() {
Admin_Conditional::class,
Migrations_Conditional::class,
],
- Indexable_Taxonomy_Change_Watcher::get_conditionals()
+ Indexable_Taxonomy_Change_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Indexable_Term_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Indexable_Term_Watcher_Test.php
index c770d601568..93c098f1300 100644
--- a/tests/Unit/Integrations/Watchers/Indexable_Term_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Indexable_Term_Watcher_Test.php
@@ -87,7 +87,7 @@ protected function set_up() {
$this->builder,
$this->link_builder,
$this->indexable_helper,
- $this->site
+ $this->site,
);
}
@@ -101,7 +101,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Indexable_Term_Watcher::get_conditionals()
+ Indexable_Term_Watcher::get_conditionals(),
);
}
@@ -212,7 +212,7 @@ public function test_build_indexable() {
->expects( 'build' )
->with(
$indexable,
- 'This is a term description, with a link.'
+ 'This is a term description, with a link.',
);
$this->indexable_helper
@@ -377,7 +377,7 @@ public function test_build_does_not_exist() {
->expects( 'build' )
->with(
$indexable,
- 'This is a term description, with a link.'
+ 'This is a term description, with a link.',
);
$this->indexable_helper
diff --git a/tests/Unit/Integrations/Watchers/Option_Titles_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Option_Titles_Watcher_Test.php
index fa6c7cebb83..3fb913aaac1 100644
--- a/tests/Unit/Integrations/Watchers/Option_Titles_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Option_Titles_Watcher_Test.php
@@ -48,7 +48,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Option_Titles_Watcher::get_conditionals()
+ Option_Titles_Watcher::get_conditionals(),
);
}
@@ -157,7 +157,7 @@ public function test_check_option_with_ancestors_being_removed() {
)",
'wp_yoast_indexable_hierarchy',
'wp_yoast_indexable',
- 'post'
+ 'post',
)
->andReturn(
"
@@ -167,7 +167,7 @@ public function test_check_option_with_ancestors_being_removed() {
FROM `wp_yoast_indexable`
WHERE object_type = 'post'
AND object_sub_type IN( post )
- )"
+ )",
);
$wpdb
@@ -181,7 +181,7 @@ public function test_check_option_with_ancestors_being_removed() {
FROM `wp_yoast_indexable`
WHERE object_type = 'post'
AND object_sub_type IN( post )
- )"
+ )",
)
->andReturn( 2 );
@@ -199,8 +199,8 @@ public function test_check_option_with_ancestors_being_removed() {
],
[
'post_types-post-maintax' => 1,
- ]
- )
+ ],
+ ),
);
}
@@ -232,7 +232,7 @@ public function test_check_option_with_ancestors_not_being_removed() {
)",
'wp_yoast_indexable_hierarchy',
'wp_yoast_indexable',
- 'post'
+ 'post',
)
->andReturn( 'the query' );
@@ -256,8 +256,8 @@ public function test_check_option_with_ancestors_not_being_removed() {
],
[
'post_types-post-maintax' => 1,
- ]
- )
+ ],
+ ),
);
}
}
diff --git a/tests/Unit/Integrations/Watchers/Primary_Category_Quick_Edit_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Primary_Category_Quick_Edit_Watcher_Test.php
index c43911cfcaa..d29a2c391e9 100644
--- a/tests/Unit/Integrations/Watchers/Primary_Category_Quick_Edit_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Primary_Category_Quick_Edit_Watcher_Test.php
@@ -90,7 +90,7 @@ public function set_up() {
$this->primary_term_repository,
$this->post_type_helper,
$this->indexable_repository,
- $this->indexable_hierarchy_builder
+ $this->indexable_hierarchy_builder,
);
}
@@ -132,7 +132,7 @@ public function test_get_conditionals() {
Migrations_Conditional::class,
Doing_Post_Quick_Edit_Save_Conditional::class,
],
- Primary_Category_Quick_Edit_Watcher::get_conditionals()
+ Primary_Category_Quick_Edit_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Primary_Term_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Primary_Term_Watcher_Test.php
index eb248ab289d..5e92ce4db72 100644
--- a/tests/Unit/Integrations/Watchers/Primary_Term_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Primary_Term_Watcher_Test.php
@@ -77,7 +77,7 @@ protected function set_up() {
$this->site,
$this->primary_term,
$this->primary_term_builder,
- ]
+ ],
)
->shouldAllowMockingProtectedMethods()
->makePartial();
@@ -93,7 +93,7 @@ protected function set_up() {
public function test_get_conditionals() {
$this->assertEquals(
[ Migrations_Conditional::class ],
- Primary_Term_Watcher::get_conditionals()
+ Primary_Term_Watcher::get_conditionals(),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Search_Engines_Discouraged_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Search_Engines_Discouraged_Watcher_Test.php
index ed295485ee1..b6176007f0d 100644
--- a/tests/Unit/Integrations/Watchers/Search_Engines_Discouraged_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Search_Engines_Discouraged_Watcher_Test.php
@@ -93,7 +93,7 @@ public function set_up() {
$this->notification_helper,
$this->current_page_helper,
$this->options_helper,
- $this->capability_helper
+ $this->capability_helper,
);
}
@@ -107,23 +107,23 @@ public function set_up() {
public function test_constructor() {
self::assertInstanceOf(
Yoast_Notification_Center::class,
- self::getPropertyValue( $this->instance, 'notification_center' )
+ self::getPropertyValue( $this->instance, 'notification_center' ),
);
self::assertInstanceOf(
Notification_Helper::class,
- self::getPropertyValue( $this->instance, 'notification_helper' )
+ self::getPropertyValue( $this->instance, 'notification_helper' ),
);
self::assertInstanceOf(
Current_Page_Helper::class,
- self::getPropertyValue( $this->instance, 'current_page_helper' )
+ self::getPropertyValue( $this->instance, 'current_page_helper' ),
);
self::assertInstanceOf(
Options_Helper::class,
- self::getPropertyValue( $this->instance, 'options_helper' )
+ self::getPropertyValue( $this->instance, 'options_helper' ),
);
self::assertInstanceOf(
Capability_Helper::class,
- self::getPropertyValue( $this->instance, 'capability_helper' )
+ self::getPropertyValue( $this->instance, 'capability_helper' ),
);
}
diff --git a/tests/Unit/Integrations/Watchers/Woocommerce_Beta_Editor_Watcher_Test.php b/tests/Unit/Integrations/Watchers/Woocommerce_Beta_Editor_Watcher_Test.php
index edccab9652b..fce942f56b9 100644
--- a/tests/Unit/Integrations/Watchers/Woocommerce_Beta_Editor_Watcher_Test.php
+++ b/tests/Unit/Integrations/Watchers/Woocommerce_Beta_Editor_Watcher_Test.php
@@ -76,7 +76,7 @@ public function set_up() {
$this->notification_center,
$this->notification_helper,
$this->short_link_helper,
- $this->woocommerce_conditional
+ $this->woocommerce_conditional,
);
}
@@ -90,15 +90,15 @@ public function set_up() {
public function test_constructor() {
self::assertInstanceOf(
Yoast_Notification_Center::class,
- self::getPropertyValue( $this->instance, 'notification_center' )
+ self::getPropertyValue( $this->instance, 'notification_center' ),
);
self::assertInstanceOf(
Notification_Helper::class,
- self::getPropertyValue( $this->instance, 'notification_helper' )
+ self::getPropertyValue( $this->instance, 'notification_helper' ),
);
self::assertInstanceOf(
Short_Link_Helper::class,
- self::getPropertyValue( $this->instance, 'short_link_helper' )
+ self::getPropertyValue( $this->instance, 'short_link_helper' ),
);
}
diff --git a/tests/Unit/Integrations/Woocommerce_Product_Category_Permalink_Integration_Test.php b/tests/Unit/Integrations/Woocommerce_Product_Category_Permalink_Integration_Test.php
index 8b564a08fd3..f555b3b6129 100644
--- a/tests/Unit/Integrations/Woocommerce_Product_Category_Permalink_Integration_Test.php
+++ b/tests/Unit/Integrations/Woocommerce_Product_Category_Permalink_Integration_Test.php
@@ -45,7 +45,7 @@ protected function set_up() {
$this->dynamic_product_permalinks_conditional = Mockery::mock( Dynamic_Product_Permalinks_Conditional::class );
$this->instance = new Woocommerce_Product_Category_Permalink_Integration(
- $this->dynamic_product_permalinks_conditional
+ $this->dynamic_product_permalinks_conditional,
);
}
@@ -62,7 +62,7 @@ public function test_get_conditionals() {
WooCommerce_Version_Conditional::class,
Woo_SEO_Inactive_Conditional::class,
],
- Woocommerce_Product_Category_Permalink_Integration::get_conditionals()
+ Woocommerce_Product_Category_Permalink_Integration::get_conditionals(),
);
}
@@ -76,7 +76,7 @@ public function test_get_conditionals() {
public function test_constructor() {
$this->assertInstanceOf(
Dynamic_Product_Permalinks_Conditional::class,
- $this->getPropertyValue( $this->instance, 'dynamic_product_permalinks_conditional' )
+ $this->getPropertyValue( $this->instance, 'dynamic_product_permalinks_conditional' ),
);
}
@@ -92,7 +92,7 @@ public function test_register_hooks() {
$this->assertNotFalse(
\has_filter( 'wc_product_post_type_link_product_cat', [ $this->instance, 'restore_legacy_permalink_category' ] ),
- 'Does not have expected wc_product_post_type_link_product_cat filter'
+ 'Does not have expected wc_product_post_type_link_product_cat filter',
);
}
@@ -150,7 +150,7 @@ public function test_restore_legacy_permalink_category_with_dynamic_permalinks_d
[
'parent' => 'DESC',
'term_id' => 'ASC',
- ]
+ ],
)
->andReturn( $sorted_terms );
diff --git a/tests/Unit/Introductions/Application/AI_Brand_Insights_Post_Launch_Test.php b/tests/Unit/Introductions/Application/AI_Brand_Insights_Post_Launch_Test.php
index 723f91f28ab..05063995bb3 100644
--- a/tests/Unit/Introductions/Application/AI_Brand_Insights_Post_Launch_Test.php
+++ b/tests/Unit/Introductions/Application/AI_Brand_Insights_Post_Launch_Test.php
@@ -55,7 +55,7 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
Current_Page_Helper::class,
- $this->getPropertyValue( $this->instance, 'current_page_helper' )
+ $this->getPropertyValue( $this->instance, 'current_page_helper' ),
);
}
diff --git a/tests/Unit/Introductions/Application/Ai_Fix_Assessments_Upsell_Test.php b/tests/Unit/Introductions/Application/Ai_Fix_Assessments_Upsell_Test.php
index 1b1e5114a10..6127eb714f4 100644
--- a/tests/Unit/Introductions/Application/Ai_Fix_Assessments_Upsell_Test.php
+++ b/tests/Unit/Introductions/Application/Ai_Fix_Assessments_Upsell_Test.php
@@ -71,11 +71,11 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
Product_Helper::class,
- $this->getPropertyValue( $this->instance, 'product_helper' )
+ $this->getPropertyValue( $this->instance, 'product_helper' ),
);
$this->assertInstanceOf(
User_Helper::class,
- $this->getPropertyValue( $this->instance, 'user_helper' )
+ $this->getPropertyValue( $this->instance, 'user_helper' ),
);
}
diff --git a/tests/Unit/Introductions/Application/Black_Friday_Announcement_Test.php b/tests/Unit/Introductions/Application/Black_Friday_Announcement_Test.php
index b8deff2c58b..dae27d56bfc 100644
--- a/tests/Unit/Introductions/Application/Black_Friday_Announcement_Test.php
+++ b/tests/Unit/Introductions/Application/Black_Friday_Announcement_Test.php
@@ -63,7 +63,7 @@ protected function set_up() {
$this->instance = new Black_Friday_Announcement(
$this->current_page_helper,
$this->promotion_manager,
- $this->product_helper
+ $this->product_helper,
);
}
@@ -77,15 +77,15 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
Current_Page_Helper::class,
- $this->getPropertyValue( $this->instance, 'current_page_helper' )
+ $this->getPropertyValue( $this->instance, 'current_page_helper' ),
);
$this->assertInstanceOf(
Promotion_Manager::class,
- $this->getPropertyValue( $this->instance, 'promotion_manager' )
+ $this->getPropertyValue( $this->instance, 'promotion_manager' ),
);
$this->assertInstanceOf(
Product_Helper::class,
- $this->getPropertyValue( $this->instance, 'product_helper' )
+ $this->getPropertyValue( $this->instance, 'product_helper' ),
);
}
diff --git a/tests/Unit/Introductions/Application/Google_Docs_Addon_Upsell_Test.php b/tests/Unit/Introductions/Application/Google_Docs_Addon_Upsell_Test.php
index 7e099eb29e4..24e38191d55 100644
--- a/tests/Unit/Introductions/Application/Google_Docs_Addon_Upsell_Test.php
+++ b/tests/Unit/Introductions/Application/Google_Docs_Addon_Upsell_Test.php
@@ -73,17 +73,17 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
Product_Helper::class,
- $this->getPropertyValue( $this->instance, 'product_helper' )
+ $this->getPropertyValue( $this->instance, 'product_helper' ),
);
$this->assertInstanceOf(
User_Helper::class,
- $this->getPropertyValue( $this->instance, 'user_helper' )
+ $this->getPropertyValue( $this->instance, 'user_helper' ),
);
$this->assertInstanceOf(
Current_Page_Helper::class,
- $this->getPropertyValue( $this->instance, 'current_page_helper' )
+ $this->getPropertyValue( $this->instance, 'current_page_helper' ),
);
}
diff --git a/tests/Unit/Introductions/Domain/Introduction_Item_Test.php b/tests/Unit/Introductions/Domain/Introduction_Item_Test.php
index ab9c3aeae8d..f3680a8c890 100644
--- a/tests/Unit/Introductions/Domain/Introduction_Item_Test.php
+++ b/tests/Unit/Introductions/Domain/Introduction_Item_Test.php
@@ -56,7 +56,7 @@ public function test_to_array() {
'id' => 'test',
'priority' => 5,
],
- $this->instance->to_array()
+ $this->instance->to_array(),
);
}
diff --git a/tests/Unit/Introductions/Domain/Introductions_Bucket_Test.php b/tests/Unit/Introductions/Domain/Introductions_Bucket_Test.php
index 72f987dda5f..e23c0d4c1d9 100644
--- a/tests/Unit/Introductions/Domain/Introductions_Bucket_Test.php
+++ b/tests/Unit/Introductions/Domain/Introductions_Bucket_Test.php
@@ -67,7 +67,7 @@ public function test_to_array() {
'priority' => 2,
],
],
- $instance->to_array()
+ $instance->to_array(),
);
}
}
diff --git a/tests/Unit/Introductions/Infrastructure/Introductions_Seen_Repository_Test.php b/tests/Unit/Introductions/Infrastructure/Introductions_Seen_Repository_Test.php
index 52299877f51..5ae04e6ee80 100644
--- a/tests/Unit/Introductions/Infrastructure/Introductions_Seen_Repository_Test.php
+++ b/tests/Unit/Introductions/Infrastructure/Introductions_Seen_Repository_Test.php
@@ -54,7 +54,7 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
User_Helper::class,
- $this->getPropertyValue( $this->instance, 'user_helper' )
+ $this->getPropertyValue( $this->instance, 'user_helper' ),
);
}
@@ -97,13 +97,13 @@ public static function provide_get_all_introductions_test_data() {
'meta' => [
'foo' => [
'is_seen' => true,
- 'seen_on' => 12345678,
+ 'seen_on' => 12_345_678,
],
],
'expected' => [
'foo' => [
'is_seen' => true,
- 'seen_on' => 12345678,
+ 'seen_on' => 12_345_678,
],
],
],
@@ -190,7 +190,7 @@ public static function provide_is_introduction_seen_test_data() {
'meta' => [
'foo' => [
'is_seen' => true,
- 'seen_on' => 12345678,
+ 'seen_on' => 12_345_678,
],
],
'expected' => true,
@@ -210,7 +210,7 @@ public static function provide_is_introduction_seen_test_data() {
'meta' => [
'foo' => [
'is_seen' => 1,
- 'seen_on' => 12345678,
+ 'seen_on' => 12_345_678,
],
],
'expected' => true,
@@ -225,7 +225,7 @@ public static function provide_is_introduction_seen_test_data() {
'meta' => [
'foo' => [
'is_seen' => '1',
- 'seen_on' => 12345678,
+ 'seen_on' => 12_345_678,
],
],
'expected' => true,
@@ -298,13 +298,13 @@ public static function provide_set_introduction_test_data() {
'meta' => [
'foo' => [
'is_seen' => true,
- 'seen_on' => 12345678,
+ 'seen_on' => 12_345_678,
],
],
'expected_meta' => [
'foo' => [
'is_seen' => true,
- 'seen_on' => 12345678,
+ 'seen_on' => 12_345_678,
],
],
],
diff --git a/tests/Unit/Introductions/Infrastructure/Wistia_Embed_Permission_Repository_Test.php b/tests/Unit/Introductions/Infrastructure/Wistia_Embed_Permission_Repository_Test.php
index 77a9782cd73..59bddedf869 100644
--- a/tests/Unit/Introductions/Infrastructure/Wistia_Embed_Permission_Repository_Test.php
+++ b/tests/Unit/Introductions/Infrastructure/Wistia_Embed_Permission_Repository_Test.php
@@ -54,7 +54,7 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
User_Helper::class,
- $this->getPropertyValue( $this->instance, 'user_helper' )
+ $this->getPropertyValue( $this->instance, 'user_helper' ),
);
}
diff --git a/tests/Unit/Introductions/User_Interface/Introductions_Integration_Test.php b/tests/Unit/Introductions/User_Interface/Introductions_Integration_Test.php
index 2125ca980a6..19812998b82 100644
--- a/tests/Unit/Introductions/User_Interface/Introductions_Integration_Test.php
+++ b/tests/Unit/Introductions/User_Interface/Introductions_Integration_Test.php
@@ -106,7 +106,7 @@ protected function set_up() {
$this->user_helper,
$this->short_link_helper,
$this->wistia_embed_permission_repository,
- $this->woocommerce_conditional
+ $this->woocommerce_conditional,
);
}
@@ -131,31 +131,31 @@ public function test_get_conditionals() {
public function test_constructor() {
$this->assertInstanceOf(
WPSEO_Admin_Asset_Manager::class,
- $this->getPropertyValue( $this->instance, 'admin_asset_manager' )
+ $this->getPropertyValue( $this->instance, 'admin_asset_manager' ),
);
$this->assertInstanceOf(
Introductions_Collector::class,
- $this->getPropertyValue( $this->instance, 'introductions_collector' )
+ $this->getPropertyValue( $this->instance, 'introductions_collector' ),
);
$this->assertInstanceOf(
Product_Helper::class,
- $this->getPropertyValue( $this->instance, 'product_helper' )
+ $this->getPropertyValue( $this->instance, 'product_helper' ),
);
$this->assertInstanceOf(
User_Helper::class,
- $this->getPropertyValue( $this->instance, 'user_helper' )
+ $this->getPropertyValue( $this->instance, 'user_helper' ),
);
$this->assertInstanceOf(
Short_Link_Helper::class,
- $this->getPropertyValue( $this->instance, 'short_link_helper' )
+ $this->getPropertyValue( $this->instance, 'short_link_helper' ),
);
$this->assertInstanceOf(
Wistia_Embed_Permission_Repository::class,
- $this->getPropertyValue( $this->instance, 'wistia_embed_permission_repository' )
+ $this->getPropertyValue( $this->instance, 'wistia_embed_permission_repository' ),
);
$this->assertInstanceOf(
WooCommerce_Conditional::class,
- $this->getPropertyValue( $this->instance, 'woocommerce_conditional' )
+ $this->getPropertyValue( $this->instance, 'woocommerce_conditional' ),
);
}
@@ -368,7 +368,7 @@ private function expect_localized_data_for( $introductions, $user_id ) {
'pluginUrl' => $plugin_url,
'wistiaEmbedPermission' => $wistia_embed_permission,
'isWooEnabled' => true,
- ]
+ ],
);
}
}
diff --git a/tests/Unit/Introductions/User_Interface/Introductions_Seen_Route_Test.php b/tests/Unit/Introductions/User_Interface/Introductions_Seen_Route_Test.php
index 6f995b4daea..cb044a4b74c 100644
--- a/tests/Unit/Introductions/User_Interface/Introductions_Seen_Route_Test.php
+++ b/tests/Unit/Introductions/User_Interface/Introductions_Seen_Route_Test.php
@@ -78,11 +78,11 @@ protected function set_up() {
public function test_construct() {
$this->assertInstanceOf(
Introductions_Seen_Repository::class,
- $this->getPropertyValue( $this->instance, 'introductions_seen_repository' )
+ $this->getPropertyValue( $this->instance, 'introductions_seen_repository' ),
);
$this->assertInstanceOf(
User_Helper::class,
- $this->getPropertyValue( $this->instance, 'user_helper' )
+ $this->getPropertyValue( $this->instance, 'user_helper' ),
);
}
@@ -129,7 +129,7 @@ public function test_register_routes() {
],
],
],
- ]
+ ],
);
$this->instance->register_routes();
@@ -175,7 +175,7 @@ public function test_set_introduction_seen() {
'success' => true,
],
],
- 200
+ 200,
)
->once();
@@ -187,12 +187,12 @@ public function test_set_introduction_seen() {
[
'introduction_id' => $introduction_id,
'is_seen' => true,
- ]
+ ],
);
$this->assertInstanceOf(
'WP_REST_Response',
- $this->instance->set_introduction_seen( $wp_rest_request )
+ $this->instance->set_introduction_seen( $wp_rest_request ),
);
}
@@ -223,7 +223,7 @@ public function test_set_introduction_seen_failed() {
'success' => false,
],
],
- 400
+ 400,
)
->once();
@@ -235,12 +235,12 @@ public function test_set_introduction_seen_failed() {
[
'introduction_id' => $introduction_id,
'is_seen' => true,
- ]
+ ],
);
$this->assertInstanceOf(
'WP_REST_Response',
- $this->instance->set_introduction_seen( $wp_rest_request )
+ $this->instance->set_introduction_seen( $wp_rest_request ),
);
}
@@ -270,12 +270,12 @@ public function test_set_wistia_embed_permission_with_error() {
[
'introduction_id' => $introduction_id,
'is_seen' => true,
- ]
+ ],
);
$this->assertInstanceOf(
'WP_Error',
- $this->instance->set_introduction_seen( $wp_rest_request )
+ $this->instance->set_introduction_seen( $wp_rest_request ),
);
}
@@ -297,7 +297,7 @@ public function test_set_introduction_seen_invalid_id() {
->expects( '__construct' )
->with(
[],
- 400
+ 400,
)
->once();
@@ -309,12 +309,12 @@ public function test_set_introduction_seen_invalid_id() {
[
'introduction_id' => $introduction_id,
'is_seen' => true,
- ]
+ ],
);
$this->assertInstanceOf(
'WP_REST_Response',
- $this->instance->set_introduction_seen( $wp_rest_request )
+ $this->instance->set_introduction_seen( $wp_rest_request ),
);
}
}
diff --git a/tests/Unit/Introductions/User_Interface/Wistia_Embed_Permission_Route_Test.php b/tests/Unit/Introductions/User_Interface/Wistia_Embed_Permission_Route_Test.php
index 29f491f37e4..5e83434863d 100644
--- a/tests/Unit/Introductions/User_Interface/Wistia_Embed_Permission_Route_Test.php
+++ b/tests/Unit/Introductions/User_Interface/Wistia_Embed_Permission_Route_Test.php
@@ -69,11 +69,11 @@ protected function set_up() {
public function test_construct() {
$this->assertInstanceOf(
Wistia_Embed_Permission_Repository::class,
- $this->getPropertyValue( $this->instance, 'wistia_embed_permission_repository' )
+ $this->getPropertyValue( $this->instance, 'wistia_embed_permission_repository' ),
);
$this->assertInstanceOf(
User_Helper::class,
- $this->getPropertyValue( $this->instance, 'user_helper' )
+ $this->getPropertyValue( $this->instance, 'user_helper' ),
);
}
@@ -119,7 +119,7 @@ public function test_register_routes() {
],
],
],
- ]
+ ],
);
$this->instance->register_routes();
@@ -162,13 +162,13 @@ public function test_get_wistia_embed_permission() {
'json' => (object) [
'value' => true,
],
- ]
+ ],
)
->once();
$this->assertInstanceOf(
'WP_REST_Response',
- $this->instance->get_wistia_embed_permission()
+ $this->instance->get_wistia_embed_permission(),
);
}
@@ -190,7 +190,7 @@ public function test_get_wistia_embed_permission_with_error() {
$this->assertInstanceOf(
'WP_Error',
- $this->instance->get_wistia_embed_permission()
+ $this->instance->get_wistia_embed_permission(),
);
}
@@ -219,7 +219,7 @@ public function test_set_wistia_embed_permission() {
'success' => true,
],
],
- 200
+ 200,
)
->once();
@@ -231,7 +231,7 @@ public function test_set_wistia_embed_permission() {
$this->assertInstanceOf(
'WP_REST_Response',
- $this->instance->set_wistia_embed_permission( $wp_rest_request )
+ $this->instance->set_wistia_embed_permission( $wp_rest_request ),
);
}
@@ -260,7 +260,7 @@ public function test_set_wistia_embed_permission_failed() {
'success' => false,
],
],
- 400
+ 400,
)
->once();
@@ -272,7 +272,7 @@ public function test_set_wistia_embed_permission_failed() {
$this->assertInstanceOf(
'WP_REST_Response',
- $this->instance->set_wistia_embed_permission( $wp_rest_request )
+ $this->instance->set_wistia_embed_permission( $wp_rest_request ),
);
}
@@ -300,7 +300,7 @@ public function test_set_wistia_embed_permission_with_error() {
$this->assertInstanceOf(
'WP_Error',
- $this->instance->set_wistia_embed_permission( $wp_rest_request )
+ $this->instance->set_wistia_embed_permission( $wp_rest_request ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Configuration/Abstract_Llms_Txt_Configuration_Test.php b/tests/Unit/Llms_Txt/Application/Configuration/Abstract_Llms_Txt_Configuration_Test.php
index dff3c704caa..7ea96590c57 100644
--- a/tests/Unit/Llms_Txt/Application/Configuration/Abstract_Llms_Txt_Configuration_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Configuration/Abstract_Llms_Txt_Configuration_Test.php
@@ -60,7 +60,7 @@ protected function set_up() {
$this->instance = new Llms_Txt_Configuration(
$this->runner,
$this->post_type_helper,
- $this->options_helper
+ $this->options_helper,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Configuration/Llms_Txt_Configuration_Constructor_Test.php b/tests/Unit/Llms_Txt/Application/Configuration/Llms_Txt_Configuration_Constructor_Test.php
index 432038714f7..2fa1209b019 100644
--- a/tests/Unit/Llms_Txt/Application/Configuration/Llms_Txt_Configuration_Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Configuration/Llms_Txt_Configuration_Constructor_Test.php
@@ -26,15 +26,15 @@ final class Llms_Txt_Configuration_Constructor_Test extends Abstract_Llms_Txt_Co
public function test_constructor() {
$this->assertInstanceOf(
File_Runner::class,
- $this->getPropertyValue( $this->instance, 'runner' )
+ $this->getPropertyValue( $this->instance, 'runner' ),
);
$this->assertInstanceOf(
Post_Type_Helper::class,
- $this->getPropertyValue( $this->instance, 'post_type_helper' )
+ $this->getPropertyValue( $this->instance, 'post_type_helper' ),
);
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Abstract_Populate_File_Command_Handler_Test.php b/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Abstract_Populate_File_Command_Handler_Test.php
index 36e04da278e..9c2aaa86db2 100644
--- a/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Abstract_Populate_File_Command_Handler_Test.php
+++ b/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Abstract_Populate_File_Command_Handler_Test.php
@@ -71,7 +71,7 @@ protected function setUp(): void {
$this->options_helper,
$this->file_system_adapter,
$this->markdown_builder,
- $this->permission_gate
+ $this->permission_gate,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Constructor_Test.php
index 6cde9929425..a5711ef31cd 100644
--- a/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/File/Commands/Populate_File/Constructor_Test.php
@@ -27,19 +27,19 @@ final class Constructor_Test extends Abstract_Populate_File_Command_Handler_Test
public function test_constructor() {
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
$this->assertInstanceOf(
WordPress_File_System_Adapter::class,
- $this->getPropertyValue( $this->instance, 'file_system_adapter' )
+ $this->getPropertyValue( $this->instance, 'file_system_adapter' ),
);
$this->assertInstanceOf(
Markdown_Builder::class,
- $this->getPropertyValue( $this->instance, 'markdown_builder' )
+ $this->getPropertyValue( $this->instance, 'markdown_builder' ),
);
$this->assertInstanceOf(
WordPress_Llms_Txt_Permission_Gate::class,
- $this->getPropertyValue( $this->instance, 'permission_gate' )
+ $this->getPropertyValue( $this->instance, 'permission_gate' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Abstract_Remove_File_Command_Handler_Test.php b/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Abstract_Remove_File_Command_Handler_Test.php
index acc5338f821..5cf2403daf0 100644
--- a/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Abstract_Remove_File_Command_Handler_Test.php
+++ b/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Abstract_Remove_File_Command_Handler_Test.php
@@ -61,7 +61,7 @@ protected function setUp(): void {
$this->instance = new Remove_File_Command_Handler(
$this->options_helper,
$this->file_system_adapter,
- $this->permission_gate
+ $this->permission_gate,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Constructor_Test.php
index a895f8c9941..ae28d08bf9c 100644
--- a/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/File/Commands/Remove_File/Constructor_Test.php
@@ -26,15 +26,15 @@ final class Constructor_Test extends Abstract_Remove_File_Command_Handler_Test {
public function test_constructor() {
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
$this->assertInstanceOf(
WordPress_File_System_Adapter::class,
- $this->getPropertyValue( $this->instance, 'file_system_adapter' )
+ $this->getPropertyValue( $this->instance, 'file_system_adapter' ),
);
$this->assertInstanceOf(
WordPress_Llms_Txt_Permission_Gate::class,
- $this->getPropertyValue( $this->instance, 'permission_gate' )
+ $this->getPropertyValue( $this->instance, 'permission_gate' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/File/Llms_Txt_Cron_Scheduler/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/File/Llms_Txt_Cron_Scheduler/Constructor_Test.php
index 71ce9a61afa..6102bdd142f 100644
--- a/tests/Unit/Llms_Txt/Application/File/Llms_Txt_Cron_Scheduler/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/File/Llms_Txt_Cron_Scheduler/Constructor_Test.php
@@ -23,7 +23,7 @@ final class Constructor_Test extends Abstract_Llms_Txt_Cron_Scheduler_Test {
public function test_constructor() {
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Abstract_Description_Builder_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Abstract_Description_Builder_Test.php
index 9fbce44f92d..aafc90336e1 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Abstract_Description_Builder_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Abstract_Description_Builder_Test.php
@@ -41,7 +41,7 @@ protected function set_up() {
$this->description_adapter = Mockery::mock( Description_Adapter::class );
$this->instance = new Description_Builder(
- $this->description_adapter
+ $this->description_adapter,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Constructor_Test.php
index 8c0bc487b5b..4b4d8be6ed3 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Description_Builder/Constructor_Test.php
@@ -23,7 +23,7 @@ final class Constructor_Test extends Abstract_Description_Builder_Test {
public function test_constructor() {
$this->assertInstanceOf(
Description_Adapter::class,
- $this->getPropertyValue( $this->instance, 'description_adapter' )
+ $this->getPropertyValue( $this->instance, 'description_adapter' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Intro_Builder/Build_Intro_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Intro_Builder/Build_Intro_Test.php
index d2604dcf487..6251c6bf8b6 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Intro_Builder/Build_Intro_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Intro_Builder/Build_Intro_Test.php
@@ -24,7 +24,7 @@ final class Build_Intro_Test extends Abstract_Intro_Builder_Test {
public function test_build_intro() {
$built_intro = new Intro(
'Generated by Yoast SEO v1.0, this is an llms.txt file, meant for consumption by LLMs.',
- []
+ [],
);
$this->assertEquals( $built_intro, $this->instance->build_intro() );
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Abstract_Link_Lists_Builder_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Abstract_Link_Lists_Builder_Test.php
index b57f2757df5..83e53b50076 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Abstract_Link_Lists_Builder_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Abstract_Link_Lists_Builder_Test.php
@@ -51,7 +51,7 @@ protected function set_up() {
$this->instance = new Link_Lists_Builder(
$this->content_types_collector,
- $this->terms_collector
+ $this->terms_collector,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Constructor_Test.php
index 3bcffd0321c..2ea5438258c 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Link_Lists_Builder/Constructor_Test.php
@@ -24,11 +24,11 @@ final class Constructor_Test extends Abstract_Link_Lists_Builder_Test {
public function test_constructor() {
$this->assertInstanceOf(
Content_Types_Collector::class,
- $this->getPropertyValue( $this->instance, 'content_types_collector' )
+ $this->getPropertyValue( $this->instance, 'content_types_collector' ),
);
$this->assertInstanceOf(
Terms_Collector::class,
- $this->getPropertyValue( $this->instance, 'terms_collector' )
+ $this->getPropertyValue( $this->instance, 'terms_collector' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Abstract_Markdown_Builder_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Abstract_Markdown_Builder_Test.php
index f2606dc9b4a..0289addf717 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Abstract_Markdown_Builder_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Abstract_Markdown_Builder_Test.php
@@ -101,7 +101,7 @@ protected function set_up() {
$this->description_builder,
$this->link_lists_builder,
$this->markdown_escaper,
- $this->optional_link_list_builder
+ $this->optional_link_list_builder,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Constructor_Test.php
index db3040dd377..055858897cb 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Constructor_Test.php
@@ -29,31 +29,31 @@ final class Constructor_Test extends Abstract_Markdown_Builder_Test {
public function test_constructor() {
$this->assertInstanceOf(
Llms_Txt_Renderer::class,
- $this->getPropertyValue( $this->instance, 'llms_txt_renderer' )
+ $this->getPropertyValue( $this->instance, 'llms_txt_renderer' ),
);
$this->assertInstanceOf(
Intro_Builder::class,
- $this->getPropertyValue( $this->instance, 'intro_builder' )
+ $this->getPropertyValue( $this->instance, 'intro_builder' ),
);
$this->assertInstanceOf(
Title_Builder::class,
- $this->getPropertyValue( $this->instance, 'title_builder' )
+ $this->getPropertyValue( $this->instance, 'title_builder' ),
);
$this->assertInstanceOf(
Description_Builder::class,
- $this->getPropertyValue( $this->instance, 'description_builder' )
+ $this->getPropertyValue( $this->instance, 'description_builder' ),
);
$this->assertInstanceOf(
Link_Lists_Builder::class,
- $this->getPropertyValue( $this->instance, 'link_lists_builder' )
+ $this->getPropertyValue( $this->instance, 'link_lists_builder' ),
);
$this->assertInstanceOf(
Markdown_Escaper::class,
- $this->getPropertyValue( $this->instance, 'markdown_escaper' )
+ $this->getPropertyValue( $this->instance, 'markdown_escaper' ),
);
$this->assertInstanceOf(
Optional_Link_List_Builder::class,
- $this->getPropertyValue( $this->instance, 'optional_link_list_builder' )
+ $this->getPropertyValue( $this->instance, 'optional_link_list_builder' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Render_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Render_Test.php
index 30c0144ecf9..f72e8dd2537 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Render_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Markdown_Builder/Render_Test.php
@@ -68,7 +68,7 @@ public function test_render() {
$built_link_list1,
$built_link_list2,
$optional_built_link_list,
- ]
+ ],
);
$built_intro->shouldReceive( 'escape_markdown' )->once()->with( $this->markdown_escaper );
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Abstract_Optional_Link_List_Builder_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Abstract_Optional_Link_List_Builder_Test.php
index 24e9b423520..67b103b7ad1 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Abstract_Optional_Link_List_Builder_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Abstract_Optional_Link_List_Builder_Test.php
@@ -41,7 +41,7 @@ protected function set_up() {
$this->sitemap_link_collector = Mockery::mock( Sitemap_Link_Collector::class );
$this->instance = new Optional_Link_List_Builder(
- $this->sitemap_link_collector
+ $this->sitemap_link_collector,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Constructor_Test.php
index dc9e31597f2..9fe34e062e4 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Optional_Link_List_Builder/Constructor_Test.php
@@ -23,7 +23,7 @@ final class Constructor_Test extends Abstract_Optional_Link_List_Builder_Test {
public function test_constructor() {
$this->assertInstanceOf(
Sitemap_Link_Collector::class,
- $this->getPropertyValue( $this->instance, 'sitemap_link_collector' )
+ $this->getPropertyValue( $this->instance, 'sitemap_link_collector' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Abstract_Title_Builder_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Abstract_Title_Builder_Test.php
index d0d870ef0f8..88a80d59467 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Abstract_Title_Builder_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Abstract_Title_Builder_Test.php
@@ -41,7 +41,7 @@ protected function set_up() {
$this->title_adapter = Mockery::mock( Title_Adapter::class );
$this->instance = new Title_Builder(
- $this->title_adapter
+ $this->title_adapter,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Constructor_Test.php b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Constructor_Test.php
index d32a5dbeb76..66645cae8d2 100644
--- a/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Application/Markdown_Builders/Title_Builder/Constructor_Test.php
@@ -23,7 +23,7 @@ final class Constructor_Test extends Abstract_Title_Builder_Test {
public function test_constructor() {
$this->assertInstanceOf(
Title_Adapter::class,
- $this->getPropertyValue( $this->instance, 'title_adapter' )
+ $this->getPropertyValue( $this->instance, 'title_adapter' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Abstract_Content_Types_Collector_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Abstract_Content_Types_Collector_Test.php
index 7c4995fc178..d5d523339ac 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Abstract_Content_Types_Collector_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Abstract_Content_Types_Collector_Test.php
@@ -77,7 +77,7 @@ protected function set_up() {
$this->instance = new Content_Types_Collector(
$this->post_type_helper,
$this->post_collection_factory,
- $this->options_helper
+ $this->options_helper,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Constructor_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Constructor_Test.php
index bdf3caa77b8..a5032f45b0f 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Content_Types_Collector/Constructor_Test.php
@@ -25,15 +25,15 @@ final class Constructor_Test extends Abstract_Content_Types_Collector_Test {
public function test_constructor() {
$this->assertInstanceOf(
Post_Type_Helper::class,
- $this->getPropertyValue( $this->instance, 'post_type_helper' )
+ $this->getPropertyValue( $this->instance, 'post_type_helper' ),
);
$this->assertInstanceOf(
Post_Collection_Factory::class,
- $this->getPropertyValue( $this->instance, 'collection_factory' )
+ $this->getPropertyValue( $this->instance, 'collection_factory' ),
);
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Abstract_Description_Adapter_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Abstract_Description_Adapter_Test.php
index e220ee215e7..3b171d0595e 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Abstract_Description_Adapter_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Abstract_Description_Adapter_Test.php
@@ -41,7 +41,7 @@ protected function set_up() {
$this->meta = Mockery::mock( Meta_Surface::class );
$this->instance = new Description_Adapter(
- $this->meta
+ $this->meta,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Constructor_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Constructor_Test.php
index a13378a0907..7dd78cfabc8 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Description_Adapter/Constructor_Test.php
@@ -23,7 +23,7 @@ final class Constructor_Test extends Abstract_Description_Adapter_Test {
public function test_constructor() {
$this->assertInstanceOf(
Meta_Surface::class,
- $this->getPropertyValue( $this->instance, 'meta' )
+ $this->getPropertyValue( $this->instance, 'meta' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Abstract_Terms_Collector_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Abstract_Terms_Collector_Test.php
index 9237114b62a..124c1deedfe 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Abstract_Terms_Collector_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Abstract_Terms_Collector_Test.php
@@ -41,7 +41,7 @@ protected function set_up() {
$this->taxonomy_helper = Mockery::mock( Taxonomy_Helper::class );
$this->instance = new Terms_Collector(
- $this->taxonomy_helper
+ $this->taxonomy_helper,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Constructor_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Constructor_Test.php
index 809295b5fcf..a85e73a728c 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Terms_Collector/Constructor_Test.php
@@ -23,7 +23,7 @@ final class Constructor_Test extends Abstract_Terms_Collector_Test {
public function test_constructor() {
$this->assertInstanceOf(
Taxonomy_Helper::class,
- $this->getPropertyValue( $this->instance, 'taxonomy_helper' )
+ $this->getPropertyValue( $this->instance, 'taxonomy_helper' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Abstract_Title_Adapter_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Abstract_Title_Adapter_Test.php
index 762be8fb8a1..0961221be78 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Abstract_Title_Adapter_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Abstract_Title_Adapter_Test.php
@@ -41,7 +41,7 @@ protected function set_up() {
$this->default_tagline_runner = Mockery::mock( Default_Tagline_Runner::class );
$this->instance = new Title_Adapter(
- $this->default_tagline_runner
+ $this->default_tagline_runner,
);
}
}
diff --git a/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Constructor_Test.php b/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Constructor_Test.php
index 55418b056a7..ae304e2caa3 100644
--- a/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/Infrastructure/Title_Adapter/Constructor_Test.php
@@ -23,7 +23,7 @@ final class Constructor_Test extends Abstract_Title_Adapter_Test {
public function test_constructor() {
$this->assertInstanceOf(
Default_Tagline_Runner::class,
- $this->getPropertyValue( $this->instance, 'default_tagline_runner' )
+ $this->getPropertyValue( $this->instance, 'default_tagline_runner' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Abstract_Available_Posts_Route_Test.php b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Abstract_Available_Posts_Route_Test.php
index e3a5b9b864e..17b61b2445e 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Abstract_Available_Posts_Route_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Abstract_Available_Posts_Route_Test.php
@@ -52,7 +52,7 @@ protected function set_up() {
$this->instance = new Available_Posts_Route(
$this->available_posts_repository,
- $this->capability_helper
+ $this->capability_helper,
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Constructor_Test.php b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Constructor_Test.php
index d0ed1fb0cd2..ac5358f88b8 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Constructor_Test.php
@@ -25,12 +25,12 @@ final class Available_Posts_Route_Constructor_Test extends Abstract_Available_Po
public function test_construct() {
$this->assertInstanceOf(
Available_Posts_Repository::class,
- $this->getPropertyValue( $this->instance, 'available_posts_repository' )
+ $this->getPropertyValue( $this->instance, 'available_posts_repository' ),
);
$this->assertInstanceOf(
Capability_Helper::class,
- $this->getPropertyValue( $this->instance, 'capability_helper' )
+ $this->getPropertyValue( $this->instance, 'capability_helper' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Get_Posts_Test.php b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Get_Posts_Test.php
index 580b6e81b04..22588237aaa 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Get_Posts_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Get_Posts_Test.php
@@ -87,15 +87,15 @@ static function ( $request_parameters ) use ( $post_type, $search ) {
return $request_parameters instanceof Parameters
&& $request_parameters->get_post_type() === $post_type
&& $request_parameters->get_search_filter() === $search;
- }
- )
+ },
+ ),
)
->times( $available_posts_times )
->andReturn( $data_container_mock );
$this->assertInstanceOf(
'WP_REST_Response',
- $this->instance->get_available_posts( $wp_rest_request )
+ $this->instance->get_available_posts( $wp_rest_request ),
);
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Register_Routes_Test.php b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Register_Routes_Test.php
index 170ee7291be..dfa0c7071a1 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Register_Routes_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Available_Posts/Available_Posts_Route_Register_Routes_Test.php
@@ -45,7 +45,7 @@ public function test_register_routes() {
],
],
],
- ]
+ ],
);
$this->instance->register_routes();
diff --git a/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Abstract_Cleanup_Llms_Txt_On_Deactivation_Test.php b/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Abstract_Cleanup_Llms_Txt_On_Deactivation_Test.php
index c5a9e835f2f..e69c4dd2226 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Abstract_Cleanup_Llms_Txt_On_Deactivation_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Abstract_Cleanup_Llms_Txt_On_Deactivation_Test.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
$this->instance = new Cleanup_Llms_Txt_On_Deactivation(
$this->command_handler,
- $this->cron_scheduler
+ $this->cron_scheduler,
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Constructor_Test.php b/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Constructor_Test.php
index 3dcab5b0a2d..f7dafc8339e 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Constructor_Test.php
@@ -24,11 +24,11 @@ final class Constructor_Test extends Abstract_Cleanup_Llms_Txt_On_Deactivation_T
public function test_constructor() {
$this->assertInstanceOf(
Remove_File_Command_Handler::class,
- $this->getPropertyValue( $this->instance, 'command_handler' )
+ $this->getPropertyValue( $this->instance, 'command_handler' ),
);
$this->assertInstanceOf(
Llms_Txt_Cron_Scheduler::class,
- $this->getPropertyValue( $this->instance, 'cron_scheduler' )
+ $this->getPropertyValue( $this->instance, 'cron_scheduler' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Register_Hooks_Test.php b/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Register_Hooks_Test.php
index 0e4bc628c11..274eab90d3e 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Register_Hooks_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Cleanup_Llms_Txt_On_Deactivation/Register_Hooks_Test.php
@@ -25,8 +25,8 @@ public function test_register_hooks() {
10,
\has_action(
'wpseo_deactivate',
- [ $this->instance, 'maybe_remove_llms_file' ]
- )
+ [ $this->instance, 'maybe_remove_llms_file' ],
+ ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Abstract_Enable_Llms_Txt_Option_Watcher_Test.php b/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Abstract_Enable_Llms_Txt_Option_Watcher_Test.php
index f805ec346b4..39b094f1d75 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Abstract_Enable_Llms_Txt_Option_Watcher_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Abstract_Enable_Llms_Txt_Option_Watcher_Test.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
$this->cron_scheduler,
$this->command_handler,
$this->populate_file_command_handler,
- $this->options_helper
+ $this->options_helper,
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Constructor_Test.php b/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Constructor_Test.php
index b9f855bbbe0..4552d9885b2 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Constructor_Test.php
@@ -25,15 +25,15 @@ final class Constructor_Test extends Abstract_Enable_Llms_Txt_Option_Watcher_Tes
public function test_constructor() {
$this->assertInstanceOf(
Llms_Txt_Cron_Scheduler::class,
- $this->getPropertyValue( $this->instance, 'scheduler' )
+ $this->getPropertyValue( $this->instance, 'scheduler' ),
);
$this->assertInstanceOf(
Remove_File_Command_Handler::class,
- $this->getPropertyValue( $this->instance, 'remove_file_command_handler' )
+ $this->getPropertyValue( $this->instance, 'remove_file_command_handler' ),
);
$this->assertInstanceOf(
Populate_File_Command_Handler::class,
- $this->getPropertyValue( $this->instance, 'populate_file_command_handler' )
+ $this->getPropertyValue( $this->instance, 'populate_file_command_handler' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Register_Hooks_Test.php b/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Register_Hooks_Test.php
index fa211be0458..1449445441f 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Register_Hooks_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Enable_Llms_Txt_Option_Watcher/Register_Hooks_Test.php
@@ -25,8 +25,8 @@ public function test_register_hooks() {
10,
\has_action(
'update_option_wpseo',
- [ $this->instance, 'check_toggle_llms_txt' ]
- )
+ [ $this->instance, 'check_toggle_llms_txt' ],
+ ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Abstract_File_Failure_Llms_Txt_Notification_Integration_Test.php b/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Abstract_File_Failure_Llms_Txt_Notification_Integration_Test.php
index 8ba13d69540..32d9c7c4418 100644
--- a/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Abstract_File_Failure_Llms_Txt_Notification_Integration_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Abstract_File_Failure_Llms_Txt_Notification_Integration_Test.php
@@ -63,7 +63,7 @@ protected function set_up() {
$this->instance = new File_Failure_Llms_Txt_Notification_Integration(
$this->options_helper,
$this->notification_center,
- $this->file_failure_notification_presenter
+ $this->file_failure_notification_presenter,
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Constructor_Test.php b/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Constructor_Test.php
index 5f5baea5ce0..4ab21bb648c 100644
--- a/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Constructor_Test.php
@@ -25,15 +25,15 @@ final class Constructor_Test extends Abstract_File_Failure_Llms_Txt_Notification
public function test_constructor() {
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
$this->assertInstanceOf(
Yoast_Notification_Center::class,
- $this->getPropertyValue( $this->instance, 'notification_center' )
+ $this->getPropertyValue( $this->instance, 'notification_center' ),
);
$this->assertInstanceOf(
File_Failure_Notification_Presenter::class,
- $this->getPropertyValue( $this->instance, 'presenter' )
+ $this->getPropertyValue( $this->instance, 'presenter' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Register_Hooks_Test.php b/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Register_Hooks_Test.php
index 2b5635a3f1c..5c1968b807c 100644
--- a/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Register_Hooks_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/File_Failure_Llms_Txt_Notification_Integration/Register_Hooks_Test.php
@@ -25,8 +25,8 @@ public function test_register_hooks() {
10,
\has_action(
'admin_init',
- [ $this->instance, 'maybe_show_notification' ]
- )
+ [ $this->instance, 'maybe_show_notification' ],
+ ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Abstract_Llms_Txt_Cron_Callback_Integration_Test.php b/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Abstract_Llms_Txt_Cron_Callback_Integration_Test.php
index dd343b44eb5..eed21e2db7c 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Abstract_Llms_Txt_Cron_Callback_Integration_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Abstract_Llms_Txt_Cron_Callback_Integration_Test.php
@@ -74,7 +74,7 @@ protected function setUp(): void {
$this->options_helper,
$this->cron_scheduler,
$this->populate_file_command_handler,
- $this->command_handler
+ $this->command_handler,
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Constructor_Test.php b/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Constructor_Test.php
index 5f88aa9ad25..af95efc43e7 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Constructor_Test.php
@@ -26,19 +26,19 @@ final class Constructor_Test extends Abstract_Llms_Txt_Cron_Callback_Integration
public function test_constructor() {
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
$this->assertInstanceOf(
Llms_Txt_Cron_Scheduler::class,
- $this->getPropertyValue( $this->instance, 'scheduler' )
+ $this->getPropertyValue( $this->instance, 'scheduler' ),
);
$this->assertInstanceOf(
Populate_File_Command_Handler::class,
- $this->getPropertyValue( $this->instance, 'populate_file_command_handler' )
+ $this->getPropertyValue( $this->instance, 'populate_file_command_handler' ),
);
$this->assertInstanceOf(
Remove_File_Command_Handler::class,
- $this->getPropertyValue( $this->instance, 'remove_file_command_handler' )
+ $this->getPropertyValue( $this->instance, 'remove_file_command_handler' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Register_Hooks_Test.php b/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Register_Hooks_Test.php
index 38fceef2b06..b8ae6c87a48 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Register_Hooks_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Llms_Txt_Cron_Callback_Integration/Register_Hooks_Test.php
@@ -27,8 +27,8 @@ public function test_register_hooks() {
10,
\has_action(
Llms_Txt_Cron_Scheduler::LLMS_TXT_POPULATION,
- [ $this->instance, 'populate_file' ]
- )
+ [ $this->instance, 'populate_file' ],
+ ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Abstract_Schedule_Population_On_Activation_Integration_Test.php b/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Abstract_Schedule_Population_On_Activation_Integration_Test.php
index 71217787172..0dc01285e88 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Abstract_Schedule_Population_On_Activation_Integration_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Abstract_Schedule_Population_On_Activation_Integration_Test.php
@@ -54,7 +54,7 @@ protected function setUp(): void {
$this->instance = new Schedule_Population_On_Activation_Integration(
$this->cron_scheduler,
- $this->options_helper
+ $this->options_helper,
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Constructor_Test.php b/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Constructor_Test.php
index e959c37a21e..2de7fdd6bd4 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Constructor_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Constructor_Test.php
@@ -24,11 +24,11 @@ final class Constructor_Test extends Abstract_Schedule_Population_On_Activation_
public function test_constructor() {
$this->assertInstanceOf(
Options_Helper::class,
- $this->getPropertyValue( $this->instance, 'options_helper' )
+ $this->getPropertyValue( $this->instance, 'options_helper' ),
);
$this->assertInstanceOf(
Llms_Txt_Cron_Scheduler::class,
- $this->getPropertyValue( $this->instance, 'scheduler' )
+ $this->getPropertyValue( $this->instance, 'scheduler' ),
);
}
}
diff --git a/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Register_Hooks_Test.php b/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Register_Hooks_Test.php
index 52e7c768957..a63a0c6ed60 100644
--- a/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Register_Hooks_Test.php
+++ b/tests/Unit/Llms_Txt/User_Interface/Schedule_Population_On_Activation_Integration/Register_Hooks_Test.php
@@ -25,8 +25,8 @@ public function test_register_hooks() {
10,
\has_action(
'wpseo_activate',
- [ $this->instance, 'schedule_llms_txt_population' ]
- )
+ [ $this->instance, 'schedule_llms_txt_population' ],
+ ),
);
}
}
diff --git a/tests/Unit/Memoizers/Meta_Tags_Context_Memoizer_Test.php b/tests/Unit/Memoizers/Meta_Tags_Context_Memoizer_Test.php
index f6a7448fdc5..b13d95612b2 100644
--- a/tests/Unit/Memoizers/Meta_Tags_Context_Memoizer_Test.php
+++ b/tests/Unit/Memoizers/Meta_Tags_Context_Memoizer_Test.php
@@ -110,7 +110,7 @@ protected function set_up() {
$this->current_page,
$this->indexable_repository,
$this->meta_tags_context,
- $this->presentation_memoizer
+ $this->presentation_memoizer,
);
$this->meta_tags_context_mock = new Meta_Tags_Context_Mock();
@@ -127,23 +127,23 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
Blocks_Helper::class,
- $this->getPropertyValue( $this->instance, 'blocks' )
+ $this->getPropertyValue( $this->instance, 'blocks' ),
);
$this->assertInstanceOf(
Current_Page_Helper::class,
- $this->getPropertyValue( $this->instance, 'current_page' )
+ $this->getPropertyValue( $this->instance, 'current_page' ),
);
$this->assertInstanceOf(
Indexable_Repository::class,
- $this->getPropertyValue( $this->instance, 'repository' )
+ $this->getPropertyValue( $this->instance, 'repository' ),
);
$this->assertInstanceOf(
Meta_Tags_Context::class,
- $this->getPropertyValue( $this->instance, 'context_prototype' )
+ $this->getPropertyValue( $this->instance, 'context_prototype' ),
);
$this->assertInstanceOf(
Presentation_Memoizer::class,
- $this->getPropertyValue( $this->instance, 'presentation_memoizer' )
+ $this->getPropertyValue( $this->instance, 'presentation_memoizer' ),
);
}
diff --git a/tests/Unit/Memoizers/Presentation_Memoizer_Test.php b/tests/Unit/Memoizers/Presentation_Memoizer_Test.php
index fa0da31a1f2..f2b05ab649b 100644
--- a/tests/Unit/Memoizers/Presentation_Memoizer_Test.php
+++ b/tests/Unit/Memoizers/Presentation_Memoizer_Test.php
@@ -87,7 +87,7 @@ protected function set_up() {
public function test_constructor() {
$this->assertInstanceOf(
ContainerInterface::class,
- $this->getPropertyValue( $this->instance, 'container' )
+ $this->getPropertyValue( $this->instance, 'container' ),
);
}
diff --git a/tests/Unit/Models/Indexable_Test.php b/tests/Unit/Models/Indexable_Test.php
index 9c54c5205e3..a131f9c1492 100644
--- a/tests/Unit/Models/Indexable_Test.php
+++ b/tests/Unit/Models/Indexable_Test.php
@@ -59,7 +59,7 @@ public function test_save() {
[
'scheme' => 'https',
'host' => 'example.com',
- ]
+ ],
);
$this->instance->orm->expects( 'set' )
@@ -99,7 +99,7 @@ public function test_save_trailing_slash() {
[
'scheme' => 'https',
'host' => 'example.com',
- ]
+ ],
);
$this->instance->orm->expects( 'set' )->once()->with( 'permalink', $permalink_slash );
diff --git a/tests/Unit/Plans/Application/Add_Ons_Collector_Test.php b/tests/Unit/Plans/Application/Add_Ons_Collector_Test.php
index 363d608b61a..0dee27b524e 100644
--- a/tests/Unit/Plans/Application/Add_Ons_Collector_Test.php
+++ b/tests/Unit/Plans/Application/Add_Ons_Collector_Test.php
@@ -86,7 +86,7 @@ public function test_get() {
$this->premium,
$this->woo,
],
- $this->instance->get()
+ $this->instance->get(),
);
}
diff --git a/tests/Unit/Plans/User_Interface/Plans_Page_Integration_Test.php b/tests/Unit/Plans/User_Interface/Plans_Page_Integration_Test.php
index 67646e5a229..1c214a0dbf5 100644
--- a/tests/Unit/Plans/User_Interface/Plans_Page_Integration_Test.php
+++ b/tests/Unit/Plans/User_Interface/Plans_Page_Integration_Test.php
@@ -111,7 +111,7 @@ protected function set_up() {
'has_license' => true,
'get_ctb_action' => 'load-nfd-ctb',
'get_ctb_id' => 'f6a84663-465f-4cb5-8ba5-f7a6d72224b2',
- ]
+ ],
);
$this->add_ons_collector = new Add_Ons_Collector( $this->addon_manager, $premium_add_on );
@@ -128,7 +128,7 @@ protected function set_up() {
$this->short_link_helper,
$this->admin_conditional,
$this->promotion_manager,
- $this->duplicate_post_manager
+ $this->duplicate_post_manager,
);
}
@@ -255,7 +255,7 @@ public function test_add_page() {
[ $this->instance, 'display_page' ],
],
],
- $this->instance->add_page( [ 'wpseo_tools' ] )
+ $this->instance->add_page( [ 'wpseo_tools' ] ),
);
}
diff --git a/tests/Unit/Presentations/Indexable_Author_Archive_Presentation/Presentation_Instance_Builder.php b/tests/Unit/Presentations/Indexable_Author_Archive_Presentation/Presentation_Instance_Builder.php
index 97eb4e20a30..d2fbf3186d7 100644
--- a/tests/Unit/Presentations/Indexable_Author_Archive_Presentation/Presentation_Instance_Builder.php
+++ b/tests/Unit/Presentations/Indexable_Author_Archive_Presentation/Presentation_Instance_Builder.php
@@ -80,7 +80,7 @@ protected function set_instance() {
[
'model' => $this->indexable,
'context' => $this->context,
- ]
+ ],
);
$this->set_instance_dependencies( $this->instance );
diff --git a/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Canonical_Test.php b/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Canonical_Test.php
index 8dd19dd2e47..fa869ae2d15 100644
--- a/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Canonical_Test.php
+++ b/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Canonical_Test.php
@@ -68,7 +68,7 @@ public function test_without_canonical() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
Monkey\Functions\expect( 'is_date' )
@@ -115,7 +115,7 @@ public function test_with_pagination() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
Monkey\Functions\expect( 'is_date' )
@@ -162,7 +162,7 @@ public function test_without_canonical_with_dynamic_permalinks() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
$this->assertEquals( 'https://example.com/dynamic-permalink/', $this->instance->generate_canonical() );
@@ -207,7 +207,7 @@ public function test_with_pagination_with_dynamic_permalinks() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
$this->assertEquals( 'https://example.com/dynamic-permalink/2/', $this->instance->generate_canonical() );
diff --git a/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Presentation_Instance_Builder.php b/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Presentation_Instance_Builder.php
index 52d1e549efd..93a4f35e55c 100644
--- a/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Presentation_Instance_Builder.php
+++ b/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Presentation_Instance_Builder.php
@@ -89,7 +89,7 @@ protected function set_instance() {
$this->date,
$this->pagination,
$this->post,
- ]
+ ],
)
->shouldAllowMockingProtectedMethods()
->makePartial();
@@ -98,7 +98,7 @@ protected function set_instance() {
[
'model' => $this->indexable,
'context' => $this->context,
- ]
+ ],
);
$this->set_instance_dependencies( $this->instance );
diff --git a/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Twitter_Image_Test.php b/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Twitter_Image_Test.php
index 8274d09475f..08687f9b7c1 100644
--- a/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Twitter_Image_Test.php
+++ b/tests/Unit/Presentations/Indexable_Post_Type_Presentation/Twitter_Image_Test.php
@@ -67,7 +67,7 @@ public function test_generate_twitter_image() {
'twitter_image.jpg' => [
'url' => 'twitter_image.jpg',
],
- ]
+ ],
);
$this->assertEquals( 'twitter_image.jpg', $this->instance->generate_twitter_image() );
diff --git a/tests/Unit/Presentations/Indexable_Presentation/Presentation_Instance_Builder.php b/tests/Unit/Presentations/Indexable_Presentation/Presentation_Instance_Builder.php
index 4840f68774c..3d1e9635e28 100644
--- a/tests/Unit/Presentations/Indexable_Presentation/Presentation_Instance_Builder.php
+++ b/tests/Unit/Presentations/Indexable_Presentation/Presentation_Instance_Builder.php
@@ -54,7 +54,7 @@ protected function set_instance() {
[
'model' => $this->indexable,
'context' => $this->context,
- ]
+ ],
);
$this->set_instance_dependencies( $this->instance );
diff --git a/tests/Unit/Presentations/Indexable_Presentation/Robots_Test.php b/tests/Unit/Presentations/Indexable_Presentation/Robots_Test.php
index e907878d296..8f14897507b 100644
--- a/tests/Unit/Presentations/Indexable_Presentation/Robots_Test.php
+++ b/tests/Unit/Presentations/Indexable_Presentation/Robots_Test.php
@@ -71,7 +71,7 @@ public function test_generate_robots_with_filter_return_false() {
'index' => 'noindex',
'follow' => 'nofollow',
],
- $this->instance->generate_robots()
+ $this->instance->generate_robots(),
);
}
@@ -96,7 +96,7 @@ public function test_generate_robots_with_filter_returning_duplicates() {
'index' => 'noindex',
'follow' => 'follow',
],
- $this->instance->generate_robots()
+ $this->instance->generate_robots(),
);
}
@@ -121,13 +121,13 @@ public function test_generate_robots_with_array_filter() {
'max-image-preview' => 'max-image-preview:large',
'max-video-preview' => 'max-video-preview:-1',
],
- $this->instance
+ $this->instance,
)
->andReturn(
[
'index' => 'noindex',
'follow' => 'nofollow',
- ]
+ ],
);
$this->assertEquals(
@@ -135,7 +135,7 @@ public function test_generate_robots_with_array_filter() {
'index' => 'noindex',
'follow' => 'nofollow',
],
- $this->instance->generate_robots()
+ $this->instance->generate_robots(),
);
}
diff --git a/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Canonical_Test.php b/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Canonical_Test.php
index e10aab502e6..02d3390d3dd 100644
--- a/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Canonical_Test.php
+++ b/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Canonical_Test.php
@@ -68,7 +68,7 @@ public function test_without_canonical() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
Monkey\Functions\expect( 'is_date' )
@@ -116,7 +116,7 @@ public function test_with_pagination() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
Monkey\Functions\expect( 'is_date' )
@@ -163,7 +163,7 @@ public function test_without_canonical_with_dynamic_permalinks() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
$this->assertEquals( 'https://example.com/dynamic-permalink/', $this->instance->generate_canonical() );
@@ -209,7 +209,7 @@ public function test_with_pagination_with_dynamic_permalinks() {
->andReturnUsing(
static function ( $val ) {
return $val;
- }
+ },
);
$this->assertEquals( 'https://example.com/dynamic-permalink/2/', $this->instance->generate_canonical() );
diff --git a/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Presentation_Instance_Builder.php b/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Presentation_Instance_Builder.php
index 2dc94f35522..227830d6a7a 100644
--- a/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Presentation_Instance_Builder.php
+++ b/tests/Unit/Presentations/Indexable_Static_Home_Page_Presentation/Presentation_Instance_Builder.php
@@ -90,7 +90,7 @@ protected function set_instance() {
$this->date,
$this->pagination,
$this->post,
- ]
+ ],
)
->shouldAllowMockingProtectedMethods()
->makePartial();
@@ -99,7 +99,7 @@ protected function set_instance() {
[
'model' => $this->indexable,
'context' => $this->context,
- ]
+ ],
);
$this->set_instance_dependencies( $this->instance );
diff --git a/tests/Unit/Presentations/Indexable_Static_Posts_Page_Presentation/Presentation_Instance_Builder.php b/tests/Unit/Presentations/Indexable_Static_Posts_Page_Presentation/Presentation_Instance_Builder.php
index 692e23bde9a..d7bdbda2694 100644
--- a/tests/Unit/Presentations/Indexable_Static_Posts_Page_Presentation/Presentation_Instance_Builder.php
+++ b/tests/Unit/Presentations/Indexable_Static_Posts_Page_Presentation/Presentation_Instance_Builder.php
@@ -78,7 +78,7 @@ protected function set_instance() {
$this->post_type,
$this->date,
$this->pagination,
- $this->post
+ $this->post,
);
$this->instance = $instance->of( [ 'model' => $this->indexable ] );
diff --git a/tests/Unit/Presentations/Indexable_Term_Archive_Presentation/Presentation_Instance_Builder.php b/tests/Unit/Presentations/Indexable_Term_Archive_Presentation/Presentation_Instance_Builder.php
index 8831ae38aea..43e7a5c1148 100644
--- a/tests/Unit/Presentations/Indexable_Term_Archive_Presentation/Presentation_Instance_Builder.php
+++ b/tests/Unit/Presentations/Indexable_Term_Archive_Presentation/Presentation_Instance_Builder.php
@@ -78,7 +78,7 @@ protected function set_instance() {
[
$this->wp_query_wrapper,
$this->taxonomy,
- ]
+ ],
)
->makePartial()
->shouldAllowMockingProtectedMethods();
diff --git a/tests/Unit/Presentations/Presentation_Instance_Dependencies.php b/tests/Unit/Presentations/Presentation_Instance_Dependencies.php
index 1ca29289745..1da5161bff2 100644
--- a/tests/Unit/Presentations/Presentation_Instance_Dependencies.php
+++ b/tests/Unit/Presentations/Presentation_Instance_Dependencies.php
@@ -133,7 +133,7 @@ protected function set_instance_dependencies( Indexable_Presentation $presentati
$this->user,
$this->indexable_helper,
$this->permalink_helper,
- $this->values_helper
+ $this->values_helper,
);
$this->open_graph_image_generator = Mockery::mock(
@@ -143,7 +143,7 @@ protected function set_instance_dependencies( Indexable_Presentation $presentati
$this->image,
$this->options,
$this->url,
- ]
+ ],
);
$this->twitter_image_generator = Mockery::mock(
@@ -152,7 +152,7 @@ protected function set_instance_dependencies( Indexable_Presentation $presentati
$this->image,
$this->url,
$this->twitter,
- ]
+ ],
);
$presentation_instance->set_generators(
@@ -160,7 +160,7 @@ protected function set_instance_dependencies( Indexable_Presentation $presentati
new Open_Graph_Locale_Generator(),
$this->open_graph_image_generator,
$this->twitter_image_generator,
- Mockery::mock( Breadcrumbs_Generator::class )
+ Mockery::mock( Breadcrumbs_Generator::class ),
);
}
}
diff --git a/tests/Unit/Presenters/Admin/Alert_Presenter_Test.php b/tests/Unit/Presenters/Admin/Alert_Presenter_Test.php
index 8906904092d..5a7c468015c 100644
--- a/tests/Unit/Presenters/Admin/Alert_Presenter_Test.php
+++ b/tests/Unit/Presenters/Admin/Alert_Presenter_Test.php
@@ -44,7 +44,7 @@ public function test_construct() {
$this->assertInstanceOf(
WPSEO_Admin_Asset_Manager::class,
- $this->getPropertyValue( $test, 'asset_manager' )
+ $this->getPropertyValue( $test, 'asset_manager' ),
);
}
diff --git a/tests/Unit/Presenters/Admin/Help_Link_Presenter_Test.php b/tests/Unit/Presenters/Admin/Help_Link_Presenter_Test.php
index 68c9eb9e902..0efad42b5c7 100644
--- a/tests/Unit/Presenters/Admin/Help_Link_Presenter_Test.php
+++ b/tests/Unit/Presenters/Admin/Help_Link_Presenter_Test.php
@@ -45,7 +45,7 @@ public function test_construct() {
$this->assertInstanceOf(
WPSEO_Admin_Asset_Manager::class,
- $this->getPropertyValue( $test, 'asset_manager' )
+ $this->getPropertyValue( $test, 'asset_manager' ),
);
}
diff --git a/tests/Unit/Presenters/Admin/Indexing_Error_Presenter_Test.php b/tests/Unit/Presenters/Admin/Indexing_Error_Presenter_Test.php
index af342165d2d..7b97edf47fd 100644
--- a/tests/Unit/Presenters/Admin/Indexing_Error_Presenter_Test.php
+++ b/tests/Unit/Presenters/Admin/Indexing_Error_Presenter_Test.php
@@ -59,7 +59,7 @@ protected function set_up() {
$this->instance = new Indexing_Error_Presenter(
$this->short_link_helper,
$this->product_helper,
- $this->addon_manager
+ $this->addon_manager,
);
$this->short_link_helper
@@ -80,15 +80,15 @@ protected function set_up() {
public function test_constructor() {
self::assertInstanceOf(
Short_Link_Helper::class,
- self::getPropertyValue( $this->instance, 'short_link_helper' )
+ self::getPropertyValue( $this->instance, 'short_link_helper' ),
);
self::assertInstanceOf(
Product_Helper::class,
- self::getPropertyValue( $this->instance, 'product_helper' )
+ self::getPropertyValue( $this->instance, 'product_helper' ),
);
self::assertInstanceOf(
WPSEO_Addon_Manager::class,
- self::getPropertyValue( $this->instance, 'addon_manager' )
+ self::getPropertyValue( $this->instance, 'addon_manager' ),
);
}
@@ -117,7 +117,7 @@ public function test_present_not_premium_no_valid_premium_subscription() {
self::assertEquals(
'
Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please click the button again to re-start the process.
'
. '
Below are the technical details for the error. See this page for a more detailed explanation.
',
- $actual
+ $actual,
);
}
@@ -147,7 +147,7 @@ public function test_present_premium_no_valid_premium_subscription() {
'
Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. '
. 'Please make sure to activate your subscription in MyYoast by completing these steps.
'
. '
Below are the technical details for the error. See this page for a more detailed explanation.
',
- $actual
+ $actual,
);
}
@@ -177,7 +177,7 @@ public function test_present_premium_valid_premium_subscription() {
'
Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. '
. 'Please click the button again to re-start the process. If the problem persists, please contact support.
'
. '
Below are the technical details for the error. See this page for a more detailed explanation.
You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. We estimate this will take less than a minute.
Start SEO data optimization';
@@ -78,7 +78,7 @@ public function test_present_some_indexables() {
$instance = new Indexing_Notification_Presenter(
$this->short_link_helper,
500,
- ''
+ '',
);
$expected = '
You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. We estimate this will take a couple of minutes.
Start SEO data optimization';
@@ -111,7 +111,7 @@ public function test_present_many_indexables() {
$instance = new Indexing_Notification_Presenter(
$this->short_link_helper,
4000,
- 'A message to show in the notification.'
+ 'A message to show in the notification.',
);
$expected = '
You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. We estimate this could take a long time, due to the size of your site. As an alternative to waiting, you could:
Wait for a week or so, until Yoast SEO automatically processes most of your content in the background.