Skip to content

Commit 39de88f

Browse files
committed
Apply fixes from StyleCI
1 parent 8ddf93f commit 39de88f

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/Traits/Reactable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function scopeWhereReactedBy(Builder $query, $userId = null, $type = null
197197
try {
198198
$user = $this->getUser($userId);
199199
} catch (InvalidReactionUser $e) {
200-
if (!$user && !$userId) {
200+
if (! $user && ! $userId) {
201201
throw InvalidReactionUser::notDefined();
202202
}
203203
}
@@ -223,15 +223,15 @@ public function scopeWhereReactedBy(Builder $query, $userId = null, $type = null
223223
*/
224224
private function getUser($user = null)
225225
{
226-
if (!$user && auth()->check()) {
226+
if (! $user && auth()->check()) {
227227
return auth()->user();
228228
}
229229

230230
if ($user instanceof ReactsInterface) {
231231
return $user;
232232
}
233233

234-
if (!$user) {
234+
if (! $user) {
235235
throw InvalidReactionUser::notDefined();
236236
}
237237

src/Traits/Reacts.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function reactTo(ReactableInterface $reactable, $type)
2323
Helper::resolveReactsIdColumn() => $this->getKey(),
2424
])->first();
2525

26-
if (!$reaction) {
26+
if (! $reaction) {
2727
return $this->storeReaction($reactable, $type);
2828
}
2929

@@ -48,7 +48,7 @@ public function removeReactionFrom(ReactableInterface $reactable)
4848
Helper::resolveReactsIdColumn() => $this->getKey(),
4949
])->first();
5050

51-
if (!$reaction) {
51+
if (! $reaction) {
5252
return;
5353
}
5454

@@ -68,7 +68,7 @@ public function toggleReactionOn(ReactableInterface $reactable, $type)
6868
Helper::resolveReactsIdColumn() => $this->getKey(),
6969
])->first();
7070

71-
if (!$reaction) {
71+
if (! $reaction) {
7272
return $this->storeReaction($reactable, $type);
7373
}
7474

tests/TestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function publishPackageMigrations()
5151
*/
5252
protected function destroyPackageMigrations()
5353
{
54-
File::cleanDirectory(__DIR__ . '/../vendor/orchestra/testbench-core/laravel/database/migrations');
54+
File::cleanDirectory(__DIR__.'/../vendor/orchestra/testbench-core/laravel/database/migrations');
5555
}
5656

5757
/**
@@ -84,9 +84,9 @@ protected function getPackageProviders($app)
8484
*/
8585
protected function setUpDatabase()
8686
{
87-
include_once __DIR__ . '/../migrations/2018_07_10_000000_create_reactions_table.php';
88-
include_once __DIR__ . '/database/migrations/2018_07_10_000000_create_users_table.php';
89-
include_once __DIR__ . '/database/migrations/2018_07_11_000000_create_articles_table.php';
87+
include_once __DIR__.'/../migrations/2018_07_10_000000_create_reactions_table.php';
88+
include_once __DIR__.'/database/migrations/2018_07_10_000000_create_users_table.php';
89+
include_once __DIR__.'/database/migrations/2018_07_11_000000_create_articles_table.php';
9090

9191
(new \CreateReactionsTable())->up();
9292
(new \CreateUsersTable())->up();

tests/Unit/ReactsProfileModelTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
class ReactsProfileModelTest extends TestCase
1010
{
1111
/**
12-
* Actions to be performed on PHPUnit start.
13-
*
14-
* @return void
15-
*/
12+
* Actions to be performed on PHPUnit start.
13+
*
14+
* @return void
15+
*/
1616
protected function setUp(): void
1717
{
1818
parent::setUp();

0 commit comments

Comments
 (0)