Skip to content
Permalink
Browse files

Use inline constructors.

Save on a few lines of code with inline constructors.
  • Loading branch information...
markstory committed Aug 31, 2013
1 parent 5819e20 commit 3cc489eb1f35a442f73a19c59b53d3fde03d8264
Showing with 3 additions and 6 deletions.
  1. +3 −6 App/Config/bootstrap.php
@@ -56,8 +56,7 @@
* that changes from configuration that does not. This makes deployment simpler.
*/
try {
$reader = new PhpConfig();
Configure::config('default', $reader);
Configure::config('default', new PhpConfig());
Configure::load('app.php', 'default', false);
} catch (\Exception $e) {
die('Unable to load Config/app.php ensure it exists.');
@@ -88,12 +87,10 @@
* Register application error and exception handlers.
*/
if (php_sapi_name() == 'cli') {
$errorHandler = new ConsoleErrorHandler(Configure::consume('Error'));
(new ConsoleErrorHandler(Configure::consume('Error')))->register();
} else {
$errorHandler = new ErrorHandler(Configure::consume('Error'));
(new ErrorHandler(Configure::consume('Error')))->register();
}
$errorHandler->register();
unset($errorHandler);
/**

0 comments on commit 3cc489e

Please sign in to comment.
You can’t perform that action at this time.