Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Dec 31, 2019
1 parent 171d5d8 commit e5af601
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function locateActualPath(array $paths): ?string
public static function getContents(string $file, $default = null)
{
if (\file_exists($file) && \is_readable($file)) {
$data = \file_get_contents($file);
$data = @\file_get_contents($file);
if (false === $data) {
return $default;
}
Expand All @@ -56,7 +56,7 @@ public static function getContents(string $file, $default = null)
public static function getLines(string $file, $default = null)
{
if (\file_exists($file) && \is_readable($file)) {
return \file($file, \FILE_SKIP_EMPTY_LINES);
return @\file($file, \FILE_SKIP_EMPTY_LINES);
}

return $default;
Expand Down
2 changes: 1 addition & 1 deletion src/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function getPhp(): Php
->setProcessManager($fpmInfo['process-manager'] ?? null)
->setSlowRequests($fpmInfo['slow-requests'] ?? null)
->setStartTime(isset($fpmInfo['start-time']) ? new \DateTime('@'.$fpmInfo['start-time']) : null)
->setProcesses($fpmInfo['procs'] ? \array_map(static function (array $process): Php\FpmProcess {
->setProcesses(isset($fpmInfo['procs']) ? \array_map(static function (array $process): Php\FpmProcess {
return (new Php\FpmProcess())
->setStartTime(new \DateTime('@'.$process['start-time']))
->setLastRequestCpu($process['last-request-cpu'])
Expand Down

0 comments on commit e5af601

Please sign in to comment.