@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $this->booted = true; |
| 58 | 58 | |
| 59 | 59 | foreach ($this->providers as $provider) {
|
| 60 | - if ( ($provider instanceof ServiceProviderInterface) && method_exists($provider,'boot') ) {
|
|
| 60 | + if (($provider instanceof ServiceProviderInterface) && method_exists($provider, 'boot')) {
|
|
| 61 | 61 | $provider->boot($this); |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -73,26 +73,26 @@ discard block |
||
| 73 | 73 | public function run() : bool |
| 74 | 74 | {
|
| 75 | 75 | try {
|
| 76 | - if( !isset($this['response.emit'])){
|
|
| 77 | - $this['response.emit'] = $this->protect( function(){} );
|
|
| 76 | + if (!isset($this['response.emit'])) {
|
|
| 77 | + $this['response.emit'] = $this->protect(function() {} );
|
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $this->boot(); |
| 81 | 81 | $response = $this['kernel']->handle($this['request']); |
| 82 | 82 | |
| 83 | - call_user_func($this['response.emit'],$response); |
|
| 83 | + call_user_func($this['response.emit'], $response); |
|
| 84 | 84 | |
| 85 | 85 | $result = true; |
| 86 | 86 | } catch (Exception $e) {
|
| 87 | 87 | $result = false; |
| 88 | - if( isset($this['uSilex.errorManagement']) && !$this['uSilex.errorManagement']) {
|
|
| 88 | + if (isset($this['uSilex.errorManagement']) && !$this['uSilex.errorManagement']) {
|
|
| 89 | 89 | throw $e; |
| 90 | 90 | } elseif (isset($this['uSilex.errorManagement'])) {
|
| 91 | - call_user_func($this['uSilex.errorManagement'],$e); |
|
| 91 | + call_user_func($this['uSilex.errorManagement'], $e); |
|
| 92 | 92 | } else {
|
| 93 | - header('X-PHP-Response-Code: '. $e->getCode(), true, 500);
|
|
| 94 | - echo "Internal error. " . $e->getMessage(); |
|
| 95 | - $this['uSilex.panic.error'] = $e; |
|
| 93 | + header('X-PHP-Response-Code: '.$e->getCode(), true, 500);
|
|
| 94 | + echo "Internal error. ".$e->getMessage(); |
|
| 95 | + $this['uSilex.panic.error'] = $e; |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |