Add /** @var SplFileInfo $fileInfo */ docs where needed
Change-Id: Ia844af3347db52f9f004892578ba4aefac7dd875
This commit is contained in:
parent
43a0144346
commit
bb786be640
4 changed files with 4 additions and 0 deletions
|
|
@ -234,6 +234,7 @@ class ForeignResourceManager {
|
|||
$from,
|
||||
RecursiveDirectoryIterator::SKIP_DOTS
|
||||
) );
|
||||
/** @var SplFileInfo $file */
|
||||
foreach ( $rii as $file ) {
|
||||
$remote = $file->getPathname();
|
||||
$local = strtr( $remote, [ $from => $to ] );
|
||||
|
|
|
|||
|
|
@ -320,6 +320,7 @@ class FindHooks extends Maintenance {
|
|||
$iterator = new DirectoryIterator( $dir );
|
||||
}
|
||||
|
||||
/** @var SplFileInfo $info */
|
||||
foreach ( $iterator as $info ) {
|
||||
// Ignore directories, work only on php files,
|
||||
if ( $info->isFile() && in_array( $info->getExtension(), [ 'php', 'inc' ] )
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ class GenerateJsonI18n extends Maintenance {
|
|||
$dir_iterator = new RecursiveDirectoryIterator( dirname( $phpfile ) );
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
$dir_iterator, RecursiveIteratorIterator::LEAVES_ONLY );
|
||||
/** @var SplFileInfo $fileObject */
|
||||
foreach ( $iterator as $path => $fileObject ) {
|
||||
if ( fnmatch( "*.i18n.php", $fileObject->getFilename() ) ) {
|
||||
$this->output( "Converting $path.\n" );
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ class HHVMMakeRepo extends Maintenance {
|
|||
),
|
||||
RecursiveIteratorIterator::LEAVES_ONLY
|
||||
);
|
||||
/** @var SplFileInfo $fileInfo */
|
||||
foreach ( $iter as $file => $fileInfo ) {
|
||||
if ( $fileInfo->isFile() ) {
|
||||
$files[] = $file;
|
||||
|
|
|
|||
Loading…
Reference in a new issue