private function getEffectOnProduct($baseProductIds, $optimizedProductIds, $productId)
    {
        $result                   = 0;
        $baseProductPosition      = array_search($productId, $baseProductIds);
        $optimizedProductPosition = array_search($productId, $optimizedProductIds);

        if ($baseProductPosition === false && $optimizedProductPosition !== false) {
            $result = 1;
        } elseif ($baseProductPosition !== false && $optimizedProductPosition === false) {
            $result = -1;
        } elseif ($baseProductPosition !== false && $optimizedProductPosition !== false) {
            if ($baseProductPosition > $optimizedProductPosition) {
                $result = 1;
            }
            if ($baseProductPosition < $optimizedProductPosition) {
                $result = -1;
            }
        }

        return $result;
    }
private function getEffectOnProduct($baseProductIds, $optimizedProductIds, $productId)
    {
        $result                   = 0;
        $baseProductPosition      = array_search($productId, $baseProductIds);
        $optimizedProductPosition = array_search($productId, $optimizedProductIds);

        if ($baseProductPosition === false && $optimizedProductPosition !== false) {
            $result = 1;
        } elseif ($baseProductPosition !== false && $optimizedProductPosition === false) {
            $result = -1;
        } elseif ($baseProductPosition !== false && $optimizedProductPosition !== false) {
            if ($baseProductPosition > $optimizedProductPosition) {
                $result = 1;
            }
            if ($baseProductPosition < $optimizedProductPosition) {
                $result = -1;
            }
        }

        return $result;
    }
private function getEffectOnProduct ( $ baseProductIds , $ optimizedProductIds , $ productId ) { $ result = 0 ; $ baseProductPosition = array_search ( $ productId , $ baseProductIds ) ; $ optimizedProductPosition = array_search ( $ productId , $ optimizedProductIds ) ; if ( $ baseProductPosition === false && $ optimizedProductPosition !== false ) { $ result = 1 ; } elseif ( $ baseProductPosition !== false && $ optimizedProductPosition === false ) { $ result = - 1 ; } elseif ( $ baseProductPosition !== false && $ optimizedProductPosition !== false ) { if ( $ baseProductPosition > $ optimizedProductPosition ) { $ result = 1 ; } if ( $ baseProductPosition < $ optimizedProductPosition ) { $ result = - 1 ; } } return $ result ; }
Indicates if the product position have moved after optimization.

@param array $baseProductIds      The base product Ids
@param array $optimizedProductIds The optimized product Ids.
@param int   $productId           The current product.

@return int
Indicates if the product position have moved after optimization .