Skip to content

Commit e43a82e

Browse files
authored
Merge pull request #2 from invokable/devin/1733097331-setup-laravel-pint
Add Laravel Pint code style fixer
2 parents 591566a + 7a5c0a0 commit e43a82e

File tree

5 files changed

+50
-6
lines changed

5 files changed

+50
-6
lines changed

.github/workflows/lint.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: linter
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- develop
11+
- main
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
quality:
18+
runs-on: ubuntu-latest
19+
environment: Testing
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: '8.4'
27+
28+
- name: Install Dependencies
29+
run: |
30+
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
31+
32+
- name: Run Lint
33+
run: vendor/bin/pint --test
34+
35+
# - name: Commit Changes
36+
# uses: stefanzweifel/git-auto-commit-action@v5
37+
# with:
38+
# commit_message: fix code style
39+
# commit_options: '--no-verify'
40+
# file_pattern: |
41+
# **/*
42+
# !.github/workflows/*

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"illuminate/support": "^11.0||^12.0"
1515
},
1616
"require-dev": {
17-
"orchestra/testbench": "^9.0"
17+
"orchestra/testbench": "^9.0",
18+
"laravel/pint": "^1.22"
1819
},
1920
"autoload": {
2021
"psr-4": {

pint.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"preset": "laravel",
3+
"rules": {
4+
"no_unused_imports": false
5+
}
6+
}

src/Console/SailMySQLBackup.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public function __construct()
3636

3737
/**
3838
* Execute the console command.
39-
*
40-
* @return int
4139
*/
4240
public function handle(): int
4341
{

tests/TestCase.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
1313
* Load package service provider.
1414
*
1515
* @param Application $app
16-
* @return array
1716
*/
1817
protected function getPackageProviders($app): array
1918
{
@@ -26,7 +25,6 @@ protected function getPackageProviders($app): array
2625
* Load package alias.
2726
*
2827
* @param Application $app
29-
* @return array
3028
*/
3129
protected function getPackageAliases($app): array
3230
{
@@ -39,7 +37,6 @@ protected function getPackageAliases($app): array
3937
* Define environment setup.
4038
*
4139
* @param Application $app
42-
* @return void
4340
*/
4441
protected function defineEnvironment($app): void
4542
{

0 commit comments

Comments
 (0)