Declare visibility on class properties of file repo classes
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Sun, 24 Nov 2013 09:44:10 +0000 (10:44 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 25 Nov 2013 05:40:42 +0000 (06:40 +0100)
Change-Id: Ia608df217bb893dddae3219b3315cb44e82f5092

includes/filerepo/ForeignAPIRepo.php
includes/filerepo/ForeignDBRepo.php
includes/filerepo/ForeignDBViaLBRepo.php
includes/filerepo/LocalRepo.php
includes/filerepo/RepoGroup.php

index 616f881..bb16c8b 100644 (file)
@@ -52,13 +52,17 @@ class ForeignAPIRepo extends FileRepo {
                'timestamp',
        );
 
-       var $fileFactory = array( 'ForeignAPIFile', 'newFromTitle' );
-       /* Check back with Commons after a day */
-       var $apiThumbCacheExpiry = 86400; /* 24*60*60 */
-       /* Redownload thumbnail files after a month */
-       var $fileCacheExpiry = 2592000; /* 86400*30 */
+       protected $fileFactory = array( 'ForeignAPIFile', 'newFromTitle' );
+       /** @var int Check back with Commons after a day (24*60*60) */
+       protected $apiThumbCacheExpiry = 86400;
 
-       protected $mQueryCache = array();
+       /** @var int Redownload thumbnail files after a month (86400*30) */
+       protected $fileCacheExpiry = 2592000;
+
+       /** @var array  */
+       private $mQueryCache = array();
+
+       /** @var array  */
        protected $mFileExists = array();
 
        /**
index 9cccf3b..b38416f 100644 (file)
  */
 class ForeignDBRepo extends LocalRepo {
        # Settings
-       var $dbType, $dbServer, $dbUser, $dbPassword, $dbName, $dbFlags,
-               $tablePrefix, $hasSharedCache;
+       protected $dbType;
+       protected $dbServer;
+       protected $dbUser;
+       protected $dbPassword;
+       protected $dbName;
+       protected $dbFlags;
+       protected $tablePrefix;
+       protected $hasSharedCache;
 
        # Other stuff
-       var $dbConn;
-       var $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
-       var $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
+       protected $dbConn;
+       protected $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
+       protected $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
 
        /**
         * @param $info array|null
index a002aad..ad63706 100644 (file)
  * @ingroup FileRepo
  */
 class ForeignDBViaLBRepo extends LocalRepo {
-       var $wiki, $dbName, $tablePrefix;
-       var $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
-       var $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
+       protected $wiki;
+       protected $dbName;
+       protected $tablePrefix;
+       protected $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
+       protected $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
 
        /**
         * @param $info array|null
index 49c2b8f..0454765 100644 (file)
  * @ingroup FileRepo
  */
 class LocalRepo extends FileRepo {
-       var $fileFactory = array( 'LocalFile', 'newFromTitle' );
-       var $fileFactoryKey = array( 'LocalFile', 'newFromKey' );
-       var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
-       var $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' );
-       var $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' );
-       var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
+       protected $fileFactory = array( 'LocalFile', 'newFromTitle' );
+       protected $fileFactoryKey = array( 'LocalFile', 'newFromKey' );
+       protected $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
+       protected $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' );
+       protected $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' );
+       protected $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
 
        /**
         * @throws MWException
index 62e9cc0..1a7ae34 100644 (file)
  * @ingroup FileRepo
  */
 class RepoGroup {
-       /**
-        * @var LocalRepo
-        */
-       var $localRepo;
+       /** @var LocalRepo */
+       protected $localRepo;
 
-       var $foreignRepos, $reposInitialised = false;
-       var $localInfo, $foreignInfo;
-       var $cache;
+       protected $foreignRepos;
 
-       /**
-        * @var RepoGroup
-        */
+       /** @var bool */
+       protected $reposInitialised = false;
+
+       protected $localInfo;
+       protected $foreignInfo;
+
+       /** @var array  */
+       protected $cache;
+
+       /** @var RepoGroup */
        protected static $instance;
+
+       /** Maximum number of cache items */
        const MAX_CACHE_SIZE = 500;
 
        /**