Skip to content

Commit 96f6d5b

Browse files
committed
fix: style file
1 parent 71075f2 commit 96f6d5b

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

app-modules/gamify/src/PointType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
use App\Models\User;
88
use Illuminate\Database\Eloquent\Model;
9-
use Laravelcm\Gamify\Models\Reputation;
109
use Illuminate\Database\Eloquent\Relations\HasMany;
11-
use Laravelcm\Gamify\Exceptions\PointsNotDefinedException;
1210
use Laravelcm\Gamify\Exceptions\InvalidPayeeModelException;
11+
use Laravelcm\Gamify\Exceptions\PointsNotDefinedException;
1312
use Laravelcm\Gamify\Exceptions\PointSubjectNotSetException;
13+
use Laravelcm\Gamify\Models\Reputation;
1414

1515
abstract class PointType
1616
{

app-modules/gamify/tests/Feature/ReputationTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,25 @@
22

33
declare(strict_types=1);
44

5-
use App\Models\User;
65
use Laravelcm\Gamify\Models\Reputation;
7-
use Illuminate\Database\Eloquent\Relations\MorphTo;
86

9-
describe(Reputation::class, function () {
7+
describe(Reputation::class, function (): void {
108

11-
it('gets user points', function () {
9+
it('gets user points', function (): void {
1210
$user = createUser(['reputation' => 10]);
1311

1412
expect($user->getPoints())->toBe(10);
1513
});
1614

17-
it('gives reputation point to a user', function () {
15+
it('gives reputation point to a user', function (): void {
1816
expect($user->getPoints())->toBe(0);
1917

2018
$user->addPoint(10);
2119

2220
expect($user->fresh()->getPoints())->toBe(10);
2321
});
2422

25-
it('reduces reputation point for a user', function () {
23+
it('reduces reputation point for a user', function (): void {
2624
$user = createUser(['reputation' => 20]);
2725
expect($user->reputation)->toBe(20);
2826

@@ -31,7 +29,7 @@
3129
expect($user->fresh()->getPoints())->toBe(15);
3230
});
3331

34-
it('zeros reputation point of a user', function () {
32+
it('zeros reputation point of a user', function (): void {
3533
$user = createUser(['reputation' => 50]);
3634
expect($user->getPoints())->toBe(50);
3735

app-modules/gamify/tests/Pest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
use Illuminate\Foundation\Testing\RefreshDatabase;
77
use Tests\TestCase;
88

9-
uses(TestCase::class, RefreshDatabase::class)>in('Feature');
9+
uses(TestCase::class, RefreshDatabase::class) > in('Feature');
1010

1111
function createUser(array $attributes = []): User
1212
{
13-
$user = new User();
13+
$user = new User;
1414

1515
$user->forceFill(array_merge($attributes, [
1616
'name' => 'Demo',
@@ -19,4 +19,4 @@ function createUser(array $attributes = []): User
1919
]))->save();
2020

2121
return $user->fresh();
22-
}
22+
}

app-modules/gamify/tests/TestCase.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Tests;
66

77
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
8-
use Illuminate\Support\Facades\App;
98

109
abstract class TestCase extends BaseTestCase
1110
{

0 commit comments

Comments
 (0)