Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Sep 13, 2021
1 parent 489c17b commit b2adf15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `flare-client-php` will be documented in this file

## 1.9.1 - 2021-09-13

- let `report` return the created report

## 1.9.0 - 2021-09-13

- add report tracking uuid
Expand Down
6 changes: 4 additions & 2 deletions src/Flare.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ public function applicationPath(string $applicationPath)
return $this;
}

public function report(Throwable $throwable, callable $callback = null)
public function report(Throwable $throwable, callable $callback = null): ?Report
{
if (! $this->shouldSendReport($throwable)) {
return;
return null;
}

$report = $this->createReport($throwable);
Expand All @@ -203,6 +203,8 @@ public function report(Throwable $throwable, callable $callback = null)
}

$this->sendReportToApi($report);

return $report;
}

protected function shouldSendReport(Throwable $throwable): bool
Expand Down

0 comments on commit b2adf15

Please sign in to comment.