@@ -28,7 +28,7 @@ |
||
| 28 | 28 | Mail::send( |
| 29 | 29 | 'package_redirect::exception_notification_view', |
| 30 | 30 | ['exception' => $exception], |
| 31 | - function ($message) { |
|
| 31 | + function($message) { |
|
| 32 | 32 | $from = config('firewall.notify_exceptions.mail_from'); |
| 33 | 33 | $to = config('firewall.notify_exceptions.mail_to'); |
| 34 | 34 | $subject = config('firewall.notify_exceptions.subject'); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function up() |
| 18 | 18 | { |
| 19 | - Schema::create('exception_log', function (Blueprint $table) { |
|
| 19 | + Schema::create('exception_log', function(Blueprint $table) { |
|
| 20 | 20 | $table->increments('id'); |
| 21 | 21 | $table->string('path', 25); |
| 22 | 22 | $table->string('method', 25); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function up() |
| 18 | 18 | { |
| 19 | - Schema::create('firewall_log', function (Blueprint $table) { |
|
| 19 | + Schema::create('firewall_log', function(Blueprint $table) { |
|
| 20 | 20 | $table->increments('id'); |
| 21 | 21 | $table->string('path', 25); |
| 22 | 22 | $table->string('method', 25); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function up() |
| 18 | 18 | { |
| 19 | - Schema::create('firewall_requests_log', function (Blueprint $table) { |
|
| 19 | + Schema::create('firewall_requests_log', function(Blueprint $table) { |
|
| 20 | 20 | $table->increments('id'); |
| 21 | 21 | $table->string('path', 25); |
| 22 | 22 | $table->string('method', 25); |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * |
| 7 | 7 | * This route provides some useful information about the package. |
| 8 | 8 | */ |
| 9 | -Route::get('firewall/info', function () { |
|
| 9 | +Route::get('firewall/info', function() { |
|
| 10 | 10 | return [ |
| 11 | 11 | 'package_name' => 'Laravel - Firewall', |
| 12 | 12 | 'description' => 'Laravel Firewall package detects unknown ip addresses based on |
@@ -23,6 +23,6 @@ discard block |
||
| 23 | 23 | ]; |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | -Route::get('firewall/unauthorized/redirect', function () { |
|
| 26 | +Route::get('firewall/unauthorized/redirect', function() { |
|
| 27 | 27 | return view('package_redirect::redirect_view'); |
| 28 | 28 | }); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - $this->app->bind('firewall', function () { |
|
| 27 | + $this->app->bind('firewall', function() { |
|
| 28 | 28 | return new Firewall(new FirewallRepository()); |
| 29 | 29 | }); |
| 30 | 30 | |
@@ -287,8 +287,7 @@ |
||
| 287 | 287 | $this->setValuesToWhiteListedAndRejected($request, $log_request); |
| 288 | 288 | $redirect_rej_response = $this->redirectIfRejectListed($request, $log_request); |
| 289 | 289 | $redirect_non_white_response = $this->redirectIfNotWhiteListed($request, $log_request); |
| 290 | - $redirect_response = ($redirect_rej_response) ? $redirect_rej_response : |
|
| 291 | - (($redirect_non_white_response) ? $redirect_non_white_response : null); |
|
| 290 | + $redirect_response = ($redirect_rej_response) ? $redirect_rej_response : (($redirect_non_white_response) ? $redirect_non_white_response : null); |
|
| 292 | 291 | if ($redirect_response) { |
| 293 | 292 | return $redirect_response; |
| 294 | 293 | } |