@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function boot() |
| 17 | 17 | { |
| 18 | - $this->app->booted(function () { |
|
| 18 | + $this->app->booted(function() { |
|
| 19 | 19 | $loader = AliasLoader::getInstance(); |
| 20 | 20 | $loader->alias('Counters', Counters::class); |
| 21 | 21 | }); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | // dd($this->counters); |
| 35 | 35 | $counter = $this->counters->where('key', $key)->first(); |
| 36 | 36 | //connect the counter to the object if it's not exist |
| 37 | - if (! $counter) { |
|
| 37 | + if (!$counter) { |
|
| 38 | 38 | $this->addCounter($key); |
| 39 | 39 | $counter = $this->counters->where('key', $key)->first(); |
| 40 | 40 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function hasCounter($key) |
| 51 | 51 | { |
| 52 | - return ! is_null($this->counters()->where('counters.key', $key)->first()); |
|
| 52 | + return !is_null($this->counters()->where('counters.key', $key)->first()); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $counter = Counters::get($key); |
| 79 | 79 | if ($counter) { |
| 80 | - if (! $this->hasCounter($key)) { // not to add the counter twice |
|
| 80 | + if (!$this->hasCounter($key)) { // not to add the counter twice |
|
| 81 | 81 | $this->counters()->attach( |
| 82 | 82 | $counter->id, |
| 83 | 83 | [ |
| 84 | - 'value' => ! is_null($initialValue) ? $initialValue : $counter->initial_value, |
|
| 84 | + 'value' => !is_null($initialValue) ? $initialValue : $counter->initial_value, |
|
| 85 | 85 | ] |
| 86 | 86 | ); |
| 87 | 87 | } else { |