Classes/Domain/Repository/DomainRepository.php
public function findOneByDomainName(string $domainName): array
    {
        $queryBuilder = $this->createQuery();

        return (array)$queryBuilder->select('*')
            ->from($this->getTableName())
            ->where($queryBuilder->expr()->eq(
                'domainName',
                $queryBuilder->createNamedParameter($domainName, \PDO::PARAM_STR)
            ))
            ->execute()
            ->fetch();
    }
public function findOneByDomainName(string $domainName): array
    {
        $queryBuilder = $this->createQuery();

        return (array)$queryBuilder->select('*')
            ->from($this->getTableName())
            ->where($queryBuilder->expr()->eq(
                'domainName',
                $queryBuilder->createNamedParameter($domainName, \PDO::PARAM_STR)
            ))
            ->execute()
            ->fetch();
    }
public function findOneByDomainName ( string $ domainName ) : array { $ queryBuilder = $ this -> createQuery ( ) ; return ( array ) $ queryBuilder -> select ( '*' ) -> from ( $ this -> getTableName ( ) ) -> where ( $ queryBuilder -> expr ( ) -> eq ( 'domainName' , $ queryBuilder -> createNamedParameter ( $ domainName , \ PDO :: PARAM_STR ) ) ) -> execute ( ) -> fetch ( ) ; }
Find one record by domainName.

@param string $domainName

@return array
Find one record by domainName .