[TASK] Add more fixers for php-cs-fixer
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / Rendering / RendererRegistry.php
index 830da15..6186508 100644 (file)
@@ -27,7 +27,7 @@ class RendererRegistry implements \TYPO3\CMS\Core\SingletonInterface
      *
      * @var array
      */
-    protected $classNames = array();
+    protected $classNames = [];
 
     /**
      * Instance cache for renderer classes
@@ -43,7 +43,7 @@ class RendererRegistry implements \TYPO3\CMS\Core\SingletonInterface
      */
     public static function getInstance()
     {
-        return GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::class);
+        return GeneralUtility::makeInstance(self::class);
     }
 
     /**
@@ -56,7 +56,7 @@ class RendererRegistry implements \TYPO3\CMS\Core\SingletonInterface
     {
         if (!class_exists($className)) {
             throw new \InvalidArgumentException('The class "' . $className . '" you are trying to register is not available', 1411840171);
-        } elseif (!in_array(\TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface::class, class_implements($className), true)) {
+        } elseif (!in_array(FileRendererInterface::class, class_implements($className), true)) {
             throw new \InvalidArgumentException('The renderer needs to implement the FileRendererInterface', 1411840172);
         } else {
             $this->classNames[] = $className;
@@ -71,7 +71,7 @@ class RendererRegistry implements \TYPO3\CMS\Core\SingletonInterface
     public function getRendererInstances()
     {
         if ($this->instances === null) {
-            $this->instances = array();
+            $this->instances = [];
 
             // As the result is in reverse order we need to reverse
             // the array before processing to keep the items with same
@@ -84,7 +84,7 @@ class RendererRegistry implements \TYPO3\CMS\Core\SingletonInterface
             }
 
             if (count($this->instances) > 1) {
-                usort($this->instances, array($this, 'compareRendererPriority'));
+                usort($this->instances, [$this, 'compareRendererPriority']);
             }
         }
         return $this->instances;