Skip to content

Commit 7cda3bb

Browse files
committed
style: Refactor code formatting for consistency in configuration files.
1 parent 40c0ea9 commit 7cda3bb

File tree

4 files changed

+29
-19
lines changed

4 files changed

+29
-19
lines changed

README.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,17 @@ declare(strict_types=1);
7575
$ecsConfigBuilder = require __DIR__ . '/vendor/php-forge/coding-standard/config/ecs.php';
7676

7777
return $ecsConfigBuilder
78-
->withPaths([
79-
__DIR__ . '/src',
80-
__DIR__ . '/tests',
81-
])
82-
->withSkip([
83-
// Add project-specific skips here.
84-
]);
78+
->withPaths(
79+
[
80+
__DIR__ . '/src',
81+
__DIR__ . '/tests',
82+
],
83+
)
84+
->withSkip(
85+
[
86+
// add project-specific skips here.
87+
],
88+
);
8589
```
8690

8791
#### Rector (rector.php)
@@ -105,7 +109,7 @@ return static function (RectorConfig $rectorConfig): void {
105109
],
106110
);
107111

108-
// Project-specific overrides can be added after the import.
112+
// project-specific overrides can be added after the import.
109113
// $rectorConfig->skip([...]);
110114
};
111115
```
@@ -128,10 +132,12 @@ return static function (RectorConfig $rectorConfig): void {
128132
$rectorConfig->import(__DIR__ . '/vendor/php-forge/coding-standard/config/rector.php');
129133
$rectorConfig->import(__DIR__ . '/rector-yii2.php');
130134

131-
$rectorConfig->paths([
132-
__DIR__ . '/src',
133-
__DIR__ . '/tests',
134-
]);
135+
$rectorConfig->paths(
136+
[
137+
__DIR__ . '/src',
138+
__DIR__ . '/tests',
139+
],
140+
);
135141
};
136142
```
137143

@@ -141,10 +147,10 @@ Follow the same convention used across PHP Forge repositories:
141147

142148
```json
143149
{
144-
"scripts": {
145-
"ecs": "./vendor/bin/ecs --fix",
146-
"rector": "./vendor/bin/rector process"
147-
}
150+
"scripts": {
151+
"ecs": "./vendor/bin/ecs --fix",
152+
"rector": "./vendor/bin/rector process"
153+
}
148154
}
149155
```
150156

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"autoload": {
1919
"psr-4": {
20-
"PHPForge\\CodingStandard\\": "/"
20+
"PHPForge\\CodingStandard\\": "./"
2121
}
2222
},
2323
"extra": {

ecs.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
$ecsConfigBuilder = require __DIR__ . '/config/ecs.php';
1111

1212
return $ecsConfigBuilder->withPaths(
13-
[__DIR__ . '/config'],
13+
[
14+
__DIR__ . '/config',
15+
],
1416
);

rector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
$rectorConfig->import(__DIR__ . '/config/rector.php');
1212

1313
$rectorConfig->paths(
14-
[__DIR__ . '/config'],
14+
[
15+
__DIR__ . '/config',
16+
],
1517
);
1618
};

0 commit comments

Comments
 (0)