Silber\Bouncer\Clipboard::parseGateArguments PHP Method

parseGateArguments() protected method

Parse the arguments we got from the gate.
protected parseGateArguments ( mixed $arguments, mixed $additional ) : array
$arguments mixed
$additional mixed
return array
    protected function parseGateArguments($arguments, $additional)
    {
        // The way arguments are passed into the gate's before callback has changed in Laravel
        // in the middle of the 5.2 release. Before, arguments were spread out. Now they're
        // all supplied in a single array instead. We will normalize it into two values.
        if (!is_null($additional)) {
            return [$arguments, $additional];
        }
        if (is_array($arguments)) {
            return [isset($arguments[0]) ? $arguments[0] : null, isset($arguments[1]) ? $arguments[1] : null];
        }
        return [$arguments, null];
    }