Request.php
public function is(string $type)
    {
        if (!\function_exists($type = 'is_' . strtolower($type))) {
            throw new \InvalidArgumentException('Function is_$type() could not be found. Please check arguments supplied to is.');
        }

        $array = [];
        return $this->closure_array_walk(function ($key) use ($type, &$array) {
            $array[] = $type($key) ? $key : false;
        })($array);
    }
public function is(string $type)
    {
        if (!\function_exists($type = 'is_' . strtolower($type))) {
            throw new \InvalidArgumentException('Function is_$type() could not be found. Please check arguments supplied to is.');
        }

        $array = [];
        return $this->closure_array_walk(function ($key) use ($type, &$array) {
            $array[] = $type($key) ? $key : false;
        })($array);
    }
Use a built-in PHP "is_" method on a given set.
If a member of the set is not valid its value will be set to false
Possible options include:
a
array
bool
callable
double
dir
executable
file
finite
float
infinite
int
integer
iterable
link
long
nan
null
numeric
object
readable
real
scalar
soap_fault
string
resource
uploaded_file
is_writeable
is_writable

@param string $type
@return array|bool|mixed
@throws \InvalidArgumentException