Skip to content

Commit

Permalink
Add ignore scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
daaner committed Apr 8, 2021
1 parent 41b47f5 commit 130c5c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Traits/DateTimes.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ public function getDateFromTo($from = null, $to = null)
$from = $from->format($this->formatTime);
} else {
try {
$from = Carbon::parse($from)->format($this->formatTime);
$from = Carbon::parse($from)
->format($this->formatTime);
} catch (\Exception $e) {
$from = Carbon::now()->addMonth(-3)->format($this->formatTime);
$from = Carbon::now()
->/** @scrutinizer ignore-call */addMonth(-3)
->format($this->formatTime);
}
}
} else {
Expand Down

0 comments on commit 130c5c6

Please sign in to comment.