Problem
In PollingMonitorWatcher, $file->getFileInfo()->getMTime() is called where $file is already an SplFileInfo instance (from Symfony Finder's iterator). Calling getFileInfo() on an SplFileInfo returns the same object, making it a redundant method call.
Location
src/Reboot/FileMonitorWatcher/PollingMonitorWatcher.php, line 45
Current Code
/** @var \SplFileInfo $file */
foreach ($this->finder as $file) {
$filePath = $file->getRealPath();
$currentMTime = $file->getFileInfo()->getMTime(); // redundant getFileInfo()
// ...
}
Proposed Fix
foreach ($this->finder as $file) {
$filePath = $file->getRealPath();
$currentMTime = $file->getMTime();
// ...
}
Priority
🟢 MINOR — redundant call; no functional impact but misleading.
Problem
In
PollingMonitorWatcher,$file->getFileInfo()->getMTime()is called where$fileis already anSplFileInfoinstance (from Symfony Finder's iterator). CallinggetFileInfo()on anSplFileInforeturns the same object, making it a redundant method call.Location
src/Reboot/FileMonitorWatcher/PollingMonitorWatcher.php, line 45Current Code
Proposed Fix
Priority
🟢 MINOR — redundant call; no functional impact but misleading.