Skip to content

Commit 41733a7

Browse files
committed
Merge remote-tracking branch 'origin/cleanup'
2 parents 1d77e83 + 597ed50 commit 41733a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1591
-300
lines changed

.php-cs-fixer.dist.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,17 @@
4848
'phpdoc_no_useless_inheritdoc' => true,
4949
'phpdoc_order' => ['order' => [
5050
'todo',
51-
'method',
5251
'property',
52+
'property-read',
53+
'property-write',
54+
'method',
5355
'api',
5456
'internal',
5557
'requires',
5658
'dataProvider',
5759
'backupGlobals',
5860
'template',
61+
'template-covariant',
5962
'extends',
6063
'implements',
6164
'use',
@@ -64,18 +67,20 @@
6467
'readonly',
6568
'var',
6669
'param',
70+
'param-out',
6771
'return',
6872
'throws',
6973
]],
7074
// 'phpdoc_param_order' => true,
7175
'phpdoc_separation' => ['groups' => [
7276
['see', 'link'],
73-
['property', 'phpstan-property', 'property-read', 'phpstan-property-read'],
77+
['property', 'property-read', 'property-write', 'phpstan-property', 'phpstan-property-read', 'phpstan-property-write'],
78+
['method', 'phpstan-method'],
7479
['requires', 'dataProvider', 'backupGlobals'],
7580
['template', 'template-covariant'],
7681
['extends', 'implements', 'use'],
7782
['phpstan-require-extends', 'phpstan-require-implements'],
78-
['readonly', 'var', 'phpstan-var', 'param', 'param-out', 'phpstan-param', 'return', 'phpstan-return', 'throws', 'phpstan-assert*', 'phpstan-ignore*', 'disregard'],
83+
['readonly', 'var', 'param', 'param-out', 'return', 'throws', 'phpstan-var', 'phpstan-param', 'phpstan-return', 'phpstan-assert*', 'phpstan-ignore*', 'disregard'],
7984
['phpstan-*'],
8085
]],
8186
'phpdoc_tag_casing' => true,

phpstan-baseline-7.4.neon

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan-baseline-8.3.neon

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Toolkit/Console/ConsoleWriter.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -802,15 +802,19 @@ public function exception(
802802
$message = $this->escape($ex->getMessage());
803803
}
804804

805-
$file = $this->escape($ex->getFile());
806-
$line = $ex->getLine();
807-
$msg2 .= sprintf('%s ~~in %s:%d~~', $message, $file, $line);
805+
if ($level <= Level::ERROR || ($debug ??= Env::getDebug())) {
806+
$file = $this->escape($ex->getFile());
807+
$line = $ex->getLine();
808+
$msg2 .= sprintf('%s ~~in %s:%d~~', $message, $file, $line);
809+
} else {
810+
$msg2 .= $message;
811+
}
808812
} while ($ex = $ex->getPrevious());
809813

810814
$class = $this->escape(Get::basename(get_class($exception)));
811815
$this->count($level)->write(
812816
$level,
813-
sprintf('__%s__:', $class),
817+
"{$class}:",
814818
$msg2,
815819
MessageType::STANDARD,
816820
$exception,
@@ -821,13 +825,13 @@ public function exception(
821825
}
822826
$this->write(
823827
$traceLevel,
824-
'__Stack trace:__',
828+
'Stack trace:',
825829
"\n" . $exception->getTraceAsString()
826830
);
827831
if ($exception instanceof ExceptionInterface) {
828832
foreach ($exception->getMetadata() as $key => $value) {
829833
$value = rtrim((string) $value, "\n");
830-
$this->write($traceLevel, "__{$key}:__", "\n{$value}");
834+
$this->write($traceLevel, "{$key}:", "\n{$value}");
831835
}
832836
}
833837

src/Toolkit/Core/Concern/HasUnderlyingService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ private static function loadServiceList(): void
9595

9696
/**
9797
* @param class-string<TService> $serviceName
98-
* @param-out class-string<TService> $serviceName
9998
* @param array<class-string<TService>> $serviceList
99+
* @param-out class-string<TService> $serviceName
100100
* @param-out array<class-string<TService>> $serviceList
101101
*/
102102
private static function doLoadServiceList(?string &$serviceName, ?array &$serviceList): void

0 commit comments

Comments
 (0)