Remove @param comments that literally repeat what the code says
[lhc/web/wiklou.git] / tests / phpunit / includes / session / TestBagOStuff.php
index 8d1b544..bac2088 100644 (file)
@@ -14,39 +14,39 @@ class TestBagOStuff extends \CachedBagOStuff {
        /**
         * @param string $id Session ID
         * @param array $data Session data
-        * @param int $expiry Expiry
+        * @param int $expiry
         * @param User $user User for metadata
         */
        public function setSessionData( $id, array $data, $expiry = 0, User $user = null ) {
-               $this->setSession( $id, array( 'data' => $data ), $expiry, $user );
+               $this->setSession( $id, [ 'data' => $data ], $expiry, $user );
        }
 
        /**
         * @param string $id Session ID
         * @param array $metadata Session metadata
-        * @param int $expiry Expiry
+        * @param int $expiry
         */
        public function setSessionMeta( $id, array $metadata, $expiry = 0 ) {
-               $this->setSession( $id, array( 'metadata' => $metadata ), $expiry );
+               $this->setSession( $id, [ 'metadata' => $metadata ], $expiry );
        }
 
        /**
         * @param string $id Session ID
         * @param array $blob Session metadata and data
-        * @param int $expiry Expiry
+        * @param int $expiry
         * @param User $user User for metadata
         */
        public function setSession( $id, array $blob, $expiry = 0, User $user = null ) {
-               $blob += array(
-                       'data' => array(),
-                       'metadata' => array(),
-               );
-               $blob['metadata'] += array(
+               $blob += [
+                       'data' => [],
+                       'metadata' => [],
+               ];
+               $blob['metadata'] += [
                        'userId' => $user ? $user->getId() : 0,
                        'userName' => $user ? $user->getName() : null,
                        'userToken' => $user ? $user->getToken( true ) : null,
                        'provider' => 'DummySessionProvider',
-               );
+               ];
 
                $this->setRawSession( $id, $blob, $expiry, $user );
        }
@@ -54,14 +54,14 @@ class TestBagOStuff extends \CachedBagOStuff {
        /**
         * @param string $id Session ID
         * @param array|mixed $blob Session metadata and data
-        * @param int $expiry Expiry
+        * @param int $expiry
         */
        public function setRawSession( $id, $blob, $expiry = 0 ) {
                if ( $expiry <= 0 ) {
                        $expiry = \RequestContext::getMain()->getConfig()->get( 'ObjectCacheSessionExpiry' );
                }
 
-               $this->set( wfMemcKey( 'MWSession', $id ), $blob, $expiry );
+               $this->set( $this->makeKey( 'MWSession', $id ), $blob, $expiry );
        }
 
        /**
@@ -69,7 +69,7 @@ class TestBagOStuff extends \CachedBagOStuff {
         * @return mixed
         */
        public function getSession( $id ) {
-               return $this->get( wfMemcKey( 'MWSession', $id ) );
+               return $this->get( $this->makeKey( 'MWSession', $id ) );
        }
 
        /**
@@ -77,14 +77,14 @@ class TestBagOStuff extends \CachedBagOStuff {
         * @return mixed
         */
        public function getSessionFromBackend( $id ) {
-               return $this->backend->get( wfMemcKey( 'MWSession', $id ) );
+               return $this->backend->get( $this->makeKey( 'MWSession', $id ) );
        }
 
        /**
         * @param string $id Session ID
         */
        public function deleteSession( $id ) {
-               $this->delete( wfMemcKey( 'MWSession', $id ) );
+               $this->delete( $this->makeKey( 'MWSession', $id ) );
        }
 
 }