Part of Issue #3504453 by liam morland, lrwebks, nils.destoop, anybody, grevil: Fix PHP 8.4.x deprecation and other warnings (PHPStan)
(cherry picked from commit 0b836516)
7012f85b Fixing phpcs
Co-authored-by: Leon Röthemeyer 64041-LRWebks@users.noreply.drupalcode.org