public function findOneOrThrow($adapterIdentifier, $adapterName, $objectType)
    {
        Assertion::string($adapterIdentifier);
        Assertion::notBlank($adapterIdentifier);
        Assertion::string($adapterName);
        Assertion::notBlank($adapterName);
        Assertion::string($objectType);
        Assertion::notBlank($objectType);

        $identity = $this->findOneBy([
            'objectType' => $objectType,
            'adapterIdentifier' => $adapterIdentifier,
            'adapterName' => $adapterName,
        ]);

        if (null === $identity) {
            throw new NotFoundException(printf(
                'Could not find identity for %s with identifier %s in %s.',
                $objectType,
                $adapterIdentifier,
                $adapterName
            ));
        }

        $this->validator->validate($identity);

        return $identity;
    }
public function findOneOrThrow($adapterIdentifier, $adapterName, $objectType)
    {
        Assertion::string($adapterIdentifier);
        Assertion::notBlank($adapterIdentifier);
        Assertion::string($adapterName);
        Assertion::notBlank($adapterName);
        Assertion::string($objectType);
        Assertion::notBlank($objectType);

        $identity = $this->findOneBy([
            'objectType' => $objectType,
            'adapterIdentifier' => $adapterIdentifier,
            'adapterName' => $adapterName,
        ]);

        if (null === $identity) {
            throw new NotFoundException(printf(
                'Could not find identity for %s with identifier %s in %s.',
                $objectType,
                $adapterIdentifier,
                $adapterName
            ));
        }

        $this->validator->validate($identity);

        return $identity;
    }
{@inheritdoc}