← All changes
|
src/actions/importing/deactivate-conflicting-plugins-action.php
+6
-4
18.5.1
→
trunk
View file →
| @@ -13,10 +13,8 @@ | ||
| 13 | 13 | use Yoast\WP\SEO\Services\Importing\Conflicting_Plugins_Service; |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Deactivates plug-ins that cause conflicts with Yoast SEO. |
| 17 | - * | |
| 18 | - * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded | |
| 19 | 17 | */ |
| 20 | 18 | class Deactivate_Conflicting_Plugins_Action extends Abstract_Aioseo_Importing_Action { |
| 21 | 19 | |
| 22 | 20 | /** |
| @@ -23,9 +21,9 @@ | ||
| 23 | 21 | * The plugin the class deals with. |
| 24 | 22 | * |
| 25 | 23 | * @var string |
| 26 | 24 | */ |
| 27 | - const PLUGIN = 'conflicting-plugins'; | |
| 25 | + public const PLUGIN = 'conflicting-plugins'; | |
| 28 | 26 | |
| 29 | 27 | /** |
| 30 | 28 | * The type the class deals with. |
| 31 | 29 | * |
| @@ -30,9 +28,9 @@ | ||
| 30 | 28 | * The type the class deals with. |
| 31 | 29 | * |
| 32 | 30 | * @var string |
| 33 | 31 | */ |
| 34 | - const TYPE = 'deactivation'; | |
| 32 | + public const TYPE = 'deactivation'; | |
| 35 | 33 | |
| 36 | 34 | /** |
| 37 | 35 | * The replacevar handler. |
| 38 | 36 | * |
| @@ -81,8 +79,10 @@ | ||
| 81 | 79 | } |
| 82 | 80 | |
| 83 | 81 | /** |
| 84 | 82 | * Get the total number of conflicting plugins. |
| 83 | + * | |
| 84 | + * @return int | |
| 85 | 85 | */ |
| 86 | 86 | public function get_total_unindexed() { |
| 87 | 87 | return \count( $this->get_detected_plugins() ); |
| 88 | 88 | } |
| @@ -99,8 +99,10 @@ | ||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * Deactivate conflicting plugins. |
| 103 | + * | |
| 104 | + * @return array | |
| 103 | 105 | */ |
| 104 | 106 | public function index() { |
| 105 | 107 | $detected_plugins = $this->get_detected_plugins(); |
| 106 | 108 | $this->conflicting_plugins->deactivate_conflicting_plugins( $detected_plugins ); |