Passed
Branch master (ef0625)
by Alexander
04:19
created
src/components/Core/Http/Lenevor.php 3 patches
Indentation   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -40,176 +40,176 @@
 block discarded – undo
40 40
  */
41 41
 class Lenevor implements LenevorContract
42 42
 {
43
-	/**
44
-	 * The application implementation.
45
-	 * 
46
-	 * @var \Syscodes\Contracts\Core\Application $app
47
-	 */
48
-	protected $app;
43
+    /**
44
+     * The application implementation.
45
+     * 
46
+     * @var \Syscodes\Contracts\Core\Application $app
47
+     */
48
+    protected $app;
49 49
 	
50
-	/**
51
-	 * The bootstrap classes for the application.
52
-	 * 
53
-	 * @var array $bootstrappers
54
-	 */
55
-	protected $bootstrappers = [
56
-		\Syscodes\Core\Bootstrap\BootDetectEnvironment::class,
57
-		\Syscodes\Core\Bootstrap\BootConfiguration::class,
58
-		\Syscodes\Core\Bootstrap\BootHandleExceptions::class,
59
-		\Syscodes\Core\Bootstrap\BootRegisterFacades::class,
60
-		\Syscodes\Core\Bootstrap\BootRegisterProviders::class,
61
-		\Syscodes\Core\Bootstrap\BootProviders::class,
62
-	];
50
+    /**
51
+     * The bootstrap classes for the application.
52
+     * 
53
+     * @var array $bootstrappers
54
+     */
55
+    protected $bootstrappers = [
56
+        \Syscodes\Core\Bootstrap\BootDetectEnvironment::class,
57
+        \Syscodes\Core\Bootstrap\BootConfiguration::class,
58
+        \Syscodes\Core\Bootstrap\BootHandleExceptions::class,
59
+        \Syscodes\Core\Bootstrap\BootRegisterFacades::class,
60
+        \Syscodes\Core\Bootstrap\BootRegisterProviders::class,
61
+        \Syscodes\Core\Bootstrap\BootProviders::class,
62
+    ];
63 63
 	
64
-	/**
65
-	 * Activate the console mode.
66
-	 * 
67
-	 * @var bool $isCli
68
-	 */
69
-	protected $isCli = false;
70
-
71
-	/**
72
-	 * The router instance.
73
-	 * 
74
-	 * @var \Syscodes\Routing\Router $router
75
-	 */
76
-	protected $router;
77
-
78
-	/**
79
-	 * Total app execution time.
80
-	 * 
81
-	 * @var float $totalTime
82
-	 */
83
-	protected $totalTime;
84
-
85
-	/**
86
-	 * Constructor. Lenevor class instance.
87
-	 * 
88
-	 * @param  \Syscodes\Contracts\Core\Application  $app
89
-	 * @param  \Syscodes\Routing\Router  $router
90
-	 * 
91
-	 * @return void
92
-	 */
93
-	public function __construct(Application $app, Router $router)
94
-	{
95
-		$this->app    = $app;
96
-		$this->router = $router;
97
-	}
64
+    /**
65
+     * Activate the console mode.
66
+     * 
67
+     * @var bool $isCli
68
+     */
69
+    protected $isCli = false;
70
+
71
+    /**
72
+     * The router instance.
73
+     * 
74
+     * @var \Syscodes\Routing\Router $router
75
+     */
76
+    protected $router;
77
+
78
+    /**
79
+     * Total app execution time.
80
+     * 
81
+     * @var float $totalTime
82
+     */
83
+    protected $totalTime;
84
+
85
+    /**
86
+     * Constructor. Lenevor class instance.
87
+     * 
88
+     * @param  \Syscodes\Contracts\Core\Application  $app
89
+     * @param  \Syscodes\Routing\Router  $router
90
+     * 
91
+     * @return void
92
+     */
93
+    public function __construct(Application $app, Router $router)
94
+    {
95
+        $this->app    = $app;
96
+        $this->router = $router;
97
+    }
98 98
 	
99
-	/** 
100
-	 * Initialize CLI command.
101
-	 * 
102
-	 * @return bool
103
-	 */
104
-	public function initCli()
105
-	{
106
-		return $this->isCli = (new Http)->isCli();
107
-	}
99
+    /** 
100
+     * Initialize CLI command.
101
+     * 
102
+     * @return bool
103
+     */
104
+    public function initCli()
105
+    {
106
+        return $this->isCli = (new Http)->isCli();
107
+    }
108 108
 	 
109
-	/**
110
-	 * Initializes the framework, this can only be called once.
111
-	 * Launch the application.
112
-	 * 
113
-	 * @param  \Syscodes\http\Request  $request
114
-	 *
115
-	 * @return \Syscodes\Http\Response
116
-	 */
117
-	public function handle($request)
118
-	{
119
-		try
120
-		{
121
-			$response = $this->sendRequestThroughRouter($request);
122
-		}
123
-		catch (Throwable $e)
124
-		{
125
-			$this->reportException($e);
126
-
127
-			$response = $this->renderException($request, $e);
128
-		}		
129
-
130
-		return $response;
131
-	}
132
-
133
-	/**
134
-	 * Send the given request through the router.
135
-	 * 
136
-	 * @param  \Syscodes\Http\Request  $request
137
-	 * 
138
-	 * @return \Syscodes\Http\Response
139
-	 */
140
-	protected function sendRequestThroughRouter($request)
141
-	{
142
-		$this->app->instance('request', $request);  
143
-
144
-		Facade::clearResolvedInstance('request');
145
-
146
-		// Load configuration system
147
-		$this->bootstrap();
148
-
149
-		return (new Pipeline($this->app))
150
-				->send($request)
151
-				->then($this->dispatchToRouter());
152
-	}
153
-
154
-	/**
155
-	 * Bootstrap the application for HTTP requests.
156
-	 * 
157
-	 * @return void
158
-	 */
159
-	protected function bootstrap()
160
-	{		
161
-		if ( ! $this->app->hasBeenBootstrapped())
162
-		{
163
-			$this->app->bootstrapWith($this->bootstrappers());
164
-		}
165
-	}
166
-
167
-	/**
168
-	 * Get the bootstrap classes for the application.
169
-	 * 
170
-	 * @return array
171
-	 */
172
-	protected function bootstrappers()
173
-	{
174
-		return $this->bootstrappers;
175
-	}
176
-
177
-	/**
178
-	 * Get the dispatcher of routes.
179
-	 * 	  
180
-	 * @return \Closure
181
- 	 */
182
-	protected function dispatchToRouter()
183
-	{
184
-		return function ($request) {
185
-			$this->app->instance('request', $request);
186
-
187
-			return $this->router->dispatch($request);
188
-		};
189
-	}
190
-
191
-	/**
192
-	 * Report the exception to the exception handler.
193
-	 * 
194
-	 * @param  \Throwable  $e
195
-	 * 
196
-	 * @return void
197
-	 */
198
-	protected function reportException(Throwable $e)
199
-	{
200
-		return $this->app[ExceptionHandler::class]->report($e);
201
-	}
109
+    /**
110
+     * Initializes the framework, this can only be called once.
111
+     * Launch the application.
112
+     * 
113
+     * @param  \Syscodes\http\Request  $request
114
+     *
115
+     * @return \Syscodes\Http\Response
116
+     */
117
+    public function handle($request)
118
+    {
119
+        try
120
+        {
121
+            $response = $this->sendRequestThroughRouter($request);
122
+        }
123
+        catch (Throwable $e)
124
+        {
125
+            $this->reportException($e);
126
+
127
+            $response = $this->renderException($request, $e);
128
+        }		
129
+
130
+        return $response;
131
+    }
132
+
133
+    /**
134
+     * Send the given request through the router.
135
+     * 
136
+     * @param  \Syscodes\Http\Request  $request
137
+     * 
138
+     * @return \Syscodes\Http\Response
139
+     */
140
+    protected function sendRequestThroughRouter($request)
141
+    {
142
+        $this->app->instance('request', $request);  
143
+
144
+        Facade::clearResolvedInstance('request');
145
+
146
+        // Load configuration system
147
+        $this->bootstrap();
148
+
149
+        return (new Pipeline($this->app))
150
+                ->send($request)
151
+                ->then($this->dispatchToRouter());
152
+    }
153
+
154
+    /**
155
+     * Bootstrap the application for HTTP requests.
156
+     * 
157
+     * @return void
158
+     */
159
+    protected function bootstrap()
160
+    {		
161
+        if ( ! $this->app->hasBeenBootstrapped())
162
+        {
163
+            $this->app->bootstrapWith($this->bootstrappers());
164
+        }
165
+    }
166
+
167
+    /**
168
+     * Get the bootstrap classes for the application.
169
+     * 
170
+     * @return array
171
+     */
172
+    protected function bootstrappers()
173
+    {
174
+        return $this->bootstrappers;
175
+    }
176
+
177
+    /**
178
+     * Get the dispatcher of routes.
179
+     * 	  
180
+     * @return \Closure
181
+     */
182
+    protected function dispatchToRouter()
183
+    {
184
+        return function ($request) {
185
+            $this->app->instance('request', $request);
186
+
187
+            return $this->router->dispatch($request);
188
+        };
189
+    }
190
+
191
+    /**
192
+     * Report the exception to the exception handler.
193
+     * 
194
+     * @param  \Throwable  $e
195
+     * 
196
+     * @return void
197
+     */
198
+    protected function reportException(Throwable $e)
199
+    {
200
+        return $this->app[ExceptionHandler::class]->report($e);
201
+    }
202 202
 	
203
-	/**
204
-	 * Render the exception to a response.
205
-	 * 
206
-	 * @param  \Syscodes\Http\Request  $request
207
-	 * @param  \Throwable  $e
208
-	 * 
209
-	 * @return \Syscodes\Http\Response
210
-	 */
211
-	protected function renderException($request, Throwable $e)
212
-	{
213
-		return $this->app[ExceptionHandler::class]->render($request, $e);
214
-	}
215
- }
216 203
\ No newline at end of file
204
+    /**
205
+     * Render the exception to a response.
206
+     * 
207
+     * @param  \Syscodes\Http\Request  $request
208
+     * @param  \Throwable  $e
209
+     * 
210
+     * @return \Syscodes\Http\Response
211
+     */
212
+    protected function renderException($request, Throwable $e)
213
+    {
214
+        return $this->app[ExceptionHandler::class]->render($request, $e);
215
+    }
216
+    }
217 217
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
  	 */
