Commit e9a48989 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Benni Mack
Browse files

[TASK] Add final private constructor to GeneralUtility

GeneralUtility is a class with only static methods and
a class comment stated for years not to instantiate it.

Since there is a possibility to prevent instantiations
of classes with private constructors, one has added to
this class and on top is has been marked final.

Releases: master
Resolves: #91043
Change-Id: I15e2dfa98b2a30149f9f0efed31281d5d01d4efa
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64181


Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 7c7ec6e8
......@@ -39,8 +39,7 @@ use TYPO3\CMS\Core\SingletonInterface;
* You are encouraged to use this library in your own scripts!
*
* USE:
* The class is intended to be used without creating an instance of it.
* So: Don't instantiate - call functions with "\TYPO3\CMS\Core\Utility\GeneralUtility::" prefixed the function name.
* All methods in this class are meant to be called statically.
* So use \TYPO3\CMS\Core\Utility\GeneralUtility::[method-name] to refer to the functions, eg. '\TYPO3\CMS\Core\Utility\GeneralUtility::milliseconds()'
*/
class GeneralUtility
......@@ -96,6 +95,10 @@ class GeneralUtility
*/
protected static $indpEnvCache = [];
final private function __construct()
{
}
/*************************
*
* GET/POST Variables
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment