Skip to content
Snippets Groups Projects
Commit 609b7730 authored by Erick Hitter's avatar Erick Hitter
Browse files

PHPCS

parent 9f4b2465
No related branches found
No related tags found
1 merge request!14Add native block-editor support
Pipeline #4804 failed
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
// Include singleton trait used by all classes. // Include singleton trait used by all classes.
require_once dirname( __FILE__ ) . '/inc/trait-singleton.php'; require_once dirname( __FILE__ ) . '/inc/class-external-permalinks-redux-singleton.php';
// Include block-editor class. // Include block-editor class.
require_once dirname( __FILE__ ) . '/inc/class-external-permalinks-redux-block-editor.php'; require_once dirname( __FILE__ ) . '/inc/class-external-permalinks-redux-block-editor.php';
...@@ -34,9 +34,7 @@ require_once dirname( __FILE__ ) . '/inc/class-external-permalinks-redux-block-e ...@@ -34,9 +34,7 @@ require_once dirname( __FILE__ ) . '/inc/class-external-permalinks-redux-block-e
* Class external_permalinks_redux. * Class external_permalinks_redux.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidClassName, Squiz.Commenting.ClassComment.Missing // phpcs:ignore PEAR.NamingConventions.ValidClassName, Squiz.Commenting.ClassComment.Missing
class external_permalinks_redux { class external_permalinks_redux extends External_Permalinks_Redux_Singleton{
use External_Permalinks_Redux_Singleton;
/** /**
* Redirect URL meta key. * Redirect URL meta key.
* *
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
/** /**
* Class Block_Editor. * Class Block_Editor.
*/ */
class External_Permalinks_Redux_Block_Editor { class External_Permalinks_Redux_Block_Editor extends External_Permalinks_Redux_Singleton {
use External_Permalinks_Redux_Singleton;
/** /**
* Set up class. * Set up class.
* *
......
<?php <?php
/** /**
* Singleton trait. * Singleton base class.
* *
* @package External_Permalinks_Redux * @package External_Permalinks_Redux
*/ */
trait External_Permalinks_Redux_Singleton { abstract class External_Permalinks_Redux_Singleton {
/** /**
* Singleton! * Singleton!
* *
...@@ -19,12 +19,12 @@ trait External_Permalinks_Redux_Singleton { ...@@ -19,12 +19,12 @@ trait External_Permalinks_Redux_Singleton {
* @return object * @return object
*/ */
public static function get_instance() { public static function get_instance() {
if ( ! isset( self::$instance ) ) { if ( ! isset( static::$instance ) ) {
self::$instance = new self(); static::$instance = new static();
self::$instance->_setup(); static::$instance->_setup();
} }
return self::$instance; return static::$instance;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment