comments and formatting
[plcapi.git] / src / Helper / Charset.php
index 2ea370f..8fdecb1 100644 (file)
@@ -4,6 +4,9 @@ namespace PhpXmlRpc\Helper;
 
 use PhpXmlRpc\PhpXmlRpc;
 
+/**
+ * @todo implement an interface
+ */
 class Charset
 {
     // tables used for transcoding different charsets into us-ascii xml
@@ -27,18 +30,19 @@ class Charset
             'EUC-JP', 'EUC-', 'EUC-KR', 'EUC-CN',),
     );
 
+    /** @var Charset $instance */
     protected static $instance = null;
 
     /**
      * This class is singleton for performance reasons.
-     * @todo can't we just make $xml_iso88591_Entities a static variable instead ?
+     * @todo should we just make $xml_iso88591_Entities a static variable instead ?
      *
      * @return Charset
      */
     public static function instance()
     {
         if (self::$instance === null) {
-            self::$instance = new self();
+            self::$instance = new static();
         }
 
         return self::$instance;
@@ -305,5 +309,4 @@ class Charset
                 throw new \Exception('Unsupported charset: ' . $charset);
         }
     }
-
 }