for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of Gitamin.
*
* Copyright (C) 2015-2016 The Gitamin Team
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gitamin\Http\Middleware;
use Closure;
use Gitamin\Facades\Setting;
use Illuminate\Support\Facades\Redirect;
class AppIsInstalled
{
/**
* Run the app is installed middleware.
* We're verifying that Gitamin is correctly installed. If it is, then we're
* redirecting the user to the dashboard so they can use Gitamin.
* @param \Illuminate\Routing\Route $route
$route
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param \Closure $next
* @return mixed
public function handle($request, Closure $next)
if (Setting::get('app_name')) {
return Redirect::to('dashboard');
}
return $next($request);
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.