← All changes
|
src/actions/importing/abstract-aioseo-importing-action.php
+6
-6
18.7
→
trunk
View file →
| @@ -12,10 +12,8 @@ | ||
| 12 | 12 | use Yoast\WP\SEO\Services\Importing\Aioseo\Aioseo_Robots_Transformer_Service; |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * Importing action interface. |
| 16 | - * | |
| 17 | - * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded | |
| 18 | 16 | */ |
| 19 | 17 | abstract class Abstract_Aioseo_Importing_Action implements Importing_Action_Interface { |
| 20 | 18 | |
| 21 | 19 | /** |
| @@ -22,9 +20,9 @@ | ||
| 22 | 20 | * The plugin the class deals with. |
| 23 | 21 | * |
| 24 | 22 | * @var string |
| 25 | 23 | */ |
| 26 | - const PLUGIN = null; | |
| 24 | + public const PLUGIN = null; | |
| 27 | 25 | |
| 28 | 26 | /** |
| 29 | 27 | * The type the class deals with. |
| 30 | 28 | * |
| @@ -29,9 +27,9 @@ | ||
| 29 | 27 | * The type the class deals with. |
| 30 | 28 | * |
| 31 | 29 | * @var string |
| 32 | 30 | */ |
| 33 | - const TYPE = null; | |
| 31 | + public const TYPE = null; | |
| 34 | 32 | |
| 35 | 33 | /** |
| 36 | 34 | * The AIOSEO helper. |
| 37 | 35 | * |
| @@ -112,8 +110,10 @@ | ||
| 112 | 110 | * |
| 113 | 111 | * @required |
| 114 | 112 | * |
| 115 | 113 | * @param Aioseo_Helper $aioseo_helper The AIOSEO helper. |
| 114 | + * | |
| 115 | + * @return void | |
| 116 | 116 | */ |
| 117 | 117 | public function set_aioseo_helper( Aioseo_Helper $aioseo_helper ) { |
| 118 | 118 | $this->aioseo_helper = $aioseo_helper; |
| 119 | 119 | } |
| @@ -125,9 +125,9 @@ | ||
| 125 | 125 | * |
| 126 | 126 | * @throws Exception If the PLUGIN constant is not set in the child class. |
| 127 | 127 | */ |
| 128 | 128 | public function get_plugin() { |
| 129 | - $class = \get_class( $this ); | |
| 129 | + $class = static::class; | |
| 130 | 130 | $plugin = $class::PLUGIN; |
| 131 | 131 | |
| 132 | 132 | if ( $plugin === null ) { |
| 133 | 133 | throw new Exception( 'Importing action without explicit plugin' ); |
| @@ -143,9 +143,9 @@ | ||
| 143 | 143 | * |
| 144 | 144 | * @throws Exception If the TYPE constant is not set in the child class. |
| 145 | 145 | */ |
| 146 | 146 | public function get_type() { |
| 147 | - $class = \get_class( $this ); | |
| 147 | + $class = static::class; | |
| 148 | 148 | $type = $class::TYPE; |
| 149 | 149 | |
| 150 | 150 | if ( $type === null ) { |
| 151 | 151 | throw new Exception( 'Importing action without explicit type' ); |