@@ -33,35 +33,35 @@ |
||
33 | 33 | */ |
34 | 34 | class AccessDeniedHttpException extends HttpException |
35 | 35 | { |
36 | - /** |
|
37 | - * Get the HTTP status code. |
|
38 | - * |
|
39 | - * @var int $code |
|
40 | - */ |
|
41 | - protected $code = 403; |
|
36 | + /** |
|
37 | + * Get the HTTP status code. |
|
38 | + * |
|
39 | + * @var int $code |
|
40 | + */ |
|
41 | + protected $code = 403; |
|
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 | - ) { |
|
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 | 59 | parent::__construct( |
60 | - $this->code, |
|
61 | - $message, |
|
62 | - $previous, |
|
63 | - $headers, |
|
64 | - $code |
|
65 | - ); |
|
66 | - } |
|
60 | + $this->code, |
|
61 | + $message, |
|
62 | + $previous, |
|
63 | + $headers, |
|
64 | + $code |
|
65 | + ); |
|
66 | + } |
|
67 | 67 | } |
68 | 68 | \ No newline at end of file |
@@ -33,35 +33,35 @@ |
||
33 | 33 | */ |
34 | 34 | class LengthRequiredHttpException extends HttpException |
35 | 35 | { |
36 | - /** |
|
37 | - * Get the HTTP status code. |
|
38 | - * |
|
39 | - * @var int $code |
|
40 | - */ |
|
41 | - protected $code = 411; |
|
36 | + /** |
|
37 | + * Get the HTTP status code. |
|
38 | + * |
|
39 | + * @var int $code |
|
40 | + */ |
|
41 | + protected $code = 411; |
|
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 |
@@ -32,41 +32,41 @@ |
||
32 | 32 | */ |
33 | 33 | class TooManyRequestsHttpException extends HttpException |
34 | 34 | { |
35 | - /** |
|
36 | - * Get the HTTP status code. |
|
37 | - * |
|
38 | - * @var int $code |
|
39 | - */ |
|
40 | - protected $code = 429; |
|
35 | + /** |
|
36 | + * Get the HTTP status code. |
|
37 | + * |
|
38 | + * @var int $code |
|
39 | + */ |
|
40 | + protected $code = 429; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Initialize constructor. |
|
44 | - * |
|
45 | - * @param int|string|null $retryAfter The number of seconds or HTTP-date after |
|
46 | - * which the request may be retried (null by default) |
|
47 | - * @param string|null $message (null by default) |
|
48 | - * @param \Throwable|null $previous (null by default) |
|
49 | - * @param array $headers |
|
50 | - * |
|
51 | - * @return void |
|
52 | - */ |
|
53 | - public function __construct( |
|
54 | - $retryAfter = null, |
|
55 | - string $message = null, |
|
56 | - Throwable $previous = null, |
|
57 | - ?int $code = 0, |
|
58 | - array $headers = [] |
|
59 | - ) { |
|
60 | - if ($retryAfter) { |
|
61 | - $headers['Retry-After'] = $retryAfter; |
|
62 | - } |
|
42 | + /** |
|
43 | + * Initialize constructor. |
|
44 | + * |
|
45 | + * @param int|string|null $retryAfter The number of seconds or HTTP-date after |
|
46 | + * which the request may be retried (null by default) |
|
47 | + * @param string|null $message (null by default) |
|
48 | + * @param \Throwable|null $previous (null by default) |
|
49 | + * @param array $headers |
|
50 | + * |
|
51 | + * @return void |
|
52 | + */ |
|
53 | + public function __construct( |
|
54 | + $retryAfter = null, |
|
55 | + string $message = null, |
|
56 | + Throwable $previous = null, |
|
57 | + ?int $code = 0, |
|
58 | + array $headers = [] |
|
59 | + ) { |
|
60 | + if ($retryAfter) { |
|
61 | + $headers['Retry-After'] = $retryAfter; |
|
62 | + } |
|
63 | 63 | |
64 | - parent::__construct( |
|
65 | - $this->code, |
|
66 | - $message, |
|
67 | - $previous, |
|
68 | - $headers, |
|
69 | - $code |
|
70 | - ); |
|
71 | - } |
|
64 | + parent::__construct( |
|
65 | + $this->code, |
|
66 | + $message, |
|
67 | + $previous, |
|
68 | + $headers, |
|
69 | + $code |
|
70 | + ); |
|
71 | + } |
|
72 | 72 | } |
73 | 73 | \ No newline at end of file |
@@ -32,73 +32,73 @@ |
||
32 | 32 | */ |
33 | 33 | class HttpException extends LenevorException |
34 | 34 | { |
35 | - /** |
|
36 | - * Loader the Status Code HTTP. |
|
37 | - * |
|
38 | - * @var int $code |
|
39 | - */ |
|
40 | - protected $code; |
|
35 | + /** |
|
36 | + * Loader the Status Code HTTP. |
|
37 | + * |
|
38 | + * @var int $code |
|
39 | + */ |
|
40 | + protected $code; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Loader the headers HTTP. |
|
44 | - * |
|
45 | - * @var array $headers |
|
46 | - */ |
|
47 | - protected $headers; |
|
42 | + /** |
|
43 | + * Loader the headers HTTP. |
|
44 | + * |
|
45 | + * @var array $headers |
|
46 | + */ |
|
47 | + protected $headers; |
|
48 | 48 | |
49 | - /** |
|
50 | - * Initialize constructor. |
|
51 | - * |
|
52 | - * @param int $statusCode |
|
53 | - * @param string $message |
|
54 | - * @param \Throwable $previous |
|
55 | - * @param array $headers |
|
56 | - * @param int $code |
|
57 | - * |
|
58 | - * @return void |
|
59 | - */ |
|
60 | - public function __construct( |
|
61 | - int $statusCode, |
|
62 | - string $message = null, |
|
63 | - Throwable $previous = null, |
|
64 | - array $headers = [], |
|
65 | - ?int $code = 0 |
|
66 | - ) { |
|
67 | - $this->headers = $headers; |
|
68 | - $this->code = $statusCode; |
|
49 | + /** |
|
50 | + * Initialize constructor. |
|
51 | + * |
|
52 | + * @param int $statusCode |
|
53 | + * @param string $message |
|
54 | + * @param \Throwable $previous |
|
55 | + * @param array $headers |
|
56 | + * @param int $code |
|
57 | + * |
|
58 | + * @return void |
|
59 | + */ |
|
60 | + public function __construct( |
|
61 | + int $statusCode, |
|
62 | + string $message = null, |
|
63 | + Throwable $previous = null, |
|
64 | + array $headers = [], |
|
65 | + ?int $code = 0 |
|
66 | + ) { |
|
67 | + $this->headers = $headers; |
|
68 | + $this->code = $statusCode; |
|
69 | 69 | |
70 | - parent::__construct($message, $code, $previous); |
|
71 | - } |
|
70 | + parent::__construct($message, $code, $previous); |
|
71 | + } |
|
72 | 72 | |
73 | - /** |
|
74 | - * Get Status Code headers. |
|
75 | - * |
|
76 | - * @return int |
|
77 | - */ |
|
78 | - public function getStatusCode() |
|
79 | - { |
|
80 | - return $this->code; |
|
81 | - } |
|
73 | + /** |
|
74 | + * Get Status Code headers. |
|
75 | + * |
|
76 | + * @return int |
|
77 | + */ |
|
78 | + public function getStatusCode() |
|
79 | + { |
|
80 | + return $this->code; |
|
81 | + } |
|
82 | 82 | |
83 | - /** |
|
84 | - * Get response headers. |
|
85 | - * |
|
86 | - * @return array |
|
87 | - */ |
|
88 | - public function getHeaders() |
|
89 | - { |
|
90 | - return $this->headers; |
|
91 | - } |
|
83 | + /** |
|
84 | + * Get response headers. |
|
85 | + * |
|
86 | + * @return array |
|
87 | + */ |
|
88 | + public function getHeaders() |
|
89 | + { |
|
90 | + return $this->headers; |
|
91 | + } |
|
92 | 92 | |
93 | - /** |
|
94 | - * Set response headers. |
|
95 | - * |
|
96 | - * @param array $headers Response headers |
|
97 | - * |
|
98 | - * @return mixed |
|
99 | - */ |
|
100 | - public function setHeaders(array $headers) |
|
101 | - { |
|
102 | - $this->headers = $headers; |
|
103 | - } |
|
93 | + /** |
|
94 | + * Set response headers. |
|
95 | + * |
|
96 | + * @param array $headers Response headers |
|
97 | + * |
|
98 | + * @return mixed |
|
99 | + */ |
|
100 | + public function setHeaders(array $headers) |
|
101 | + { |
|
102 | + $this->headers = $headers; |
|
103 | + } |
|
104 | 104 | } |
105 | 105 | \ No newline at end of file |
@@ -32,35 +32,35 @@ |
||
32 | 32 | */ |
33 | 33 | class ConflictHttpException extends HttpException |
34 | 34 | { |
35 | - /** |
|
36 | - * Get the HTTP status code. |
|
37 | - * |
|
38 | - * @var int $code |
|
39 | - */ |
|
40 | - protected $code = 409; |
|
35 | + /** |
|
36 | + * Get the HTTP status code. |
|
37 | + * |
|
38 | + * @var int $code |
|
39 | + */ |
|
40 | + protected $code = 409; |
|
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 |
@@ -32,35 +32,35 @@ |
||
32 | 32 | */ |
33 | 33 | class GoneHttpException extends HttpException |
34 | 34 | { |
35 | - /** |
|
36 | - * Get the HTTP status code. |
|
37 | - * |
|
38 | - * @var int $code |
|
39 | - */ |
|
40 | - protected $code = 410; |
|
35 | + /** |
|
36 | + * Get the HTTP status code. |
|
37 | + * |
|
38 | + * @var int $code |
|
39 | + */ |
|
40 | + protected $code = 410; |
|
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 |
@@ -35,35 +35,35 @@ |
||
35 | 35 | */ |
36 | 36 | class PreconditionRequiredHttpException extends HttpException |
37 | 37 | { |
38 | - /** |
|
39 | - * Get the HTTP status code. |
|
40 | - * |
|
41 | - * @var int $code |
|
42 | - */ |
|
43 | - protected $code = 428; |
|
38 | + /** |
|
39 | + * Get the HTTP status code. |
|
40 | + * |
|
41 | + * @var int $code |
|
42 | + */ |
|
43 | + protected $code = 428; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Initialize constructor. |
|
47 | - * |
|
48 | - * @param string|null $message (null by default) |
|
49 | - * @param \Throwable|null $previous (null by default) |
|
50 | - * @param int $code (0 by default) |
|
51 | - * @param array $headers |
|
52 | - * |
|
53 | - * @return void |
|
54 | - */ |
|
55 | - public function __construct( |
|
56 | - string $message = null, |
|
57 | - Throwable $previous = null, |
|
58 | - int $code = 0, |
|
59 | - array $headers = [] |
|
60 | - ) { |
|
61 | - parent::__construct( |
|
62 | - $this->code, |
|
63 | - $message, |
|
64 | - $previous, |
|
65 | - $headers, |
|
66 | - $code |
|
67 | - ); |
|
68 | - } |
|
45 | + /** |
|
46 | + * Initialize constructor. |
|
47 | + * |
|
48 | + * @param string|null $message (null by default) |
|
49 | + * @param \Throwable|null $previous (null by default) |
|
50 | + * @param int $code (0 by default) |
|
51 | + * @param array $headers |
|
52 | + * |
|
53 | + * @return void |
|
54 | + */ |
|
55 | + public function __construct( |
|
56 | + string $message = null, |
|
57 | + Throwable $previous = null, |
|
58 | + int $code = 0, |
|
59 | + array $headers = [] |
|
60 | + ) { |
|
61 | + parent::__construct( |
|
62 | + $this->code, |
|
63 | + $message, |
|
64 | + $previous, |
|
65 | + $headers, |
|
66 | + $code |
|
67 | + ); |
|
68 | + } |
|
69 | 69 | } |
70 | 70 | \ No newline at end of file |
@@ -645,7 +645,7 @@ |
||
645 | 645 | |
646 | 646 | $this->bootAppCallbacks($this->bootingCallbacks); |
647 | 647 | |
648 | - array_walk($this->serviceProviders, function ($provider) { |
|
648 | + array_walk($this->serviceProviders, function($provider) { |
|
649 | 649 | $this->bootProviderClass($provider); |
650 | 650 | }); |
651 | 651 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function __invoke() |
41 | 41 | { |
42 | - View::replaceNamespace('errors', collect(config('view.paths'))->map(function ($path) { |
|
42 | + View::replaceNamespace('errors', collect(config('view.paths'))->map(function($path) { |
|
43 | 43 | return "{$path}/errors"; |
44 | 44 | })->push(__DIR__.'/views')->all()); |
45 | 45 | } |