Fix case of some Title methods
[lhc/web/wiklou.git] / includes / filerepo / file / ForeignAPIFile.php
index 5648261..edf623e 100644 (file)
@@ -54,7 +54,7 @@ class ForeignAPIFile extends File {
         */
        static function newFromTitle( Title $title, $repo ) {
                $data = $repo->fetchImageQuery( array(
-                       'titles'            => 'File:' . $title->getDBKey(),
+                       'titles'            => 'File:' . $title->getDBkey(),
                        'iiprop'            => self::getProps(),
                        'prop'              => 'imageinfo',
                        'iimetadataversion' => MediaHandler::getMetadataVersion()
@@ -67,7 +67,7 @@ class ForeignAPIFile extends File {
                                ? count( $data['query']['redirects'] ) - 1
                                : -1;
                        if( $lastRedirect >= 0 ) {
-                               $newtitle = Title::newFromText( $data['query']['redirects'][$lastRedirect]['to']);
+                               $newtitle = Title::newFromText( $data['query']['redirects'][$lastRedirect]['to'] );
                                $img = new self( $newtitle, $repo, $info, true );
                                if( $img ) {
                                        $img->redirectedFrom( $title->getDBkey() );
@@ -106,7 +106,7 @@ class ForeignAPIFile extends File {
        }
 
        /**
-        * @param Array $params
+        * @param array $params
         * @param int $flags
         * @return bool|MediaTransformOutput
         */
@@ -166,7 +166,7 @@ class ForeignAPIFile extends File {
                }
                $ret = array();
                foreach( $metadata as $meta ) {
-                       $ret[ $meta['name'] ] = self::parseMetadata( $meta['value'] );
+                       $ret[$meta['name']] = self::parseMetadata( $meta['value'] );
                }
                return $ret;
        }
@@ -189,7 +189,7 @@ class ForeignAPIFile extends File {
         * @param string $method
         * @return int|null|string
         */
-       public function getUser( $method='text' ) {
+       public function getUser( $method = 'text' ) {
                return isset( $this->mInfo['user'] ) ? strval( $this->mInfo['user'] ) : null;
        }
 
@@ -256,7 +256,7 @@ class ForeignAPIFile extends File {
         */
        function getThumbPath( $suffix = '' ) {
                if ( $this->repo->canCacheThumbs() ) {
-                       $path = $this->repo->getZonePath('thumb') . '/' . $this->getHashPath( $this->getName() );
+                       $path = $this->repo->getZonePath( 'thumb' ) . '/' . $this->getHashPath( $this->getName() );
                        if ( $suffix ) {
                                $path = $path . $suffix . '/';
                        }
@@ -293,7 +293,7 @@ class ForeignAPIFile extends File {
                global $wgMemc, $wgContLang;
 
                $url = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgContLang->getCode() );
-               $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', md5($url) );
+               $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', md5( $url ) );
 
                $wgMemc->delete( $key );
        }