Skip to content

Commit d06923a

Browse files
Update code style action. (#28)
1 parent d0d3b5f commit d06923a

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

.github/workflows/run-php-cs-fixer.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ jobs:
1010
fix-php-code-style:
1111
name: Fix PHP Code Style
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
1315
steps:
14-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1517
with:
1618
fetch-depth: 2
1719
token: ${{ secrets.GITHUB_TOKEN }}
1820

1921
- name: Run PHP CS Fixer
20-
uses: docker://oskarstark/php-cs-fixer-ga:2.18.6
22+
uses: docker://oskarstark/php-cs-fixer-ga
2123

2224
- name: Commit changes
2325
uses: stefanzweifel/git-auto-commit-action@v4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/vendor
22
composer.lock
3-
/.idea
3+
/.idea
4+
.php-cs-fixer.cache

.php-cs-fixer.dist.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('node_modules')
5+
->exclude('vendor')
6+
->in(__DIR__);
7+
8+
$config = new PhpCsFixer\Config();
9+
return $config->setRules([
10+
'@PSR2' => true,
11+
])
12+
->setFinder($finder);

src/FlashMessage/FlashMessage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ public function get(string $key)
149149
public function toArray()
150150
{
151151
return array_merge(
152-
$this->attributes, [
152+
$this->attributes,
153+
[
153154
'content' => $this->content,
154155
'title' => $this->title,
155156
'type' => $this->type,

0 commit comments

Comments
 (0)