Adapter/PlentymarketsAdapter/ServiceBus/QueryHandler/MediaCategory/FetchMediaCategoryHandler.php
public function handle(QueryInterface $query)
    {
        /**
         * @var FetchTransferObjectQuery $query
         */
        $result = [];

        $identity = $this->identityService->findOneBy([
            'objectIdentifier' => $query->getObjectIdentifier(),
            'objectType' => MediaCategory::TYPE,
            'adapterName' => PlentymarketsAdapter::NAME,
        ]);

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

        $caegories = $this->mediaCategoryHelper->getCategories();

        if (array_key_exists($identity->getAdapterIdentifier(), $caegories)) {
            $result[] = $this->responseParser->parse($caegories[$identity->getAdapterIdentifier()]);
        }

        return array_filter($result);
    }
public function handle(QueryInterface $query)
    {
        /**
         * @var FetchTransferObjectQuery $query
         */
        $result = [];

        $identity = $this->identityService->findOneBy([
            'objectIdentifier' => $query->getObjectIdentifier(),
            'objectType' => MediaCategory::TYPE,
            'adapterName' => PlentymarketsAdapter::NAME,
        ]);

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

        $caegories = $this->mediaCategoryHelper->getCategories();

        if (array_key_exists($identity->getAdapterIdentifier(), $caegories)) {
            $result[] = $this->responseParser->parse($caegories[$identity->getAdapterIdentifier()]);
        }

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