protected function applyFilter(callable $filter, Item $item)
    {
        $type = Reflection::firstParameterType($filter);

        if (! Reflection::itemMatchesType($item, $type)) {
            return;
        }

        $filter($item);
    }
protected function applyFilter(callable $filter, Item $item)
    {
        $type = Reflection::firstParameterType($filter);

        if (! Reflection::itemMatchesType($item, $type)) {
            return;
        }

        $filter($item);
    }
protected function applyFilter ( callable $ filter , Item $ item ) { $ type = Reflection :: firstParameterType ( $ filter ) ; if ( ! Reflection :: itemMatchesType ( $ item , $ type ) ) { return ; } $ filter ( $ item ) ; }
Apply a filter to an item. Returns the result of the filter.

@param callable $filter
@param \Spatie\Menu\Item $item
Apply a filter to an item . Returns the result of the filter .