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