182 182
 	protected function dispatchToRouter()
183 183
 	{
184
-		return function ($request) {
184
+		return function($request) {
185 185
 			$this->app->instance('request', $request);
186 186
 
187 187
 			return $this->router->dispatch($request);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,7 @@
 block discarded – undo
119 119
 		try
120 120
 		{
121 121
 			$response = $this->sendRequestThroughRouter($request);
122
-		}
123
-		catch (Throwable $e)
122
+		} catch (Throwable $e)
124 123
 		{
125 124
 			$this->reportException($e);
126 125
 
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/NotFoundHttpException.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -32,35 +32,35 @@
 block discarded – undo
32 32
  */
33 33
 class NotFoundHttpException extends HttpException
34 34
 {
35
-	/**
36
-	 * Get the HTTP status code.
37
-	 * 
38
-	 * @var int $code
39
-	 */
40
-	protected $code = 404;
35
+    /**
36
+     * Get the HTTP status code.
37
+     * 
38
+     * @var int $code
39
+     */
40
+    protected $code = 404;
41 41
 
42
-	/**
43
-	 * Initialize constructor. 
44
-	 * 
45
-	 * @param  string|null  $message  (null by default) 
46
-	 * @param  \Throwable|null  $previous  (null by default)
47
-	 * @param  int  $code  (0 by default)
48
-	 * @param  array  $headers
49
-	 * 
50
-	 * @return void
51
-	 */
52
-	public function __construct(
53
-		?string $message = null, 
54
-		?Throwable $previous = null, 
55
-		int $code = 0, 
56
-		array $headers = []
57
-	) {
42
+    /**
43
+     * Initialize constructor. 
44
+     * 
45
+     * @param  string|null  $message  (null by default) 
46
+     * @param  \Throwable|null  $previous  (null by default)
47
+     * @param  int  $code  (0 by default)
48
+     * @param  array  $headers
49
+     * 
50
+     * @return void
51
+     */
52
+    public function __construct(
53
+        ?string $message = null, 
54
+        ?Throwable $previous = null, 
55
+        int $code = 0, 
56
+        array $headers = []
57
+    ) {
58 58
         parent::__construct(
59
-			$this->code, 
60
-			$message, 
61
-			$previous, 
62
-			$headers, 
63
-			$code
64
-		);
65
-	}
59
+            $this->code, 
60
+            $message, 
61
+            $previous, 
62
+            $headers, 
63
+            $code
64
+        );
65
+    }
66 66
 }
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/ServiceUnavailableHttpException.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -36,42 +36,42 @@
 block discarded – undo
36 36
  */
37 37
 class ServiceUnavailableHttpException extends HttpException
38 38
 {
39
-	/**
40
-	 * Get the HTTP status code.
41
-	 * 
42
-	 * @var int $code
43
-	 */
44
-	protected $code = 503;
39
+    /**
40
+     * Get the HTTP status code.
41
+     * 
42
+     * @var int $code
43
+     */
44
+    protected $code = 503;
45 45
 
46
-	/**
47
-	 * Initialize constructor. 
48
-	 * 
49
-	 * @param  int|string|null  $retryAfter  The number of seconds or HTTP-date after 
50
-	 * 										 which the request may be retried  (null by default)
51
-	 * @param  string|null $message  (null by default)
52
-	 * @param  \Throwable|null  $previous  (null by default)
53
-	 * @param  int  $code  (0 by default)
54
-	 * @param  array  $headers
55
-	 * 
56
-	 * @return void
57
-	 */
58
-	public function __construct(
59
-		$retryAfter = null, 
60
-		string $message = null, 
61
-		Throwable $previous = null, 
62
-		?int $code = 0,
63
-		array $headers = []
64
-	) {		
65
-		if ($retryAfter) {
66
-			$headers['Retry-After'] = $retryAfter;
67
-		}
46
+    /**
47
+     * Initialize constructor. 
48
+     * 
49
+     * @param  int|string|null  $retryAfter  The number of seconds or HTTP-date after 
50
+     * 										 which the request may be retried  (null by default)
51
+     * @param  string|null $message  (null by default)
52
+     * @param  \Throwable|null  $previous  (null by default)
53
+     * @param  int  $code  (0 by default)
54
+     * @param  array  $headers
55
+     * 
56
+     * @return void
57
+     */
58
+    public function __construct(
59
+        $retryAfter = null, 
60
+        string $message = null, 
61
+        Throwable $previous = null, 
62
+        ?int $code = 0,
63
+        array $headers = []
64
+    ) {		
65
+        if ($retryAfter) {
66
+            $headers['Retry-After'] = $retryAfter;
67
+        }
68 68
 
69
-		parent::__construct(
70
-			$this->code, 
71
-			$message, 
72
-			$previous, 
73
-			$headers, 
74
-			$code
75
-		);
76
-	}
69
+        parent::__construct(
70
+            $this->code, 
71
+            $message, 
72
+            $previous, 
73
+            $headers, 
74
+            $code
75
+        );
76
+    }
77 77
 }
78 78
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/ServerErrorHttpException.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -32,35 +32,35 @@
 block discarded – undo
32 32
  */
33 33
 class ServerErrorHttpException extends HttpException
34 34
 {
35
-	/**
36
-	 * Get the HTTP status code.
37
-	 * 
38
-	 * @var int $code
39
-	 */
40
-	protected $code = 500;
35
+    /**
36
+     * Get the HTTP status code.
37
+     * 
38
+     * @var int $code
39
+     */
40
+    protected $code = 500;
41 41
 
42
-	/**
43
-	 * Initialize constructor. 
44
-	 * 
45
-	 * @param  string|null  $message  (null by default) 
46
-	 * @param  \Throwable|null  $previous  (null by default)
47
-	 * @param  int  $code  (0 by default)
48
-	 * @param  array  $headers
49
-	 * 
50
-	 * @return void
51
-	 */
52
-	public function __construct(
53
-		string $message = null, 
54
-		Throwable $previous = null, 
55
-		int $code = 0, 
56
-		array $headers = []
57
-	) {
42
+    /**
43
+     * Initialize constructor. 
44
+     * 
45
+     * @param  string|null  $message  (null by default) 
46
+     * @param  \Throwable|null  $previous  (null by default)
47
+     * @param  int  $code  (0 by default)
48
+     * @param  array  $headers
49
+     * 
50
+     * @return void
51
+     */
52
+    public function __construct(
53
+        string $message = null, 
54
+        Throwable $previous = null, 
55
+        int $code = 0, 
56
+        array $headers = []
57
+    ) {
58 58
         parent::__construct(
59
-			$this->code, 
60
-			$message, 
61
-			$previous, 
62
-			$headers, 
63
-			$code
64
-		);
65
-	}
59
+            $this->code, 
60
+            $message, 
61
+            $previous, 
62
+            $headers, 
63
+            $code
64
+        );
65
+    }
66 66
 }
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/BadRequestHttpException.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -32,35 +32,35 @@
 block discarded – undo
32 32
  */
33 33
 class BadRequestHttpException extends HttpException
34 34
 {
35
-	/**
36
-	 * Get the HTTP status code.
37
-	 * 
38
-	 * @var int $code
39
-	 */
40
-	protected $code = 400;
35
+    /**
36
+     * Get the HTTP status code.
37
+     * 
38
+     * @var int $code
39
+     */
40
+    protected $code = 400;
41 41
 
42
-	/**
43
-	 * Initialize constructor. 
44
-	 * 
45
-	 * @param  string|null  $message  (null by default) 
46
-	 * @param  \Throwable|null  $previous  (null by default)
47
-	 * @param  int  $code  (0 by default)
48
-	 * @param  array  $headers
49
-	 * 
50
-	 * @return void
51
-	 */
52
-	public function __construct(
53
-		string $message = null, 
54
-		Throwable $previous = null, 
55
-		int $code = 0, 
56
-		array $headers = []
57
-	) {
42
+    /**
43
+     * Initialize constructor. 
44
+     * 
45
+     * @param  string|null  $message  (null by default) 
46
+     * @param  \Throwable|null  $previous  (null by default)
47
+     * @param  int  $code  (0 by default)
48
+     * @param  array  $headers
49
+     * 
50
+     * @return void
51
+     */
52
+    public function __construct(
53
+        string $message = null, 
54
+        Throwable $previous = null, 
55
+        int $code = 0, 
56
+        array $headers = []
57
+    ) {
58 58
         parent::__construct(
59
-			$this->code, 
60
-			$message, 
61
-			$previous, 
62
-			$headers, 
63
-			$code
64
-		);
65
-	}
59
+            $this->code, 
60
+            $message, 
61
+            $previous, 
62
+            $headers, 
63
+            $code
64
+        );
65
+    }
66 66
 }
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/PreconditionFailedHttpException.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -33,35 +33,35 @@
 block discarded – undo
