Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
This commit is contained in:
@@ -18,9 +18,8 @@ class ApiKey
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -22,8 +22,7 @@ class Authenticate
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
*
|
||||
* @param Guard $auth
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
@@ -34,9 +33,8 @@ class Authenticate
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -16,9 +16,8 @@ class CheckBoard
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return type Mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -14,9 +14,8 @@ class CheckRole
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -14,9 +14,8 @@ class CheckRoleAgent
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -14,9 +14,8 @@ class CheckRoleUser
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -12,9 +12,8 @@ class CheckUpdate
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
@@ -47,7 +46,7 @@ class CheckUpdate
|
||||
public function checkNewUpdate()
|
||||
{
|
||||
$notify = new BarNotification();
|
||||
if (!\Schema::hasTable('bar_notifications')) {
|
||||
if (! \Schema::hasTable('bar_notifications')) {
|
||||
$url = url('database-upgrade');
|
||||
//$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>";
|
||||
echo view('themes.default1.update.database', compact('url'));
|
||||
@@ -65,7 +64,7 @@ class CheckUpdate
|
||||
}
|
||||
}
|
||||
if (count($notifications) > 0) {
|
||||
if (!array_key_exists('new-version', $notifications)) {
|
||||
if (! array_key_exists('new-version', $notifications)) {
|
||||
$check_version = $this->checkNewVersion();
|
||||
if ($check_version == true) {
|
||||
$notify->create(['key' => 'new-version', 'value' => 'new version found please click <a href='.url('file-update').'><b>here to download</b></a>']);
|
||||
|
@@ -9,9 +9,8 @@ class Install
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -9,14 +9,13 @@ class IsInstalled
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (!isInstall()) {
|
||||
if (! isInstall()) {
|
||||
return $next($request);
|
||||
} else {
|
||||
if ($request->isJson()) {
|
||||
|
@@ -26,12 +26,11 @@ class JwtAuthenticate extends BaseMiddleware
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
|
@@ -9,9 +9,8 @@ class Redirect
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -17,8 +17,7 @@ class RedirectIfAuthenticated
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
*
|
||||
* @param Guard $auth
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
@@ -29,9 +28,8 @@ class RedirectIfAuthenticated
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@@ -12,9 +12,8 @@ class TicketViewURL
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
@@ -28,11 +27,11 @@ class TicketViewURL
|
||||
if (count(Request::all()) == 0) {
|
||||
return \Redirect::to('tickets?show%5B%5D=inbox&departments%5B%5D=All');
|
||||
} else {
|
||||
if (!array_key_exists('show', Request::all()) && !array_key_exists('departments', Request::all())) {
|
||||
if (! array_key_exists('show', Request::all()) && ! array_key_exists('departments', Request::all())) {
|
||||
return \Redirect::to($request_str.'&show%5B%5D=inbox&departments%5B%5D=All');
|
||||
} elseif (!array_key_exists('show', Request::all()) && array_key_exists('departments', Request::all())) {
|
||||
} elseif (! array_key_exists('show', Request::all()) && array_key_exists('departments', Request::all())) {
|
||||
return \Redirect::to($request_str.'&show%5B%5D=inbox');
|
||||
} elseif (array_key_exists('show', Request::all()) && !array_key_exists('departments', Request::all())) {
|
||||
} elseif (array_key_exists('show', Request::all()) && ! array_key_exists('departments', Request::all())) {
|
||||
return \Redirect::to($request_str.'&departments%5B%5D=All');
|
||||
} else {
|
||||
// do nothing
|
||||
|
@@ -30,9 +30,8 @@ class VerifyCsrfToken extends BaseVerifier
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
Reference in New Issue
Block a user