Skip to content

Commit

Permalink
Fix comment positions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkleemans committed Aug 31, 2022
1 parent 25210a6 commit a994930
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/AttributeEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ private function fireAttributeEvents(): void
if (!$this->isDirtyAccessor($attribute)) {
continue; // Not changed
}
} // JSON attribute
}

// JSON attribute
elseif (Str::contains($attribute, '->')) {
[$attribute, $path] = explode('->', $attribute, 2);
$path = str_replace('->', '.', $path);
Expand All @@ -45,7 +47,9 @@ private function fireAttributeEvents(): void
}

$value = Arr::get($this->getAttribute($attribute), $path);
} // Regular attribute
}

// Regular attribute
elseif (!$this->isDirty($attribute)) {
continue; // Not changed
}
Expand Down

0 comments on commit a994930

Please sign in to comment.