diff options
author | Tim Starling <tstarling@wikimedia.org> | 2022-11-09 13:12:50 +1100 |
---|---|---|
committer | Tim Starling <tstarling@wikimedia.org> | 2022-11-09 13:12:50 +1100 |
commit | e1041b4d7ad8987bebb97bda168738d58ab671a6 (patch) | |
tree | 99186272ed90a53e70a50b6678ae878820391eb1 /includes/libs/filebackend | |
parent | 0b12f8b69880d108db9035176532c891e8a75f79 (diff) | |
download | mediawikicore-e1041b4d7ad8987bebb97bda168738d58ab671a6.tar.gz mediawikicore-e1041b4d7ad8987bebb97bda168738d58ab671a6.zip |
Fix the remaining Phan failures on PHP 8.1
* Use @phan-var to suppress issues with version independence.
* In Parser strictly compare to false. I still think this is a Phan bug.
Bug: T322278
Change-Id: I654b73e5ed843474ed35c3780d95b04dce388bea
Diffstat (limited to 'includes/libs/filebackend')
-rw-r--r-- | includes/libs/filebackend/fileiteration/FileBackendStoreShardListIterator.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/libs/filebackend/fileiteration/FileBackendStoreShardListIterator.php b/includes/libs/filebackend/fileiteration/FileBackendStoreShardListIterator.php index 5a215e3b7c11..cf428777f075 100644 --- a/includes/libs/filebackend/fileiteration/FileBackendStoreShardListIterator.php +++ b/includes/libs/filebackend/fileiteration/FileBackendStoreShardListIterator.php @@ -65,7 +65,9 @@ abstract class FileBackendStoreShardListIterator extends FilterIterator { } public function accept(): bool { - $rel = $this->getInnerIterator()->current(); // path relative to given directory + $inner = $this->getInnerIterator(); + '@phan-var AppendIterator $inner'; + $rel = $inner->current(); // path relative to given directory $path = $this->params['dir'] . "/{$rel}"; // full storage path if ( $this->backend->isSingleShardPathInternal( $path ) ) { return true; // path is only on one shard; no issue with duplicates |