protected function convertItem($item, ConverterPipe $pipe)
    {
        $filterValue = $pipe->getFilterField() ? Vale::get($item, $pipe->getFilterField()) : $item;
        if ($pipe->getFilter() === null || $pipe->getFilter()->filter($filterValue) === true) {
            return $pipe->getConverter()->convert($item);
        }

        return $item;
    }
protected function convertItem($item, ConverterPipe $pipe)
    {
        $filterValue = $pipe->getFilterField() ? Vale::get($item, $pipe->getFilterField()) : $item;
        if ($pipe->getFilter() === null || $pipe->getFilter()->filter($filterValue) === true) {
            return $pipe->getConverter()->convert($item);
        }

        return $item;
    }
protected function convertItem ( $ item , ConverterPipe $ pipe ) { $ filterValue = $ pipe -> getFilterField ( ) ? Vale :: get ( $ item , $ pipe -> getFilterField ( ) ) : $ item ; if ( $ pipe -> getFilter ( ) === null || $ pipe -> getFilter ( ) -> filter ( $ filterValue ) === true ) { return $ pipe -> getConverter ( ) -> convert ( $ item ) ; } return $ item ; }
Applies the given converter to the given item either if no filter is given or if the filter returns `true`.

@param mixed         $item
@param ConverterPipe $pipe

@return mixed
Applies the given converter to the given item either if no filter is given or if the filter returns true .