diff --git a/src/admin/class-admin.php b/src/admin/class-admin.php index 716bbf0..9d6828d 100644 --- a/src/admin/class-admin.php +++ b/src/admin/class-admin.php @@ -42,21 +42,21 @@ class Admin { * @since 2.8.0 */ public function __construct( /** - * The ID of this plugin. - * - * @access private - * @since 2.8.0 - * @see Includes\Footnotes::$plugin_name - * @var string $plugin_name The ID of this plugin. - */ + * The ID of this plugin. + * + * @access private + * @since 2.8.0 + * @see Includes\Footnotes::$plugin_name + * @var string $plugin_name The ID of this plugin. + */ private string $plugin_name, /** - * The version of this plugin. - * - * @access private - * @since 2.8.0 - * @see Includes\Footnotes::$version - * @var string $version The current version of this plugin. - */ + * The version of this plugin. + * + * @access private + * @since 2.8.0 + * @see Includes\Footnotes::$version + * @var string $version The current version of this plugin. + */ private string $version ) { $this->load_dependencies(); diff --git a/src/admin/layout/class-engine.php b/src/admin/layout/class-engine.php index da6004d..8ed60d5 100644 --- a/src/admin/layout/class-engine.php +++ b/src/admin/layout/class-engine.php @@ -328,7 +328,7 @@ abstract class Engine { * @todo Review nonce verification. */ private function save_settings(): bool { - $l_arr_new_settings = array(); + $l_arr_new_settings = array(); $l_str_active_section_id = isset( $_GET['t'] ) ? wp_unslash( $_GET['t'] ) : array_key_first( $this->a_arr_sections ); $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; @@ -574,13 +574,13 @@ abstract class Engine { ); } return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_arr_data['value'], - $p_in_min, - $p_int_max - ); + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'], + $p_in_min, + $p_int_max + ); } } diff --git a/src/admin/layout/class-init.php b/src/admin/layout/class-init.php index dcf5528..a994064 100644 --- a/src/admin/layout/class-init.php +++ b/src/admin/layout/class-init.php @@ -48,19 +48,20 @@ class Init { /** * Initializes all WordPress hooks for the Plugin Settings. * - * * @since 1.5.0 * @since 2.8.0 Added `$plugin_name` parameter. */ - public function __construct( /** - * The ID of this plugin. - * - * @access private - * @var string $plugin_name The ID of this plugin. - * - * @since 2.8.0 - */ - private string $plugin_name ) { + public function __construct( + /** + * The ID of this plugin. + * + * @access private + * @var string $plugin_name The ID of this plugin. + * + * @since 2.8.0 + */ + private string $plugin_name + ) { $this->load_dependencies(); $this->settings_page = new Settings( $this->plugin_name ); diff --git a/src/includes/class-convert.php b/src/includes/class-convert.php index 9390037..59b955c 100644 --- a/src/includes/class-convert.php +++ b/src/includes/class-convert.php @@ -185,10 +185,10 @@ class Convert { $p_int_index = (int) $p_int_index; } // Return the whole arrow array. - if ($p_int_index < 0) { + if ( $p_int_index < 0 ) { return $l_arr_arrows; } - if ($p_int_index > count( $l_arr_arrows )) { + if ( $p_int_index > count( $l_arr_arrows ) ) { return $l_arr_arrows; } // Return a single arrow. diff --git a/src/includes/class-core.php b/src/includes/class-core.php index 70a9426..b9b230c 100644 --- a/src/includes/class-core.php +++ b/src/includes/class-core.php @@ -54,7 +54,7 @@ class Core { * * @var Loader $loader Maintains and registers all hooks for the plugin. */ - protected ?\footnotes\includes\Loader $loader = null; + protected \footnotes\includes\Loader $loader; /** * The unique identifier of this plugin diff --git a/src/includes/class-i18n.php b/src/includes/class-i18n.php index 539e5d3..c01d116 100644 --- a/src/includes/class-i18n.php +++ b/src/includes/class-i18n.php @@ -40,7 +40,7 @@ class i18n { load_plugin_textdomain( 'footnotes', false, - dirname(plugin_basename( __FILE__ ), 2) . '/languages/' + dirname( plugin_basename( __FILE__ ), 2 ) . '/languages/' ); } diff --git a/src/includes/class-settings.php b/src/includes/class-settings.php index 154daf3..50591de 100644 --- a/src/includes/class-settings.php +++ b/src/includes/class-settings.php @@ -1109,7 +1109,6 @@ class Settings { /** * Stores a singleton reference of this class. * - * * @since 1.5.0 */ private static ?\footnotes\includes\Settings $a_obj_instance = null; @@ -1344,7 +1343,6 @@ class Settings { /** * Returns a singleton of this class. * - * * @since 1.5.0 * @todo Remove? */ diff --git a/src/includes/class-template.php b/src/includes/class-template.php index b8f91dc..95b97a8 100644 --- a/src/includes/class-template.php +++ b/src/includes/class-template.php @@ -81,10 +81,10 @@ class Template { */ public function __construct( string $p_str_file_type, string $p_str_file_name, string $p_str_extension = 'html' ) { // No template file type and/or file name set. - if (empty( $p_str_file_type )) { + if ( empty( $p_str_file_type ) ) { return; } - if (empty( $p_str_file_name )) { + if ( empty( $p_str_file_name ) ) { return; } $this->plugin_directory = plugin_dir_path( __DIR__ ); diff --git a/src/public/class-parser.php b/src/public/class-parser.php index 65336f5..b2ea843 100644 --- a/src/public/class-parser.php +++ b/src/public/class-parser.php @@ -302,7 +302,7 @@ class Parser { if ( Includes\Convert::to_bool( Includes\Settings::instance()->get( \footnotes\includes\Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ) ) ) { add_filter( 'the_title', - fn(string $p_str_content): string => $this->footnotes_in_title( $p_str_content ), + fn( string $p_str_content): string => $this->footnotes_in_title( $p_str_content ), $l_int_the_title_priority ); } @@ -311,7 +311,7 @@ class Parser { if ( Includes\Convert::to_bool( Includes\Settings::instance()->get( \footnotes\includes\Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ) ) ) { add_filter( 'the_content', - fn(string $p_str_content): string => $this->footnotes_in_content( $p_str_content ), + fn( string $p_str_content): string => $this->footnotes_in_content( $p_str_content ), $l_int_the_content_priority ); @@ -329,7 +329,7 @@ class Parser { */ add_filter( 'term_description', - fn(string $p_str_content): string => $this->footnotes_in_content( $p_str_content ), + fn( string $p_str_content): string => $this->footnotes_in_content( $p_str_content ), $l_int_the_content_priority ); @@ -345,7 +345,7 @@ class Parser { */ add_filter( 'pum_popup_content', - fn(string $p_str_content): string => $this->footnotes_in_content( $p_str_content ), + fn( string $p_str_content): string => $this->footnotes_in_content( $p_str_content ), $l_int_the_content_priority ); } @@ -361,7 +361,7 @@ class Parser { */ add_filter( 'the_excerpt', - fn(string $p_str_excerpt): string => $this->footnotes_in_excerpt( $p_str_excerpt ), + fn( string $p_str_excerpt): string => $this->footnotes_in_excerpt( $p_str_excerpt ), $l_int_the_excerpt_priority ); } @@ -372,7 +372,7 @@ class Parser { */ add_filter( 'widget_title', - fn(string $p_str_content): string => $this->footnotes_in_widget_title( $p_str_content ), + fn( string $p_str_content): string => $this->footnotes_in_widget_title( $p_str_content ), $l_int_widget_title_priority ); } @@ -383,7 +383,7 @@ class Parser { */ add_filter( 'widget_text', - fn(string $p_str_content): string => $this->footnotes_in_widget_text( $p_str_content ), + fn( string $p_str_content): string => $this->footnotes_in_widget_text( $p_str_content ), $l_int_widget_text_priority ); } @@ -792,7 +792,7 @@ class Parser { $l_str_footnote_section_shortcode = Includes\Settings::instance()->get( \footnotes\includes\Settings::C_STR_FOOTNOTE_SECTION_SHORTCODE ); $l_int_footnote_section_shortcode_length = strlen( $l_str_footnote_section_shortcode ); - if ( !str_contains( $p_str_content, (string) $l_str_footnote_section_shortcode ) ) { + if ( ! str_contains( $p_str_content, (string) $l_str_footnote_section_shortcode ) ) { // phpcs:disable WordPress.PHP.YodaConditions.NotYoda // Appends the reference container if set to "post_end". @@ -1717,7 +1717,7 @@ class Parser { // If it is not, check which option is on. $l_str_separator_option = Includes\Settings::instance()->get( \footnotes\includes\Settings::C_STR_BACKLINKS_SEPARATOR_OPTION ); - $l_str_separator = match ($l_str_separator_option) { + $l_str_separator = match ($l_str_separator_option) { 'comma' => ',', 'semicolon' => ';', 'en_dash' => ' –', @@ -1740,7 +1740,7 @@ class Parser { // If it is not, check which option is on. $l_str_terminator_option = Includes\Settings::instance()->get( \footnotes\includes\Settings::C_STR_BACKLINKS_TERMINATOR_OPTION ); - $l_str_terminator = match ($l_str_terminator_option) { + $l_str_terminator = match ($l_str_terminator_option) { 'period' => '.', 'parenthesis' => ')', 'colon' => ':',