File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments