src/Filter.php
/**
     * @param array $defaults
     *
     * @return array
     * @throws \Kyslik\LaravelFilterable\Exceptions\InvalidArgumentException
     */
@param array $defaults
@return array
@throws \Kyslik\LaravelFilterable\Exceptions\InvalidArgumentException
@param array $defaults @return array @throws \ Kyslik \ LaravelFilterable \ Exceptions \ InvalidArgumentException
protected function appendableDefaults(array $defaults): array
    {
        $appends  = [];
        $filters  = $this->availableFilters();
        $defaults = force_assoc_array($defaults, '');
        foreach ($defaults as $filter => $default) {
            if ( ! in_array($filter, $filters)) {
                throw new InvalidArgumentException('Attempting to use default filter \''.$filter.'\', with no effect.');
            }
            $appends[$filter] = $default;
        }
        return $appends;
    }
protected function appendableDefaults ( array $ defaults ) : array { $ appends = [ ] ; $ filters = $ this -> availableFilters ( ) ; $ defaults = force_assoc_array ( $ defaults , '' ) ; foreach ( $ defaults as $ filter => $ default ) { if ( ! in_array ( $ filter , $ filters ) ) { throw new InvalidArgumentException ( 'Attempting to use default filter \'' . $ filter . '\', with no effect.' ) ; } $ appends [ $ filter ] = $ default ; } return $ appends ; }
@param array $defaults
 @return array
 @throws \Kyslik\LaravelFilterable\Exceptions\InvalidArgumentException
@param array $defaults @return array @throws \ Kyslik \ LaravelFilterable \ Exceptions \ InvalidArgumentException