Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 965ea5f

Browse files
Merge pull request #195 from package-wizard/phoenix
Bump code styler
2 parents daa71ec + b566182 commit 965ea5f

File tree

15 files changed

+750
-42
lines changed

15 files changed

+750
-42
lines changed

.github/workflows/code-style.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ jobs:
2323
coverage: none
2424

2525
- name: Install dependency
26-
run: composer global require dragon-code/codestyler
26+
run: composer install
27+
28+
- name: Styling
29+
run: vendor/bin/pint --parallel --test
2730

2831
fix:
2932
runs-on: ubuntu-latest
@@ -42,26 +45,11 @@ jobs:
4245
extensions: curl, mbstring, zip, iconv, json, dom, fileinfo, tokenizer
4346
coverage: none
4447

45-
- name: Setup Composer
46-
run: |
47-
composer global config --no-plugins allow-plugins.dragon-code/codestyler true
48-
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
49-
50-
composer config --no-plugins allow-plugins.dragon-code/codestyler true
51-
composer config --no-plugins allow-plugins.ergebnis/composer-normalize true
52-
53-
- name: Install dependencies
54-
run: |
55-
composer global require dragon-code/codestyler
56-
composer global require ergebnis/composer-normalize
57-
58-
- name: Fix the code-style
59-
run: |
60-
codestyle editorconfig
61-
codestyle dependabot
62-
codestyle --parallel
48+
- name: Install dependency
49+
run: composer install
6350

64-
composer normalize
51+
- name: Styling
52+
run: composer style
6553

6654
- name: Create a Pull Request
6755
uses: peter-evans/create-pull-request@v7

.github/workflows/license.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ jobs:
2323
coverage: none
2424

2525
- name: Install dependencies
26-
run: |
27-
composer update --prefer-stable --prefer-dist --no-progress --no-interaction
28-
composer global require dragon-code/codestyler
26+
run: composer install
2927

3028
- name: Download
3129
run: php ./paw licenses
3230

3331
- name: Code-Style
34-
run: codestyle
32+
run: composer style
3533

3634
- name: Create a Pull Request
3735
uses: peter-evans/create-pull-request@v7

app/Actions/QuestionsAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,6 @@ protected function forPath(ConditionData $condition): bool
110110

111111
protected function comparator(): ComparatorService
112112
{
113-
return $this->comparator ??= new ComparatorService();
113+
return $this->comparator ??= new ComparatorService;
114114
}
115115
}

app/Actions/ValidateSchemaAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ protected function filename(): string
5757

5858
protected function validator(): SchemaValidatorService
5959
{
60-
return new SchemaValidatorService();
60+
return new SchemaValidatorService;
6161
}
6262
}

app/Commands/NewCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,13 @@ protected function projectDirectory(): string
203203
DownloadProjectAction::Dev => $isDev,
204204
Action::Directory => $directory,
205205
]);
206-
}
207-
elseif (Directory::doesntExist($directory)) {
206+
} elseif (Directory::doesntExist($directory)) {
208207
warning(__('validation.doesnt_exist.directory', ['path' => $directory]));
209208

210209
$directory = $this->getInstallationDirectory(
211210
DirectoryFiller::make(local: true)
212211
);
213-
}
214-
elseif (! is_readable($directory)) {
212+
} elseif (! is_readable($directory)) {
215213
warning(__('validation.no_access', ['path' => $directory]));
216214

217215
$directory = $this->getInstallationDirectory(

app/Integrations/GitHub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
class GitHub
1515
{
1616
/**
17+
* @return Collection<LicenseData>
18+
*
1719
* @throws \Illuminate\Http\Client\ConnectionException
1820
* @throws \Illuminate\Http\Client\RequestException
19-
*
20-
* @return Collection<LicenseData>
2121
*/
2222
public function licenses(): Collection
2323
{

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class AppServiceProvider extends ServiceProvider
1717
public function register(): void
1818
{
1919
$this->app->singleton(Composer::class, function () {
20-
return new Composer(new Filesystem(), getcwd() ?: realpath('.'));
20+
return new Composer(new Filesystem, getcwd() ?: realpath('.'));
2121
});
2222

23-
$this->app->singleton(Console::class, fn () => new Console());
23+
$this->app->singleton(Console::class, fn () => new Console);
2424
}
2525
}

app/Services/ProcessService.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ protected function tty(Process $process): void
6363
if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) {
6464
try {
6565
$process->setTty(true);
66-
}
67-
catch (RuntimeException $e) {
66+
} catch (RuntimeException $e) {
6867
warning($e->getMessage());
6968
}
7069
}

app/Services/SchemaValidatorService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class SchemaValidatorService
1414
{
1515
public function __construct(
16-
protected Validator $schema = new Validator()
16+
protected Validator $schema = new Validator
1717
) {}
1818

1919
public function validate(stdClass $data): void

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
},
3939
"require-dev": {
4040
"archtechx/enums": "^1.1.2",
41+
"dragon-code/codestyler": "^6.0",
4142
"dragon-code/support": "^6.16",
4243
"illuminate/http": "^12.20",
4344
"illuminate/translation": "^12.20",
@@ -80,7 +81,12 @@
8081
"sort-packages": true
8182
},
8283
"scripts": {
83-
"style": "codestyle --parallel",
84+
"post-update-cmd": [
85+
"cp vendor/dragon-code/codestyler/presets/pint/8.4.json pint.json",
86+
"cp vendor/dragon-code/codestyler/.editorconfig .editorconfig",
87+
"composer normalize"
88+
],
89+
"style": "vendor/bin/pint --parallel",
8490
"test": [
8591
"@test:coverage",
8692
"@test:types",

0 commit comments

Comments
 (0)