protected function is_needed( $dependency, $context ) {
		$is_needed = array_key_exists( 'is_needed', $dependency )
			? $dependency['is_needed']
			: null;

		if ( null === $is_needed ) {
			return true;
		}

		return is_callable( $is_needed ) && $is_needed( $context );
	}
protected function is_needed( $dependency, $context ) {
		$is_needed = array_key_exists( 'is_needed', $dependency )
			? $dependency['is_needed']
			: null;

		if ( null === $is_needed ) {
			return true;
		}

		return is_callable( $is_needed ) && $is_needed( $context );
	}
protected function is_needed ( $ dependency , $ context ) { $ is_needed = array_key_exists ( 'is_needed' , $ dependency ) ? $ dependency [ 'is_needed' ] : null ; if ( null === $ is_needed ) { return true ; } return is_callable ( $ is_needed ) && $ is_needed ( $ context ) ; }
Check whether a specific dependency is needed.

@since 0.1.0

@param array $dependency Configuration of the dependency to check.
@param mixed $context    Context to pass to the dependencies.
Contains the type of the dependency at key
'dependency_type'.
@return bool Whether it is needed or not.
Check whether a specific dependency is needed .