easier subclassing of Charset class
authorgggeek <giunta.gaetano@gmail.com>
Sat, 2 Jan 2021 14:18:27 +0000 (14:18 +0000)
committergggeek <giunta.gaetano@gmail.com>
Sat, 2 Jan 2021 14:18:27 +0000 (14:18 +0000)
src/Helper/Charset.php

index 2ea370f..3440fc6 100644 (file)
@@ -27,6 +27,7 @@ class Charset
             'EUC-JP', 'EUC-', 'EUC-KR', 'EUC-CN',),
     );
 
+    /** @var Charset $instance */
     protected static $instance = null;
 
     /**
@@ -38,7 +39,7 @@ class Charset
     public static function instance()
     {
         if (self::$instance === null) {
-            self::$instance = new self();
+            self::$instance = new static();
         }
 
         return self::$instance;