Skip to content

Commit 2758e32

Browse files
committed
Update CS fixer config, update facades automatically
1 parent 295b3bf commit 2758e32

File tree

2 files changed

+50
-6
lines changed

2 files changed

+50
-6
lines changed

.github/workflows/facades.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: 'Update Facade Docblocks'
2+
3+
on:
4+
push:
5+
branches:
6+
- '*.x'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
facades:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: true
18+
19+
name: 'Update Facade Docblocks'
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: '8.4'
29+
tools: composer:v2
30+
coverage: none
31+
32+
- name: Install dependencies
33+
run: |
34+
composer config repositories.facade-documenter vcs git@github.com:laravel/facade-documenter.git
35+
composer require --dev laravel/facade-documenter:dev-main --prefer-stable --prefer-dist --no-interaction --no-progress
36+
37+
- name: Update docblocks
38+
run: php -f vendor/bin/facade.php BabDev\\ServerPushManager\\Facades\\PushManager
39+
40+
- name: Commit updates
41+
uses: stefanzweifel/git-auto-commit-action@v5
42+
with:
43+
commit_message: Update facade docblocks
44+
file_pattern: src/

.php-cs-fixer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
$finder = (new PhpCsFixer\Finder())
44
->notPath('config')
55
->notPath('vendor')
6+
->notPath('Facades')
67
->in(__DIR__)
78
->name('*.php')
89
->notName('*.blade.php')
@@ -38,21 +39,19 @@
3839
'while',
3940
],
4041
],
41-
'braces' => true,
4242
'cast_spaces' => [
4343
'space' => 'single',
4444
],
4545
'class_definition' => true,
4646
'combine_consecutive_issets' => true,
4747
'combine_consecutive_unsets' => true,
48-
'compact_nullable_typehint' => true,
48+
'compact_nullable_type_declaration' => true,
4949
'concat_space' => [
5050
'spacing' => 'one',
5151
],
5252
'declare_strict_types' => false,
5353
'dir_constant' => true,
5454
'function_to_constant' => true,
55-
'function_typehint_space' => true,
5655
'increment_style' => [
5756
'style' => 'post',
5857
],
@@ -70,7 +69,7 @@
7069
'native_constant_invocation' => true,
7170
'native_function_casing' => true,
7271
'native_function_invocation' => true,
73-
'new_with_braces' => true,
72+
'new_with_parentheses' => true,
7473
'no_alias_functions' => true,
7574
'no_blank_lines_after_class_opening' => true,
7675
'no_blank_lines_after_phpdoc' => true,
@@ -83,9 +82,9 @@
8382
'no_null_property_initialization' => true,
8483
'no_short_bool_cast' => true,
8584
'no_spaces_after_function_name' => true,
86-
'no_spaces_inside_parenthesis' => true,
85+
'spaces_inside_parentheses' => false,
8786
'no_superfluous_elseif' => true,
88-
'no_trailing_comma_in_singleline_array' => true,
87+
'no_trailing_comma_in_singleline' => true,
8988
'no_trailing_whitespace' => true,
9089
'no_trailing_whitespace_in_comment' => true,
9190
'no_unneeded_control_parentheses' => true,
@@ -115,6 +114,7 @@
115114
'arrays',
116115
],
117116
],
117+
'type_declaration_spaces' => true,
118118
'visibility_required' => [
119119
'elements' => ['property', 'method', 'const'],
120120
],

0 commit comments

Comments
 (0)