src/EntitySpecificationRepositoryTrait.php
public function matchOneOrNullResult($specification, ResultModifier $modifier = null)
    {
        try {
            return $this->matchSingleResult($specification, $modifier);
        } catch (Exception\NoResultException $e) {
            return;
        }
    }
public function matchOneOrNullResult($specification, ResultModifier $modifier = null)
    {
        try {
            return $this->matchSingleResult($specification, $modifier);
        } catch (Exception\NoResultException $e) {
            return;
        }
    }
public function matchOneOrNullResult ( $ specification , ResultModifier $ modifier = null ) { try { return $ this -> matchSingleResult ( $ specification , $ modifier ) ; } catch ( Exception \ NoResultException $ e ) { return ; } }
Get single result or null when you match with a Specification.

@param Filter|QueryModifier $specification
@param ResultModifier|null  $modifier

@throw Exception\NonUniqueException  If more than one result is found

@return mixed|null
Get single result or null when you match with a Specification .