33 33
  */
34 34
 class PreconditionFailedHttpException extends HttpException
35 35
 {
36
-	/**
37
-	 * Get the HTTP status code.
38
-	 * 
39
-	 * @var int $code
40
-	 */
41
-	protected $code = 412;
36
+    /**
37
+     * Get the HTTP status code.
38
+     * 
39
+     * @var int $code
40
+     */
41
+    protected $code = 412;
42 42
 
43
-	/**
44
-	 * Initialize constructor. 
45
-	 * 
46
-	 * @param  string|null  $message  (null by default) 
47
-	 * @param  \Throwable|null  $previous  (null by default)
48
-	 * @param  int  $code  (0 by default)
49
-	 * @param  array  $headers
50
-	 * 
51
-	 * @return void
52
-	 */
53
-	public function __construct( 
54
-		string $message = null, 
55
-		Throwable $previous = null, 
56
-		int $code = 0, 
57
-		array $headers = []
58
-	) {
59
-		parent::__construct(
60
-			$this->code, 
61
-			$message, 
62
-			$previous, 
63
-			$headers, 
64
-			$code
65
-		);
66
-	}
43
+    /**
44
+     * Initialize constructor. 
45
+     * 
46
+     * @param  string|null  $message  (null by default) 
47
+     * @param  \Throwable|null  $previous  (null by default)
48
+     * @param  int  $code  (0 by default)
49
+     * @param  array  $headers
50
+     * 
51
+     * @return void
52
+     */
53
+    public function __construct( 
54
+        string $message = null, 
55
+        Throwable $previous = null, 
56
+        int $code = 0, 
57
+        array $headers = []
58
+    ) {
59
+        parent::__construct(
60
+            $this->code, 
61
+            $message, 
62
+            $previous, 
63
+            $headers, 
64
+            $code
65
+        );
66
+    }
67 67
 }
