Skip to content

Commit

Permalink
Add dontReportDuplicates and fixes return types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jubeki committed Sep 19, 2023
1 parent 3dd615a commit a9d9386
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 a9d9386

Please sign in to comment.