This avoids PhpStorm IDE warnings
Change-Id: I521aa1b1243ceabd40e7da18bf73ab95af7039cc
* in the wiki's own database. This is the most commonly used repository class.
*
* @ingroup FileRepo
* in the wiki's own database. This is the most commonly used repository class.
*
* @ingroup FileRepo
+ * @method LocalFile|null newFile( $title, $time = false )
*/
class LocalRepo extends FileRepo {
/** @var callable */
*/
class LocalRepo extends FileRepo {
/** @var callable */
public function execute() {
$repo = $this->file->repo;
$status = $repo->newGood();
public function execute() {
$repo = $this->file->repo;
$status = $repo->newGood();
- /** @var LocalFile $destFile */
$destFile = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
->newFile( $this->target );
$destFile = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
->newFile( $this->target );
- '@phan-var LocalFile $destFile';
$this->file->lock();
$destFile->lock(); // quickly fail if destination is not available
$this->file->lock();
$destFile->lock(); // quickly fail if destination is not available
- '@phan-var LocalFile $file';
$flags = 0;
$status = $file->upload(
$source,
$flags = 0;
$status = $file->upload(
$source,
}
public function doPostCommitUpdates( array $visibilityChangeMap ) {
}
public function doPostCommitUpdates( array $visibilityChangeMap ) {
- /** @var LocalFile $file */
$file = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
->newFile( $this->title );
$file = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
->newFile( $this->title );
- '@phan-var LocalFile $file';
$file->purgeCache();
$file->purgeDescription();
$file->purgeCache();
$file->purgeDescription();
- /** @var LocalFile $file */
$file = $repo->newFile( $row->fa_name );
$file = $repo->newFile( $row->fa_name );
- '@phan-var LocalFile $file';
try {
$file->lock();
} catch ( LocalFileLockError $e ) {
try {
$file->lock();
} catch ( LocalFileLockError $e ) {
if ( $this->hasOption( 'dry' ) ) {
$this->output( "done.\n" );
if ( $this->hasOption( 'dry' ) ) {
$this->output( "done.\n" );
- // @phan-suppress-next-line PhanUndeclaredMethod
} elseif ( $image->recordUpload2(
$archive->value,
$summary,
} elseif ( $image->recordUpload2(
$archive->value,
$summary,