Skip to content

Commit

Permalink
PHP CS
Browse files Browse the repository at this point in the history
  • Loading branch information
MadMikeyB committed Oct 27, 2017
1 parent f1738a0 commit 6daa4ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .php_cs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"7.1.10","version":"2.7.1:v2.7.1#ab2e189d94698178988f9732bc75bb4ce8d16f77","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_constants":true,"lowercase_keywords":true,"method_argument_space":{"ensure_fully_multiline":true},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true},"hashes":{"\/config\/throttleable.php":1719320333,"\/src\/Models\/Throttle.php":594379226,"\/src\/Providers\/ThrottleableServiceProvider.php":2018943658,"\/src\/Traits\/Throttleable.php":1858438076}}
1 change: 0 additions & 1 deletion src/Models/Throttle.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ public function __construct($request, $attemptLimit = null, $expiryWeeks = null)
$this->expiryMetric = $expiryMetric ?? config('throttleable.expiry_metric');
$this->expiryTimeLimit = $expiryTimeLimit ?? config('throttleable.expiry_timelimit');
}

}
3 changes: 2 additions & 1 deletion src/Providers/ThrottleableServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public function boot()
public function register()
{
$this->mergeConfigFrom(
__DIR__ . '/../../config/throttleable.php', 'throttleable'
__DIR__ . '/../../config/throttleable.php',
'throttleable'
);
}
}
5 changes: 2 additions & 3 deletions src/Traits/Throttleable.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Http\Request;
use MadMikeyB\Throttleable\Models\Throttle;

trait Throttleable
trait Throttleable
{
/**
* Check if the IP address exists in the throttles table
Expand Down Expand Up @@ -57,8 +57,7 @@ protected function createThrottle()
{
$this->ip = $this->request->ip();
$this->attempts = 0;
switch ($this->expiryMetric)
{
switch ($this->expiryMetric) {
case 'hour':
$this->expires_at = Carbon::now()->addHours($this->expiryTimeLimit);
break;
Expand Down

0 comments on commit 6daa4ef

Please sign in to comment.