Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /* * This file is part of Cachet. * * (c) Alt Three Services Limited * * For t..
Decoded Output download
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware;
use CachetHQ\Cachet\Settings\Repository;
use Closure;
use Illuminate\Http\Request;
/**
* This is the ready for use middleware class.
*
* @author Graham Campbell <[email protected]>
* @author James Brooks <[email protected]>
* @author Joseph Cohen <[email protected]>
*/
class ReadyForUse
{
/**
* The settings repository instance.
*
* @var \CachetHQ\Cachet\Settings\Repository
*/
protected $settings;
/**
* Creates a new setup already completed middleware instance.
*
* @param \CachetHQ\Cachet\Settings\Repository $settings
*
* @return void
*/
public function __construct(Repository $settings)
{
$this->settings = $settings;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle(Request $request, Closure $next)
{
if (!$request->is('setup*') && !$this->settings->get('app_name')) {
return cachet_redirect('setup');
}
return $next($request);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware;
use CachetHQ\Cachet\Settings\Repository;
use Closure;
use Illuminate\Http\Request;
/**
* This is the ready for use middleware class.
*
* @author Graham Campbell <[email protected]>
* @author James Brooks <[email protected]>
* @author Joseph Cohen <[email protected]>
*/
class ReadyForUse
{
/**
* The settings repository instance.
*
* @var \CachetHQ\Cachet\Settings\Repository
*/
protected $settings;
/**
* Creates a new setup already completed middleware instance.
*
* @param \CachetHQ\Cachet\Settings\Repository $settings
*
* @return void
*/
public function __construct(Repository $settings)
{
$this->settings = $settings;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle(Request $request, Closure $next)
{
if (!$request->is('setup*') && !$this->settings->get('app_name')) {
return cachet_redirect('setup');
}
return $next($request);
}
}
Function Calls
None |
Stats
MD5 | 7306653d568318fa6ae93428f9894119 |
Eval Count | 0 |
Decode Time | 79 ms |