Skip to content

Commit 342b7c9

Browse files
committed
feat(Audit): make the auditable() and user() method return types loose
1 parent 4a05fb5 commit 342b7c9

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/Audit.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use DateTimeInterface;
66
use Illuminate\Database\Eloquent\Model;
7-
use Illuminate\Database\Eloquent\Relations\MorphTo;
87
use Illuminate\Support\Facades\Config;
98
use OwenIt\Auditing\Contracts\AttributeEncoder;
109

@@ -34,15 +33,15 @@ trait Audit
3433
/**
3534
* {@inheritdoc}
3635
*/
37-
public function auditable(): MorphTo
36+
public function auditable()
3837
{
3938
return $this->morphTo();
4039
}
4140

4241
/**
4342
* {@inheritdoc}
4443
*/
45-
public function user(): MorphTo
44+
public function user()
4645
{
4746
return $this->morphTo();
4847
}

src/Contracts/Audit.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace OwenIt\Auditing\Contracts;
44

5-
use Illuminate\Database\Eloquent\Relations\MorphTo;
6-
75
interface Audit
86
{
97
/**
@@ -23,16 +21,16 @@ public function getTable(): string;
2321
/**
2422
* Get the auditable model to which this Audit belongs.
2523
*
26-
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
24+
* @return mixed
2725
*/
28-
public function auditable(): MorphTo;
26+
public function auditable();
2927

3028
/**
3129
* User responsible for the changes.
3230
*
33-
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
31+
* @return mixed
3432
*/
35-
public function user(): MorphTo;
33+
public function user();
3634

3735
/**
3836
* Audit data resolver.

0 commit comments

Comments
 (0)