68 68
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/UnprocessableEntityHttpException.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -33,35 +33,35 @@
 block discarded – undo
33 33
  */
34 34
 class UnprocessableEntityHttpException extends HttpException
35 35
 {
36
-	/**
37
-	 * Get the HTTP status code.
38
-	 * 
39
-	 * @var int $code
40
-	 */
41
-	protected $code = 422;
36
+    /**
37
+     * Get the HTTP status code.
38
+     * 
39
+     * @var int $code
40
+     */
41
+    protected $code = 422;
42 42
 
43
-	/**
44
-	 * Initialize constructor. 
45
-	 * 
46
-	 * @param  string|null  $message  (null by default)
47
-	 * @param  \Throwable|null  $previous  (null by default)
48
-	 * @param  int  $code  (0 by default)
49
-	 * @param  array  $headers
50
-	 * 
51
-	 * @return void
52
-	 */
53
-	public function __construct(
54
-		string $message = null, 
55
-		Throwable $previous = null, 
56
-		int $code = 0,
57
-		array $headers = []
58
-	) {	
59
-		parent::__construct(
60
-			$this->code, 
61
-			$message, 
62
-			$previous, 
63
-			$headers, 
64
-			$code
65
-		);
66
-	}
43
+    /**
44
+     * Initialize constructor. 
45
+     * 
46
+     * @param  string|null  $message  (null by default)
47
+     * @param  \Throwable|null  $previous  (null by default)
48
+     * @param  int  $code  (0 by default)
49
+     * @param  array  $headers
50
+     * 
51
+     * @return void
52
+     */
53
+    public function __construct(
54
+        string $message = null, 
55
+        Throwable $previous = null, 
56
+        int $code = 0,
57
+        array $headers = []
58
+    ) {	
59
+        parent::__construct(
60
+            $this->code, 
61
+            $message, 
62
+            $previous, 
63
+            $headers, 
64
+            $code
65
+        );
66
+    }
67 67
 }
