Code Duplication    Length = 7-7 lines in 2 locations

packages/autoloader/src/class-plugins-handler.php 2 locations

@@ 85-91 (lines=7) @@
82
83
		// While it's true that the deactivating plugins are more than likely already in the active list
84
		// at this point, we should make sure in order to avoid any strange misbehavior.
85
		if ( $include_deactivating ) {
86
			// These actions contain plugins that are being deactivated during this request.
87
			$plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
88
			foreach ( $plugins as $path ) {
89
				$active_plugins[ $path ] = $path;
90
			}
91
		}
92
93
		// When the current plugin isn't considered "active" there's a problem.
94
		// Since we're here, the plugin is active and currently being loaded.
@@ 107-113 (lines=7) @@
104
		}
105
106
		// When deactivating plugins aren't desired we should entirely remove them from the active list.
107
		if ( ! $include_deactivating ) {
108
			// These actions contain plugins that are being deactivated during this request.
109
			$plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) );
110
			foreach ( $plugins as $path ) {
111
				unset( $active_plugins[ $path ] );
112
			}
113
		}
114
115
		// Transform the array so that we don't have to worry about the keys interacting with other array types later.
116
		return array_values( $active_plugins );