Clean up get_class($this) -> static::class in /includes/cache and /includes/libs
[lhc/web/wiklou.git] / includes / libs / virtualrest / VirtualRESTService.php
index 01a4ea6..2f16078 100644 (file)
@@ -35,7 +35,7 @@
  */
 abstract class VirtualRESTService {
        /** @var array Key/value map */
-       protected $params = array();
+       protected $params = [];
 
        /**
         * @param array $params Key/value map
@@ -51,8 +51,7 @@ abstract class VirtualRESTService {
         * @return string The name of the service behind this VRS object.
         */
        public function getName() {
-               return isset( $this->params['name'] ) ? $this->params['name'] :
-                       get_class( $this );
+               return isset( $this->params['name'] ) ? $this->params['name'] : static::class;
        }
 
        /**
@@ -78,7 +77,7 @@ abstract class VirtualRESTService {
         * @return array Modified HTTP request array map
         */
        public function onRequests( array $reqs, Closure $idGeneratorFunc ) {
-               $result = array();
+               $result = [];
                foreach ( $reqs as $key => $req ) {
                        // The default encoding treats the URL as a REST style path that uses
                        // forward slash as a hierarchical delimiter (and never otherwise).