Skip to content

Commit 5a31ad1

Browse files
committed
Add Pint for code style
1 parent f616957 commit 5a31ad1

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/pint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PHP Linting (Pint)
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches-ignore:
6+
- 'dependabot/npm_and_yarn/*'
7+
jobs:
8+
Pint:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
14+
with:
15+
php-version: '8.1'
16+
- uses: actions/checkout@v3
17+
- name: Copy .env
18+
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
19+
- name: Install Dependencies
20+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
21+
- name: Launch Pint inspection
22+
run: vendor/bin/pint
23+
24+
- name: Commit changes
25+
uses: stefanzweifel/git-auto-commit-action@v4
26+
with:
27+
commit_message: PHP Linting (Pint)
28+
skip_fetch: true

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
},
1919
"require-dev": {
2020
"mockery/mockery": "^1.4.4",
21-
"phpunit/phpunit": "^9.5.10|^10.0"
21+
"phpunit/phpunit": "^9.5.10|^10.0",
22+
"laravel/pint": "^1.10"
2223
},
2324

2425
"autoload": {

src/MsgOwlClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function send(MsgOwlMessage $message)
3838
'headers' => [
3939
'Authorization' => 'AccessKey '.$this->api_key,
4040
'Accept' => 'application/json',
41-
'Content-Type' => 'application/json'
41+
'Content-Type' => 'application/json',
4242
],
4343
]);
4444

0 commit comments

Comments
 (0)