Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jun 28, 2018
1 parent 50b7f85 commit ee951a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utils/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public function size($operator, $size = null)
list(, $operator, $size, $unit) = $matches;
static $units = ['' => 1, 'k' => 1e3, 'm' => 1e6, 'g' => 1e9];
$size *= $units[strtolower($unit)];
$operator = $operator ? $operator : '=';
$operator = $operator ?: '=';
}
return $this->filter(function (RecursiveDirectoryIterator $file) use ($operator, $size) {
return self::compare($file->getSize(), $operator, $size);
Expand All @@ -335,7 +335,7 @@ public function date($operator, $date = null)
throw new Nette\InvalidArgumentException('Invalid date predicate format.');
}
list(, $operator, $date) = $matches;
$operator = $operator ? $operator : '=';
$operator = $operator ?: '=';
}
$date = DateTime::from($date)->format('U');
return $this->filter(function (RecursiveDirectoryIterator $file) use ($operator, $date) {
Expand Down

0 comments on commit ee951a6

Please sign in to comment.