Skip to content

Commit

Permalink
feat(Audit): make the auditable() and user() method return types loose
Browse files Browse the repository at this point in the history
  • Loading branch information
quetzyg committed Nov 20, 2018
1 parent 4a05fb5 commit 342b7c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/Audit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Support\Facades\Config;
use OwenIt\Auditing\Contracts\AttributeEncoder;

Expand Down Expand Up @@ -34,15 +33,15 @@ trait Audit
/**
* {@inheritdoc}
*/
public function auditable(): MorphTo
public function auditable()
{
return $this->morphTo();
}

/**
* {@inheritdoc}
*/
public function user(): MorphTo
public function user()
{
return $this->morphTo();
}
Expand Down
10 changes: 4 additions & 6 deletions src/Contracts/Audit.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace OwenIt\Auditing\Contracts;

use Illuminate\Database\Eloquent\Relations\MorphTo;

interface Audit
{
/**
Expand All @@ -23,16 +21,16 @@ public function getTable(): string;
/**
* Get the auditable model to which this Audit belongs.
*
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
* @return mixed
*/
public function auditable(): MorphTo;
public function auditable();

/**
* User responsible for the changes.
*
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
* @return mixed
*/
public function user(): MorphTo;
public function user();

/**
* Audit data resolver.
Expand Down

0 comments on commit 342b7c9

Please sign in to comment.