Skip to content

Commit 332d136

Browse files
Merge pull request #713 from owen-it/minor-revisions
Minor revisions
2 parents 10c43e7 + ddb3a4a commit 332d136

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

config/audit.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,13 @@
9898
| those from the empty values check. For example when auditing
9999
| model retrieved events which will never have new and old values.
100100
|
101-
| When using empty_values => true, you can still exclude certain events
102-
| with empty values by specifying them in disallowed_empty_values.
103101
|
104102
*/
105103

106104
'empty_values' => true,
107105
'allowed_empty_values' => [
108106
'retrieved'
109107
],
110-
'disallowed_empty_values' => [
111-
],
112108

113109
/*
114110
|--------------------------------------------------------------------------

src/Auditor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ public function execute(Auditable $model)
7070
// Check if we want to avoid storing empty values
7171
$allowEmpty = Config::get('audit.empty_values');
7272
$explicitAllowEmpty = in_array($model->getAuditEvent(), Config::get('audit.allowed_empty_values', []));
73-
$explicitDisallowEmpty = in_array($model->getAuditEvent(), Config::get('audit.disallowed_empty_values', []));
7473

75-
if ($explicitDisallowEmpty || (!$allowEmpty && !$explicitAllowEmpty)) {
74+
if (!$allowEmpty && !$explicitAllowEmpty) {
7675
if (
7776
empty($model->toAudit()['new_values']) &&
7877
empty($model->toAudit()['old_values'])

tests/Unit/AuditTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ public function itResolvesAuditDataIncludingUserAttributes()
8888
'audit_tags' => null,
8989
'audit_created_at' => $audit->getSerializedDate($audit->created_at),
9090
'audit_updated_at' => $audit->getSerializedDate($audit->updated_at),
91-
'user_id' => '1',
9291
'user_type' => User::class,
93-
'user_is_admin' => '1',
9492
'user_first_name' => 'rick',
9593
'user_last_name' => 'Sanchez',
9694
'user_email' => '[email protected]',

0 commit comments

Comments
 (0)