cleaning up code.
This commit is contained in:
parent
fc927aa63a
commit
1351a2b189
|
@ -36,7 +36,9 @@ public function generate($arguments = array())
|
||||||
// specified through the CLI.
|
// specified through the CLI.
|
||||||
$key = Str::random(array_get($arguments, 0, 32));
|
$key = Str::random(array_get($arguments, 0, 32));
|
||||||
|
|
||||||
$config = str_replace("'key' => '',", "'key' => '{$key}',", File::get($this->path), $count);
|
$config = File::get($this->path);
|
||||||
|
|
||||||
|
$config = str_replace("'key' => '',", "'key' => '{$key}',", $config, $count);
|
||||||
|
|
||||||
File::put($this->path, $config);
|
File::put($this->path, $config);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Route extends Task {
|
||||||
* @param array $arguments
|
* @param array $arguments
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function run($arguments = array())
|
public function call($arguments = array())
|
||||||
{
|
{
|
||||||
if ( ! count($arguments) == 2)
|
if ( ! count($arguments) == 2)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ public function run($arguments = array())
|
||||||
|
|
||||||
// First we'll set the request method and URI in the $_SERVER array,
|
// First we'll set the request method and URI in the $_SERVER array,
|
||||||
// which will allow the framework to retrieve the proper method
|
// which will allow the framework to retrieve the proper method
|
||||||
// and URI using the normal URI and Request classes.
|
// and URI using the URI and Request classes.
|
||||||
$_SERVER['REQUEST_METHOD'] = strtoupper($arguments[0]);
|
$_SERVER['REQUEST_METHOD'] = strtoupper($arguments[0]);
|
||||||
|
|
||||||
$_SERVER['REQUEST_URI'] = $arguments[1];
|
$_SERVER['REQUEST_URI'] = $arguments[1];
|
||||||
|
|
|
@ -69,8 +69,7 @@ public function sweep($arguments = array())
|
||||||
|
|
||||||
// If the driver implements the "Sweeper" interface, we know that
|
// If the driver implements the "Sweeper" interface, we know that
|
||||||
// it can sweep expired sessions from storage. Not all drivers
|
// it can sweep expired sessions from storage. Not all drivers
|
||||||
// need be sweepers, as stores like Memcached and APC will
|
// need be sweepers since they do their own.
|
||||||
// perform their own garbage collection.
|
|
||||||
if ($driver instanceof Sweeper)
|
if ($driver instanceof Sweeper)
|
||||||
{
|
{
|
||||||
$lifetime = Config::get('session.lifetime');
|
$lifetime = Config::get('session.lifetime');
|
||||||
|
|
|
@ -45,8 +45,7 @@ public static function execute($table)
|
||||||
|
|
||||||
// Once we have the statements, we will cast them to an array
|
// Once we have the statements, we will cast them to an array
|
||||||
// even though not all of the commands return an array just
|
// even though not all of the commands return an array just
|
||||||
// in case the command needs to run more than one query to
|
// in case the command needs to run more than one query.
|
||||||
// do what it needs to do.
|
|
||||||
foreach ((array) $statements as $statement)
|
foreach ((array) $statements as $statement)
|
||||||
{
|
{
|
||||||
$connection->statement($statement);
|
$connection->statement($statement);
|
||||||
|
|
Loading…
Reference in New Issue