Skip to content

Commit 4369d20

Browse files
committed
Configure groups option of phpdoc_separation
1 parent b57909f commit 4369d20

13 files changed

+46
-11
lines changed

.php-cs-fixer.dist.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,21 @@
3838
__DIR__ . '/spark',
3939
]);
4040

41-
$overrides = [];
41+
$overrides = [
42+
'phpdoc_separation' => [
43+
'groups' => [
44+
['immutable', 'psalm-immutable'],
45+
['param', 'phpstan-param', 'psalm-param'],
46+
['phpstan-pure', 'psalm-pure'],
47+
['readonly', 'psalm-readonly'],
48+
['return', 'phpstan-return', 'psalm-return'],
49+
['template', 'phpstan-template', 'psalm-template'],
50+
['template-covariant', 'phpstan-template-covariant', 'psalm-template-covariant'],
51+
['phpstan-type', 'psalm-type'],
52+
['var', 'phpstan-var', 'psalm-var'],
53+
],
54+
],
55+
];
4256

4357
$options = [
4458
'cacheFile' => 'build/.php-cs-fixer.cache',

.php-cs-fixer.no-header.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,21 @@
3030
__DIR__ . '/admin/starter/builds',
3131
]);
3232

33-
$overrides = [];
33+
$overrides = [
34+
'phpdoc_separation' => [
35+
'groups' => [
36+
['immutable', 'psalm-immutable'],
37+
['param', 'phpstan-param', 'psalm-param'],
38+
['phpstan-pure', 'psalm-pure'],
39+
['readonly', 'psalm-readonly'],
40+
['return', 'phpstan-return', 'psalm-return'],
41+
['template', 'phpstan-template', 'psalm-template'],
42+
['template-covariant', 'phpstan-template-covariant', 'psalm-template-covariant'],
43+
['phpstan-type', 'psalm-type'],
44+
['var', 'phpstan-var', 'psalm-var'],
45+
],
46+
],
47+
];
3448

3549
$options = [
3650
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',

.php-cs-fixer.user-guide.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
'php_unit_internal_class' => false,
3434
'no_unused_imports' => false,
3535
'class_attributes_separation' => false,
36+
'phpdoc_separation' => [
37+
'groups' => [
38+
['immutable', 'psalm-immutable'],
39+
['param', 'phpstan-param', 'psalm-param'],
40+
['phpstan-pure', 'psalm-pure'],
41+
['readonly', 'psalm-readonly'],
42+
['return', 'phpstan-return', 'psalm-return'],
43+
['template', 'phpstan-template', 'psalm-template'],
44+
['template-covariant', 'phpstan-template-covariant', 'psalm-template-covariant'],
45+
['phpstan-type', 'psalm-type'],
46+
['var', 'phpstan-var', 'psalm-var'],
47+
],
48+
],
3649
];
3750

3851
$options = [

app/Config/App.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ class App extends BaseConfig
437437
* Defaults to `Lax` as recommended in this link:
438438
*
439439
* @see https://portswigger.net/web-security/csrf/samesite-cookies
440+
*
440441
* @deprecated `Config\Cookie` $samesite property is used.
441442
*
442443
* @var string

system/Commands/Utilities/Routes/AutoRouteCollector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public function __construct(string $namespace, string $defaultController, string
3636

3737
/**
3838
* @return array<int, array<int, string>>
39-
*
4039
* @phpstan-return list<list<string>>
4140
*/
4241
public function get(): array

system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public function __construct(
5454

5555
/**
5656
* @return array<int, array<int, string>>
57-
*
5857
* @phpstan-return list<list<string>>
5958
*/
6059
public function get(): array

system/Commands/Utilities/Routes/AutoRouterImproved/ControllerMethodReader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public function __construct(string $namespace, array $httpMethods)
4141
* @phpstan-param class-string $class
4242
*
4343
* @return array<int, array<string, array|string>>
44-
*
4544
* @phpstan-return list<array<string, string|array>>
4645
*/
4746
public function read(string $class, string $defaultController = 'Home', string $defaultMethod = 'index'): array

system/Commands/Utilities/Routes/ControllerFinder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public function __construct(string $namespace)
3737

3838
/**
3939
* @return string[]
40-
*
4140
* @phpstan-return class-string[]
4241
*/
4342
public function find(): array

system/Commands/Utilities/Routes/ControllerMethodReader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public function __construct(string $namespace)
3636
* @phpstan-param class-string $class
3737
*
3838
* @return array<int, array{route: string, handler: string}>
39-
*
4039
* @phpstan-return list<array{route: string, handler: string}>
4140
*/
4241
public function read(string $class, string $defaultController = 'Home', string $defaultMethod = 'index'): array

system/Database/BaseConnection.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,6 @@ public function getConnectDuration(int $decimals = 6): string
995995
* @param bool $fieldExists Supplied $item contains a column name?
996996
*
997997
* @return array|string
998-
*
999998
* @phpstan-return ($item is array ? array : string)
1000999
*/
10011000
public function protectIdentifiers($item, bool $prefixSingle = false, ?bool $protectIdentifiers = null, bool $fieldExists = true)
@@ -1598,7 +1597,6 @@ public function isWriteType($sql): bool
15981597
* Must return an array with keys 'code' and 'message':
15991598
*
16001599
* @return array<string, int|string|null>
1601-
*
16021600
* @phpstan-return array{code: int|string|null, message: string|null}
16031601
*/
16041602
abstract public function error(): array;

system/Database/SQLite3/Table.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class Table
2828
* All of the fields this table represents.
2929
*
3030
* @var array
31-
*
3231
* @phpstan-var array<string, array<string, bool|int|string|null>>
3332
*/
3433
protected $fields = [];
@@ -306,7 +305,6 @@ protected function copyData()
306305
* @param array|bool $fields
307306
*
308307
* @return mixed
309-
*
310308
* @phpstan-return ($fields is array ? array : mixed)
311309
*/
312310
protected function formatFields($fields)

system/HTTP/Response.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public function getStatusCode(): int
222222
*
223223
* @see http://tools.ietf.org/html/rfc7231#section-6
224224
* @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
225+
*
225226
* @deprecated Use getReasonPhrase()
226227
*
227228
* @codeCoverageIgnore

system/HTTP/ResponseInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ public function setStatusCode(int $code, string $reason = '');
141141
*
142142
* @see http://tools.ietf.org/html/rfc7231#section-6
143143
* @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
144+
*
144145
* @deprecated Use getReasonPhrase()
145146
*/
146147
public function getReason(): string;

0 commit comments

Comments
 (0)