protected function formatCallable(array $specs)
    {
        if (isset($specs['can'])) {
            $callback = json_encode($specs['can']);

            return "Gate::check({$callback})";
        }

        if (! isset($specs['do'])) {
            return '';
        }

        $callback = $specs['do'];

        if ($callback instanceof \Closure) {
            return 'Closure';
        }

        if (is_string($callback)) {
            if (strpos($callback, '@') !== false) {
                $callback = explode('@', $callback);
            } else {
                return $callback.'()';
            }
        }

        if (is_array($callback)) {
            return implode('::', $callback).'()';
        }

        return $callback;
    }
protected function formatCallable(array $specs)
    {
        if (isset($specs['can'])) {
            $callback = json_encode($specs['can']);

            return "Gate::check({$callback})";
        }

        if (! isset($specs['do'])) {
            return '';
        }

        $callback = $specs['do'];

        if ($callback instanceof \Closure) {
            return 'Closure';
        }

        if (is_string($callback)) {
            if (strpos($callback, '@') !== false) {
                $callback = explode('@', $callback);
            } else {
                return $callback.'()';
            }
        }

        if (is_array($callback)) {
            return implode('::', $callback).'()';
        }

        return $callback;
    }
protected function formatCallable ( array $ specs ) { if ( isset ( $ specs [ 'can' ] ) ) { $ callback = json_encode ( $ specs [ 'can' ] ) ; return "Gate::check({$callback})" ; } if ( ! isset ( $ specs [ 'do' ] ) ) { return '' ; } $ callback = $ specs [ 'do' ] ; if ( $ callback instanceof \ Closure ) { return 'Closure' ; } if ( is_string ( $ callback ) ) { if ( strpos ( $ callback , '@' ) !== false ) { $ callback = explode ( '@' , $ callback ) ; } else { return $ callback . '()' ; } } if ( is_array ( $ callback ) ) { return implode ( '::' , $ callback ) . '()' ; } return $ callback ; }
Format the callable callable.

@param  array  $specs
@return string
Format the callable callable .