Skip to content

Commit 216d87e

Browse files
committed
Adding lint commits through the CI
1 parent cad7ad2 commit 216d87e

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/code-quality.yml renamed to .github/workflows/lint.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,20 @@ jobs:
2626
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
2727
npm install
2828
29-
- name: Pint CS Fixer
30-
run: ./vendor/bin/pint --test
31-
32-
- name: PHPStan
33-
run: ./vendor/bin/phpstan analyse ./app
29+
- name: Run Pint
30+
run: vendor/bin/pint
3431

3532
- name: Frontend Format Check
3633
run: npm run format:check
3734

3835
- name: Frontend Lint
3936
run: npm run lint
37+
38+
- name: Commit changes
39+
uses: stefanzweifel/git-auto-commit-action@v5
40+
with:
41+
commit_message: fix code style
42+
commit_options: "--no-verify"
43+
44+
- name: PHPStan
45+
run: ./vendor/bin/phpstan

app/Http/Controllers/Auth/VerifyEmailController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Http\Controllers\Controller;
66
use Illuminate\Auth\Events\Verified;
7+
use Illuminate\Contracts\Auth\MustVerifyEmail;
78
use Illuminate\Foundation\Auth\EmailVerificationRequest;
89
use Illuminate\Http\RedirectResponse;
910

@@ -19,7 +20,10 @@ public function __invoke(EmailVerificationRequest $request): RedirectResponse
1920
}
2021

2122
if ($request->user()->markEmailAsVerified()) {
22-
event(new Verified($request->user()));
23+
$user = $request->user();
24+
if ($user instanceof MustVerifyEmail) {
25+
event(new Verified($user));
26+
}
2327
}
2428

2529
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');

0 commit comments

Comments
 (0)