-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Ticket 25999 #26013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ticket 25999 #26013
Changes from 1 commit
14cb5f3
2d3784c
ca18592
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,11 +37,12 @@ public function isFresh($timestamp) | |
} | ||
|
||
foreach ($this->files as $file => $v) { | ||
if (!file_exists($file)) { | ||
$filemtime = @filemtime($file); | ||
if (!$filemtime) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. inline? if (false === ($filemtime = @filemtime($file))) { |
||
return false; | ||
} | ||
|
||
if (@filemtime($file) > $timestamp) { | ||
if ($filemtime > $timestamp) { | ||
return $this->hash === $this->computeHash(); | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,12 +34,13 @@ public function __construct($class, $path, array $autowiringMetadata) | |
|
||
public function isFresh($timestamp) | ||
{ | ||
if (!file_exists($this->filePath)) { | ||
$filemtime = @filemtime($this->filePath); | ||
if (!$filemtime) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes in this file can probably also be applied on a lower branch. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as @sroze you can inline all this condition |
||
return false; | ||
} | ||
|
||
// has the file *not* been modified? Definitely fresh | ||
if (@filemtime($this->filePath) <= $timestamp) { | ||
if ($filemtime <= $timestamp) { | ||
return true; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes can probably be fixed in a lower branch.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably inline the definition as well, i.e.