Less tabs in phan config

Change-Id: If9b35b1f1ae6e70917e17e85cb0f9a2b0fa959ee
This commit is contained in:
Arlo Breault 2024-02-26 16:57:14 -05:00
parent 90dc52620c
commit 1ea6f53fde

View file

@ -11,19 +11,19 @@ $cfg['suppress_issue_types'][] = 'PhanUndeclaredProperty';
* @param ?array &$result Where to put the result * @param ?array &$result Where to put the result
*/ */
function wfCollectPhpFiles( string $dir, ?array &$result = [] ) { function wfCollectPhpFiles( string $dir, ?array &$result = [] ) {
if ( !is_dir( $dir ) ) { if ( !is_dir( $dir ) ) {
return; return;
}
foreach ( scandir( $dir ) as $f ) {
if ( $f === '.' || $f === '..' ) {
continue;
} }
foreach ( scandir( $dir ) as $f ) { $fullName = $dir . DIRECTORY_SEPARATOR . $f;
if ( $f === '.' || $f === '..' ) { wfCollectPhpFiles( $fullName, $result );
continue; if ( is_file( $fullName ) && preg_match( '/\.php$/D', $fullName ) ) {
} $result[] = $fullName;
$fullName = $dir . DIRECTORY_SEPARATOR . $f;
wfCollectPhpFiles( $fullName, $result );
if ( is_file( $fullName ) && preg_match( '/\.php$/D', $fullName ) ) {
$result[] = $fullName;
}
} }
}
} }
// Exclude src/DOM in favour of .phan/stubs/DomImpl.php // Exclude src/DOM in favour of .phan/stubs/DomImpl.php