Skip to content

Commit f502d3d

Browse files
Copilotswissspidy
andcommitted
Fix PHPCS alignment and PHPStan issues
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 371e60f commit f502d3d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/WP_CLI/Shell/REPL.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public function set_watch_path( $path ) {
3333
}
3434

3535
public function start() {
36-
// @phpstan-ignore while.alwaysTrue
3736
while ( true ) {
3837
// Check for file changes if watching
3938
if ( $this->watch_path && $this->has_changes() ) {
@@ -216,15 +215,16 @@ private function get_recursive_mtime( $path ) {
216215
}
217216

218217
if ( is_dir( $path ) ) {
219-
$dir_mtime = filemtime( $path );
220-
$mtime = false !== $dir_mtime ? $dir_mtime : 0;
218+
$dir_mtime = filemtime( $path );
219+
$mtime = false !== $dir_mtime ? $dir_mtime : 0;
221220

222221
$iterator = new \RecursiveIteratorIterator(
223222
new \RecursiveDirectoryIterator( $path, \RecursiveDirectoryIterator::SKIP_DOTS ),
224223
\RecursiveIteratorIterator::SELF_FIRST
225224
);
226225

227226
foreach ( $iterator as $file ) {
227+
/** @var \SplFileInfo $file */
228228
$file_mtime = $file->getMTime();
229229
if ( $file_mtime > $mtime ) {
230230
$mtime = $file_mtime;

0 commit comments

Comments
 (0)