diff options
Diffstat (limited to 'MLEB/Translate/scripts/poimport.php')
-rw-r--r-- | MLEB/Translate/scripts/poimport.php | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/MLEB/Translate/scripts/poimport.php b/MLEB/Translate/scripts/poimport.php index af7de0d5..4c411270 100644 --- a/MLEB/Translate/scripts/poimport.php +++ b/MLEB/Translate/scripts/poimport.php @@ -88,17 +88,14 @@ class Poimport extends Maintenance { */ class PoImporter { /** @var callable Function to report progress updates */ - protected $progressCallback; - + private $progressCallback; /** * Path to file to parse. - * @var bool|string + * @var string */ - private $file = false; + private $file; - /** - * @param string $file File to import - */ + /** @param string $file File to import */ public function __construct( $file ) { $this->file = $file; } @@ -219,22 +216,24 @@ class PoImporter { * Import changes to wiki as given user */ class WikiWriter { - /** @var callable Function to report progress updates */ - protected $progressCallback; - - protected $user; - - private $changes = []; - private $dryrun = true; - private $group = null; + /** @var callable|null Function to report progress updates */ + private $progressCallback; + /** @var User */ + private $user; + /** @var string[] */ + private $changes; + /** @var bool */ + private $dryrun; + /** @var MessageGroup|null */ + private $group; /** - * @param array $changes Array of key/langcode => translation. + * @param string[] $changes Array of key/langcode => translation. * @param string $groupId Group ID. * @param string $user User who makes the edits in wiki. * @param bool $dryrun Do not do anything that affects the database. */ - public function __construct( $changes, $groupId, $user, $dryrun = true ) { + public function __construct( array $changes, $groupId, $user, $dryrun = true ) { $this->changes = $changes; $this->group = MessageGroups::getGroup( $groupId ); $this->user = User::newFromName( $user ); |