Skip to content

Commit

Permalink
[TASK] Clean up CharsetConverter
Browse files Browse the repository at this point in the history
This change finalizes a long time of cleaning up
the main CharsetConverter class, whereas most
functionality is now internal and can use strict types
for their arguments, simplifying the code and return
types.

Resolves: #97076
Releases: main
Change-Id: I479da42096df0c83b8a091612d674ff334761535
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73760
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
bmack committed Mar 3, 2022
1 parent 94e65de commit 10ee193
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 199 deletions.
20 changes: 0 additions & 20 deletions Build/phpstan/phpstan-baseline.neon
Expand Up @@ -575,26 +575,6 @@ parameters:
count: 1
path: ../../typo3/sysext/core/Classes/Cache/Frontend/PhpFrontend.php

-
message: "#^If condition is always true\\.$#"
count: 3
path: ../../typo3/sysext/core/Classes/Charset/CharsetConverter.php

-
message: "#^Left side of && is always true\\.$#"
count: 3
path: ../../typo3/sysext/core/Classes/Charset/CharsetConverter.php

-
message: "#^Method TYPO3\\\\CMS\\\\Core\\\\Charset\\\\CharsetConverter\\:\\:initToASCII\\(\\) should return int but returns false\\.$#"
count: 2
path: ../../typo3/sysext/core/Classes/Charset/CharsetConverter.php

-
message: "#^Method TYPO3\\\\CMS\\\\Core\\\\Charset\\\\CharsetConverter\\:\\:initUnicodeData\\(\\) should return int but returns false\\.$#"
count: 2
path: ../../typo3/sysext/core/Classes/Charset/CharsetConverter.php

-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
Expand Down

0 comments on commit 10ee193

Please sign in to comment.