Xpressengine\Permission\Grant::makeValue PHP Метод

makeValue() защищенный Метод

Make value array from arguments
protected makeValue ( string | array $type, mixed $value = null ) : array
$type string | array value type
$value mixed values
Результат array
    protected function makeValue($type, $value = null)
    {
        if ($value === null) {
            $value = $type;
            if (is_array($value) === true) {
                $type = null;
            } else {
                $type = static::RATING_TYPE;
            }
        }
        if ($type !== null) {
            if ($type !== static::RATING_TYPE && is_array($value) !== true) {
                $value = [$value];
            }
            $value = [$type => $value];
        }
        return $value;
    }