private function getPriceIndexDimensions($websiteId)
    {
        if (!array_key_exists($websiteId, $this->dimensionsByWebsite)) {
            $indexDimensions = $this->getAllPriceIndexDimensions();

            $relevantDimensions = [];
            foreach ($indexDimensions as $dimensions) {
                if (array_key_exists(WebsiteDimensionProvider::DIMENSION_NAME, $dimensions)) {
                    $websiteDimension = $dimensions[WebsiteDimensionProvider::DIMENSION_NAME];
                    if ((string) $websiteDimension->getValue() == $websiteId) {
                        $relevantDimensions[] = $dimensions;
                    }
                } else {
                    $relevantDimensions[] = $dimensions;
                }
            }

            $this->dimensionsByWebsite[$websiteId] = $relevantDimensions;
        }

        return $this->dimensionsByWebsite[$websiteId];
    }
private function getPriceIndexDimensions($websiteId)
    {
        if (!array_key_exists($websiteId, $this->dimensionsByWebsite)) {
            $indexDimensions = $this->getAllPriceIndexDimensions();

            $relevantDimensions = [];
            foreach ($indexDimensions as $dimensions) {
                if (array_key_exists(WebsiteDimensionProvider::DIMENSION_NAME, $dimensions)) {
                    $websiteDimension = $dimensions[WebsiteDimensionProvider::DIMENSION_NAME];
                    if ((string) $websiteDimension->getValue() == $websiteId) {
                        $relevantDimensions[] = $dimensions;
                    }
                } else {
                    $relevantDimensions[] = $dimensions;
                }
            }

            $this->dimensionsByWebsite[$websiteId] = $relevantDimensions;
        }

        return $this->dimensionsByWebsite[$websiteId];
    }
private function getPriceIndexDimensions ( $ websiteId ) { if ( ! array_key_exists ( $ websiteId , $ this -> dimensionsByWebsite ) ) { $ indexDimensions = $ this -> getAllPriceIndexDimensions ( ) ; $ relevantDimensions = [ ] ; foreach ( $ indexDimensions as $ dimensions ) { if ( array_key_exists ( WebsiteDimensionProvider :: DIMENSION_NAME , $ dimensions ) ) { $ websiteDimension = $ dimensions [ WebsiteDimensionProvider :: DIMENSION_NAME ] ; if ( ( string ) $ websiteDimension -> getValue ( ) == $ websiteId ) { $ relevantDimensions [ ] = $ dimensions ; } } else { $ relevantDimensions [ ] = $ dimensions ; } } $ this -> dimensionsByWebsite [ $ websiteId ] = $ relevantDimensions ; } return $ this -> dimensionsByWebsite [ $ websiteId ] ; }
Return price index dimensions applicable for the given website.

@param integer $websiteId Website id.

@return array
@SuppressWarnings(PHPMD.ElseExpression)
Return price index dimensions applicable for the given website .