Skip to content

Commit 04743f9

Browse files
committed
Add Pint style fixer workflow
1 parent 32e7afe commit 04743f9

4 files changed

Lines changed: 48 additions & 2 deletions

File tree

.github/workflows/fix-style.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Fix Style
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
fix-style:
18+
name: Fix Style
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 10
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6.0.3
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: '8.4'
32+
tools: composer:v2
33+
coverage: none
34+
35+
- name: Install dependencies
36+
run: composer install --prefer-dist --no-interaction --no-progress
37+
38+
- name: Run Pint
39+
run: ./vendor/bin/pint
40+
41+
- name: Commit style fixes
42+
uses: stefanzweifel/git-auto-commit-action@v6
43+
with:
44+
commit_message: Fix code style

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"illuminate/support": "^11.0|^12.0"
1212
},
1313
"require-dev": {
14+
"laravel/pint": "^1.0",
1415
"orchestra/testbench": "^9.0|^10.0",
1516
"pestphp/pest": "^3.0|^4.0",
1617
"pestphp/pest-plugin-laravel": "^3.0|^4.0"

src/Facades/PrivacyFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* @method static array<int, \DirectoryTree\PrivacyFilterClassifier\Entity> entities(string $text, ?float $threshold = null)
1010
*
11-
* @see \DirectoryTree\PrivacyFilterClassifier\Classifier
11+
* @see Classifier
1212
*/
1313
class PrivacyFilter extends Facade
1414
{

tests/TestCase.php

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

55
use DirectoryTree\PrivacyFilter\PrivacyFilterServiceProvider;
66
use DirectoryTree\PrivacyFilterClassifier\Classifier;
7+
use Illuminate\Foundation\Application;
78
use Orchestra\Testbench\TestCase as Orchestra;
89
use RuntimeException;
910
use Symfony\Component\Process\Process;
@@ -33,7 +34,7 @@ abstract class TestCase extends Orchestra
3334
/**
3435
* Get package service providers.
3536
*
36-
* @param \Illuminate\Foundation\Application $app
37+
* @param Application $app
3738
* @return array<int, class-string>
3839
*/
3940
protected function getPackageProviders($app): array

0 commit comments

Comments
 (0)