Skip to content

Commit d53217f

Browse files
committed
Update CS fixer config, update facades automatically
1 parent 3f85b48 commit d53217f

File tree

3 files changed

+51
-19
lines changed

3 files changed

+51
-19
lines changed

.github/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 [email protected]: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\\Breadcrumbs\\Facades\\Breadcrumbs
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')
@@ -37,21 +38,19 @@
3738
'while',
3839
],
3940
],
40-
'braces' => true,
4141
'cast_spaces' => [
4242
'space' => 'single',
4343
],
4444
'class_definition' => true,
4545
'combine_consecutive_issets' => true,
4646
'combine_consecutive_unsets' => true,
47-
'compact_nullable_typehint' => true,
47+
'compact_nullable_type_declaration' => true,
4848
'concat_space' => [
4949
'spacing' => 'one',
5050
],
5151
'declare_strict_types' => false,
5252
'dir_constant' => true,
5353
'function_to_constant' => true,
54-
'function_typehint_space' => true,
5554
'increment_style' => [
5655
'style' => 'post',
5756
],
@@ -69,7 +68,7 @@
6968
'native_constant_invocation' => true,
7069
'native_function_casing' => true,
7170
'native_function_invocation' => true,
72-
'new_with_braces' => true,
71+
'new_with_parentheses' => true,
7372
'no_alias_functions' => true,
7473
'no_blank_lines_after_class_opening' => true,
7574
'no_blank_lines_after_phpdoc' => true,
@@ -82,9 +81,9 @@
8281
'no_null_property_initialization' => true,
8382
'no_short_bool_cast' => true,
8483
'no_spaces_after_function_name' => true,
85-
'no_spaces_inside_parenthesis' => true,
84+
'spaces_inside_parentheses' => false,
8685
'no_superfluous_elseif' => true,
87-
'no_trailing_comma_in_singleline_array' => true,
86+
'no_trailing_comma_in_singleline' => true,
8887
'no_trailing_whitespace' => true,
8988
'no_trailing_whitespace_in_comment' => true,
9089
'no_unneeded_control_parentheses' => true,
@@ -114,6 +113,7 @@
114113
'arrays',
115114
],
116115
],
116+
'type_declaration_spaces' => true,
117117
'visibility_required' => [
118118
'elements' => ['property', 'method', 'const'],
119119
],

src/Facades/Breadcrumbs.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,10 @@
22

33
namespace BabDev\Breadcrumbs\Facades;
44

5-
use BabDev\Breadcrumbs\BreadcrumbsManager;
6-
use Illuminate\Contracts\View\View;
7-
use Illuminate\Support\Collection;
85
use Illuminate\Support\Facades\Facade;
9-
use Illuminate\Support\Traits\Macroable;
106

117
/**
12-
* @method static void for(string $name, callable $callback)
13-
* @method static bool exists(?string $name = null)
14-
* @method static Collection generate(?string $name = null, ...$params)
15-
* @method static View view(string $view, ?string $name = null, ...$params)
16-
* @method static View render(?string $name = null, ...$params)
17-
* @method static object|null current()
18-
*
19-
* @mixin Macroable
20-
* @see BreadcrumbsManager
8+
* @see \BabDev\Breadcrumbs\BreadcrumbsManager
219
*/
2210
class Breadcrumbs extends Facade
2311
{

0 commit comments

Comments
 (0)