Skip to content

Commit

Permalink
[TASK] Harden array callbacks in EXT:adminpanel
Browse files Browse the repository at this point in the history
Add type declarations to help static code analysis and to improve
code readability.

Resolves: #100328
Releases: main
Change-Id: Ic7ef004fea08e6e4210b271ecedd1f04372501ba
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78280
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk <stefan@buerk.tech>
  • Loading branch information
oliverklee authored and sbuerk committed Mar 28, 2023
1 parent cf6d418 commit 5b2918e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -121,7 +121,7 @@ protected function groupQueries(array $queries): array
}
uasort(
$groupedQueries,
static function ($a, $b) {
static function (array $a, array $b): int {
return $b['time'] <=> $a['time'];
}
);
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/adminpanel/Classes/Modules/DebugModule.php
Expand Up @@ -49,7 +49,7 @@ public function getLabel(): string
public function getShortInfo(): string
{
$logRecords = GeneralUtility::makeInstance(InMemoryLogWriter::class)->getLogEntries();
$errorsAndWarnings = array_filter($logRecords, static function (LogRecord $entry) {
$errorsAndWarnings = array_filter($logRecords, static function (LogRecord $entry): bool {
return LogLevel::normalizeLevel($entry->getLevel()) <= 4;
});

Expand Down

0 comments on commit 5b2918e

Please sign in to comment.