public function getFilter(string $fieldName): ?Condition
    {
        [$name, $filters] = $this->getArrayAndKeyName($fieldName, 'filters');

        return array_first($filters, function ($filter) use ($name) {
            return $filter->getName() === $name;
        });
    }
public function getFilter(string $fieldName): ?Condition
    {
        [$name, $filters] = $this->getArrayAndKeyName($fieldName, 'filters');

        return array_first($filters, function ($filter) use ($name) {
            return $filter->getName() === $name;
        });
    }
public function getFilter ( string $ fieldName ) : ? Condition { [ $ name , $ filters ] = $ this -> getArrayAndKeyName ( $ fieldName , 'filters' ) ; return array_first ( $ filters , function ( $ filter ) use ( $ name ) { return $ filter -> getName ( ) === $ name ; } ) ; }
It returns single filter by field name

@param string $fieldName Condition field name

@throws InvalidArgumentException

@return Condition
It returns single filter by field name