Skip to content

Commit

Permalink
fix bad rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
saeideng committed Jun 27, 2018
1 parent c6d8a60 commit 73839b5
Showing 1 changed file with 18 additions and 29 deletions.
47 changes: 18 additions & 29 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ public function bootstrap()
{
// Call parent to load bootstrap from files.
parent::bootstrap();

if (PHP_SAPI === 'cli') {
try {
$this->addPlugin('Bake');
} catch (MissingPluginException $e) {
// Do not halt if the plugin is missing
}

$this->addPlugin('Migrations');
}

/*
* Only try to load DebugKit in development mode
* Debug Kit should not be installed on a production system
*/
if (Configure::read('debug')) {
$this->addPlugin(\DebugKit\Plugin::class, ['bootstrap' => true]);
}
}

/**
Expand All @@ -61,33 +79,4 @@ public function middleware($middlewareQueue)

return $middlewareQueue;
}

/**
* Load all the application configuration and bootstrap logic.
*
* @return void
*/
public function bootstrap()
{
// Call parent to load configuration from '/bootstrap.php'.
parent::bootstrap();

if (PHP_SAPI === 'cli') {
try {
$this->addPlugin('Bake');
} catch (MissingPluginException $e) {
// Do not halt if the plugin is missing
}

$this->addPlugin('Migrations');
}

/*
* Only try to load DebugKit in development mode
* Debug Kit should not be installed on a production system
*/
if (Configure::read('debug')) {
$this->addPlugin(\DebugKit\Plugin::class, ['bootstrap' => true]);
}
}
}

0 comments on commit 73839b5

Please sign in to comment.