Adapter/PlentymarketsAdapter/ServiceBus/QueryHandler/Category/FetchCategoryQueryHandler.php
public function handle(QueryInterface $query)
    {
        $identity = $this->identityService->findOneBy([
            'objectIdentifier' => $query->getObjectIdentifier(),
            'objectType' => Category::TYPE,
            'adapterName' => PlentymarketsAdapter::NAME,
        ]);

        if (null === $identity) {
            return [];
        }

        $elements = $this->client->request('GET', 'categories/' . $identity->getAdapterIdentifier(), [
            'with' => 'details,clients',
            'type' => 'item',
            'lang' => $this->languageHelper->getLanguagesQueryString(),
        ]);

        if (empty($elements)) {
            return [];
        }

        $element = array_shift($elements);

        $parsedElements = $this->categoryResponseParser->parse($element);

        return array_filter($parsedElements);
    }
public function handle(QueryInterface $query)
    {
        $identity = $this->identityService->findOneBy([
            'objectIdentifier' => $query->getObjectIdentifier(),
            'objectType' => Category::TYPE,
            'adapterName' => PlentymarketsAdapter::NAME,
        ]);

        if (null === $identity) {
            return [];
        }

        $elements = $this->client->request('GET', 'categories/' . $identity->getAdapterIdentifier(), [
            'with' => 'details,clients',
            'type' => 'item',
            'lang' => $this->languageHelper->getLanguagesQueryString(),
        ]);

        if (empty($elements)) {
            return [];
        }

        $element = array_shift($elements);

        $parsedElements = $this->categoryResponseParser->parse($element);

        return array_filter($parsedElements);
    }
{@inheritdoc}

@param FetchTransferObjectQuery $query