68 68
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/MethodNotAllowedHttpException.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -33,39 +33,39 @@
 block discarded – undo
33 33
  */
34 34
 class MethodNotAllowedHttpException extends HttpException
35 35
 {	
36
-	/**
37
-	 * Get the HTTP status code.
38
-	 * 
39
-	 * @var int $code
40
-	 */
41
-	protected $code = 405;
36
+    /**
37
+     * Get the HTTP status code.
38
+     * 
39
+     * @var int $code
40
+     */
41
+    protected $code = 405;
42 42
 	
43
-	/**
44
-	 * Initialize constructor. 
45
-	 * 
46
-	 * @param  array  $allow
47
-	 * @param  string|null  $message  (null by default) 
48
-	 * @param  \Throwable|null  $previous  (null by default)
49
-	 * @param  int  $code  (0 by default)
50
-	 * @param  array  $headers
51
-	 * 
52
-	 * @return void
53
-	 */
54
-	public function __construct(
55
-		array $allow = [], 
56
-		string $message = null, 
57
-		Throwable $previous = null, 
58
-		?int $code = 0, 
59
-		array $headers = []
60
-	) {
61
-		$headers['Allow'] = strtoupper(implode(', ', $allow));
43
+    /**
44
+     * Initialize constructor. 
45
+     * 
46
+     * @param  array  $allow
47
+     * @param  string|null  $message  (null by default) 
48
+     * @param  \Throwable|null  $previous  (null by default)
49
+     * @param  int  $code  (0 by default)
50
+     * @param  array  $headers
51
+     * 
52
+     * @return void
53
+     */
54
+    public function __construct(
55
+        array $allow = [], 
56
+        string $message = null, 
57
+        Throwable $previous = null, 
58
+        ?int $code = 0, 
59
+        array $headers = []
60
+    ) {
61
+        $headers['Allow'] = strtoupper(implode(', ', $allow));
62 62
 
63
-		parent::__construct(
64
-			$this->code, 
65
-			$message, 
66
-			$previous, 
67
-			$headers, 
68
-			$code
69
-		);
70
-	}
63
+        parent::__construct(
64
+            $this->code, 
65
+            $message, 
66
+            $previous, 
67
+            $headers, 
68
+            $code
69
+        );
70
+    }
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Core/Http/Exceptions/UnsupportedMediaTypeHttpException.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -33,35 +33,35 @@
 block discarded – undo
33 33
  */
34 34
 class UnsupportedMediaTypeHttpException extends HttpException
35 35
 {
36
-	/**
37
-	 * Get the HTTP status code.
38
-	 * 
39
-	 * @var int $code
40
-	 */
41
-	protected $code = 415;
36
+    /**
37
+     * Get the HTTP status code.
38
+     * 
39
+     * @var int $code
40
+     */
41
+    protected $code = 415;
42 42
 
43
-	/**
44
-	 * Initialize constructor. 
45
-	 * 
46
-	 * @param  string|null  $message  (null by default)
47
-	 * @param  \Throwable|null  $previous  (null by default)
48
-	 * @param  int  $code  (0 by default)
49
-	 * @param  array  $headers
50
-	 * 
51
-	 * @return void
52
-	 */
53
-	public function __construct(
54
-		string $message = null, 
55
-		Throwable $previous = null, 
56
-		int $code = 0,
57
-		array $headers = []
58
-	) {	
59
-		parent::__construct(
60
-			$this->code, 
61
-			$message, 
62
-			$previous, 
63
-			$headers, 
64
-			$code
65
-		);
66
-	}
43
+    /**
44
+     * Initialize constructor. 
45
+     * 
46
+     * @param  string|null  $message  (null by default)
47
+     * @param  \Throwable|null  $previous  (null by default)
48
+     * @param  int  $code  (0 by default)
49
+     * @param  array  $headers
50
+     * 
51
+     * @return void
52
+     */
53
+    public function __construct(
54
+        string $message = null, 
55
+        Throwable $previous = null, 
56
+        int $code = 0,
57
+        array $headers = []
58
+    ) {	
59
+        parent::__construct(
60
+            $this->code, 
61
+            $message, 
62
+            $previous, 
63
+            $headers, 
64
+            $code
65
+        );
66
+    }
67 67
 }
68 68
\ No newline at end of file
Please login to merge, or discard this patch.