Skip to content

Commit 02c4605

Browse files
Merge pull request #71 from greg0ire/upgrade-cs
Upgrade to doctrine/coding-standard 12
2 parents c80c8ed + 409330d commit 02c4605

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"php": "^7.1 || ^8.0"
99
},
1010
"require-dev": {
11-
"doctrine/coding-standard": "^9",
11+
"doctrine/coding-standard": "^9 || ^12",
1212
"phpstan/phpstan": "1.4.10 || 2.0.3",
1313
"phpstan/phpstan-phpunit": "^1.0 || ^2",
1414
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",

src/Deprecation.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ public static function triggerIfCalledFromOutside(string $package, string $link,
173173
self::delegateTriggerToBackend($message, $backtrace, $link, $package);
174174
}
175175

176-
/**
177-
* @param list<array{function: string, line?: int, file?: string, class?: class-string, type?: string, args?: mixed[], object?: object}> $backtrace
178-
*/
176+
/** @param list<array{function: string, line?: int, file?: string, class?: class-string, type?: string, args?: mixed[], object?: object}> $backtrace */
179177
private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package): void
180178
{
181179
$type = self::$type ?? self::getTypeFromEnv();
@@ -289,9 +287,7 @@ public static function getTriggeredDeprecations(): array
289287
return self::$triggeredDeprecations;
290288
}
291289

292-
/**
293-
* @return int-mask-of<self::TYPE_*>
294-
*/
290+
/** @return int-mask-of<self::TYPE_*> */
295291
private static function getTypeFromEnv(): int
296292
{
297293
switch ($_SERVER['DOCTRINE_DEPRECATIONS'] ?? $_ENV['DOCTRINE_DEPRECATIONS'] ?? null) {

src/PHPUnit/VerifyDeprecations.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,13 @@ public function expectNoDeprecationWithIdentifier(string $identifier): void
2626
$this->doctrineNoDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
2727
}
2828

29-
/**
30-
* @before
31-
*/
29+
/** @before */
3230
public function enableDeprecationTracking(): void
3331
{
3432
Deprecation::enableTrackingDeprecations();
3533
}
3634

37-
/**
38-
* @after
39-
*/
35+
/** @after */
4036
public function verifyDeprecationsAreTriggered(): void
4137
{
4238
foreach ($this->doctrineDeprecationsExpectations as $identifier => $expectation) {

0 commit comments

Comments
 (0)