Skip to content

Commit

Permalink
🐛 void function does not return (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
willpower232 authored Dec 24, 2024
1 parent a6b7561 commit 4581ec7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/AuditableObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ protected function dispatchAudit(Auditable $model)

$model->preloadResolverData();
if (!Config::get('audit.queue.enable', false)) {
return Auditor::execute($model);
Auditor::execute($model);
return;
}

if (!$this->fireDispatchingAuditEvent($model)) {
Expand Down
6 changes: 0 additions & 6 deletions src/Contracts/Auditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ interface Auditor
{
/**
* Get an audit driver instance.
*
* @param \OwenIt\Auditing\Contracts\Auditable $model
*
* @return AuditDriver
*/
public function auditDriver(Auditable $model): AuditDriver;

/**
* Perform an audit.
*
* @param \OwenIt\Auditing\Contracts\Auditable $model
*
* @return void
*/
public function execute(Auditable $model);
Expand Down

0 comments on commit 4581ec7

Please sign in to comment.