Adapter/PlentymarketsAdapter/ResponseParser/Product/Price/PriceResponseParser.php
private function filterPriceConfiguration($priceConfigurations, $price)
    {
        $orderOrigin = (int) $this->configService->get('order_origin');

        $priceConfiguration = array_filter($priceConfigurations, function ($configuration) use ($price) {
            return $configuration['id'] === $price['salesPriceId'];
        });

        if ('true' === $this->configService->get('check_price_origin')) {
            $priceConfiguration = array_filter($priceConfiguration, function ($configuration) use ($price, $orderOrigin) {
                if ($this->checkIfOriginIsInReferrers($orderOrigin, (array) $configuration['referrers'])) {
                    return $configuration['id'] === $price['salesPriceId'];
                }

                return false;
            });
        }

        return $priceConfiguration;
    }
private function filterPriceConfiguration($priceConfigurations, $price)
    {
        $orderOrigin = (int) $this->configService->get('order_origin');

        $priceConfiguration = array_filter($priceConfigurations, function ($configuration) use ($price) {
            return $configuration['id'] === $price['salesPriceId'];
        });

        if ('true' === $this->configService->get('check_price_origin')) {
            $priceConfiguration = array_filter($priceConfiguration, function ($configuration) use ($price, $orderOrigin) {
                if ($this->checkIfOriginIsInReferrers($orderOrigin, (array) $configuration['referrers'])) {
                    return $configuration['id'] === $price['salesPriceId'];
                }

                return false;
            });
        }

        return $priceConfiguration;
    }
private function filterPriceConfiguration ( $ priceConfigurations , $ price ) { $ orderOrigin = ( int ) $ this -> configService -> get ( 'order_origin' ) ; $ priceConfiguration = array_filter ( $ priceConfigurations , function ( $ configuration ) use ( $ price ) { return $ configuration [ 'id' ] === $ price [ 'salesPriceId' ] ; } ) ; if ( 'true' === $ this -> configService -> get ( 'check_price_origin' ) ) { $ priceConfiguration = array_filter ( $ priceConfiguration , function ( $ configuration ) use ( $ price , $ orderOrigin ) { if ( $ this -> checkIfOriginIsInReferrers ( $ orderOrigin , ( array ) $ configuration [ 'referrers' ] ) ) { return $ configuration [ 'id' ] === $ price [ 'salesPriceId' ] ; } return false ; } ) ; } return $ priceConfiguration ; }
@param array $priceConfigurations
@param array $price

@return array
@param array $priceConfigurations @param array $price