From 27c778f4bf76a4031e084e00ebb35f41da5e275e Mon Sep 17 00:00:00 2001 From: Shlee Date: Sat, 29 Aug 2026 12:34:49 +0930 Subject: [PATCH] Remove duplicate boilerplate code in documentation Removed duplicate lines from username validation, notification, and fractal boilerplate sections. --- notes/DeduplicationChanges.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/notes/DeduplicationChanges.md b/notes/DeduplicationChanges.md index afa1e35d3..2d9e3be60 100644 --- a/notes/DeduplicationChanges.md +++ b/notes/DeduplicationChanges.md @@ -1,5 +1,5 @@ # Username validation boilerplate -`new ValidUsername,` +- `new ValidUsername,` replaces ``` function ($attribute, $value, $fail) { @@ -36,8 +36,8 @@ replaces ``` # Notification boilerplate -`NotificationService::createNotification($recipient->id, $profile->id, 'dm', $dm->id, DirectMessage::class);` -`NotificationService::firstOrCreateNotification($parent->profile_id, $actor->id, 'share', $parent->id, Status::class);` +- `NotificationService::createNotification($recipient->id, $profile->id, 'dm', $dm->id, DirectMessage::class);` +- `NotificationService::firstOrCreateNotification($parent->profile_id, $actor->id, 'share', $parent->id, Status::class);` replaces repeated ``` $notification = new Notification; @@ -50,8 +50,8 @@ replaces repeated ``` # fractal boilerplate for items and collection -`$activity = FractalService::item($follow, new AcceptFollow);` -`return FractalService::collection($media, new MediaTransformer);` +- `$activity = FractalService::item($follow, new AcceptFollow);` +- `return FractalService::collection($media, new MediaTransformer);` replaces ```