Skip to content

Commit b6c7d8a

Browse files
committed
use getPathname consistently
1 parent 6c4df7a commit b6c7d8a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Context/FeatureContext.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,11 +1432,14 @@ public static function remove_dir( $dir ): void {
14321432
\RecursiveIteratorIterator::CHILD_FIRST
14331433
);
14341434

1435+
/**
1436+
* @var \SplFileInfo $file
1437+
*/
14351438
foreach ( $iterator as $file ) {
14361439
if ( $file->isDir() ) {
1437-
rmdir( $file->getRealPath() );
1440+
rmdir( $file->getPathname() );
14381441
} else {
1439-
unlink( $file->getRealPath() );
1442+
unlink( $file->getPathname() );
14401443
}
14411444
}
14421445

@@ -1455,6 +1458,9 @@ public static function copy_dir( $src_dir, $dest_dir ): void {
14551458
\RecursiveIteratorIterator::SELF_FIRST
14561459
);
14571460

1461+
/**
1462+
* @var \SplFileInfo $item
1463+
*/
14581464
foreach ( $iterator as $item ) {
14591465
$dest_path = $dest_dir . '/' . $iterator->getSubPathname();
14601466
if ( $item->isDir() ) {

0 commit comments

Comments
 (0)