refactor: run Rector NAMING setlist

This commit is contained in:
Ben Goldsworthy 2021-05-02 21:04:31 +01:00
parent c60f6265c1
commit 667d8dada9
4 changed files with 27 additions and 27 deletions

View file

@ -43,7 +43,7 @@ class Init {
*
* @since 1.5.0
*/
private Settings $settings_page;
private Settings $settings;
/**
* Initializes all WordPress hooks for the Plugin Settings.
@ -64,7 +64,7 @@ class Init {
) {
$this->load_dependencies();
$this->settings_page = new Settings( $this->plugin_name );
$this->settings = new Settings( $this->plugin_name );
// Register hooks/actions.
add_action(
@ -123,7 +123,7 @@ class Init {
*/
public function initialize_settings(): void {
Includes\Settings::instance()->register_settings();
$this->settings_page->register_sections();
$this->settings->register_sections();
}
/**
@ -139,9 +139,9 @@ class Init {
\footnotes\includes\Config::PLUGIN_PUBLIC_NAME,
'manage_options',
self::MAIN_MENU_SLUG,
fn() => $this->settings_page->display_content()
fn() => $this->settings->display_content()
);
$this->settings_page->register_sub_page();
$this->settings->register_sub_page();
}
// phpcs:disable WordPress.Security.NonceVerification.Missing

View file

@ -1231,7 +1231,7 @@ class Settings extends Engine {
* @todo Review in light of admin/public split.
*/
public function help(): void {
$footnotes = new General\General( $this->plugin_name, 'foo' );
$general = new General\General( $this->plugin_name, 'foo' );
// Load footnotes starting and end tag.
$footnote_starting_tag = $this->load_setting( \footnotes\includes\Settings::FOOTNOTES_SHORT_CODE_START );
@ -1268,7 +1268,7 @@ class Settings extends Engine {
'end' => $footnote_ending_tag['value'],
'example-code' => $example,
'example-string' => '<br/>' . __( 'will be displayed as:', 'footnotes' ),
'example' => $footnotes->task->exec( $example, true ),
'example' => $general->task->exec( $example, true ),
// Translators: %1$s, %2$s: anchor element with hyperlink to the Support Forum.
'information' => sprintf( __( 'For further information please check out our %1$sSupport Forum%2$s on WordPress.org.', 'footnotes' ), '<a href="https://wordpress.org/support/plugin/footnotes" target="_blank" class="footnote_plugin">', '</a>' ),
)
@ -1282,7 +1282,7 @@ class Settings extends Engine {
* the name of the filtered function.
* When this callback function was renamed, this call went unnoticed.
*/
$footnotes->task->footnotes_output_head();
$general->task->footnotes_output_head();
// Display template with replaced placeholders.
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped