Skip to content

Commit

Permalink
Merge pull request #288 from Jubeki/fix/dontReportDuplicates
Browse files Browse the repository at this point in the history
[7.x] Add dontReportDuplicates and fixes return types
  • Loading branch information
nunomaduro authored Sep 19, 2023
2 parents 61553ad + a9d9386 commit d4909af
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/Adapters/Laravel/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,38 @@ public function shouldReport(Throwable $e)
}

/**
* Register a renderable callback.
* Register a reportable callback.
*
* @return $this
* @param callable $reportUsing
* @return \Illuminate\Foundation\Exceptions\ReportableHandler
*/
public function reportable(callable $reportUsing)
{
$this->appExceptionHandler->reportable($reportUsing); // @phpstan-ignore-line
return $this->appExceptionHandler->reportable($reportUsing); // @phpstan-ignore-line
}

/**
* Register a reportable callback.
* Register a renderable callback.
*
* @return \Illuminate\Foundation\Exceptions\ReportableHandler
* @param callable $renderUsing
* @return $this
*/
public function renderable(callable $renderUsing)
{
$this->appExceptionHandler->renderable($renderUsing); // @phpstan-ignore-line

return $this;
}

/**
* Do not report duplicate exceptions.
*
* @return $this
*/
public function dontReportDuplicates()
{
$this->appExceptionHandler->dontReportDuplicates(); // @phpstan-ignore-line

return $this;
}
}

0 comments on commit d4909af

Please sign in to comment.