From 6c0df10ed43bb22ef2e8c93d0ab55e48436d7ac6 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Thu, 23 Jan 2025 10:21:55 +0000 Subject: [PATCH] Use constructor property promotion in events --- src/Events/AssetContainerBlueprintFound.php | 9 +-------- src/Events/AssetContainerCreated.php | 5 +---- src/Events/AssetContainerCreating.php | 5 +---- src/Events/AssetContainerDeleted.php | 5 +---- src/Events/AssetContainerDeleting.php | 5 +---- src/Events/AssetContainerSaved.php | 5 +---- src/Events/AssetContainerSaving.php | 5 +---- src/Events/AssetCreated.php | 5 +---- src/Events/AssetCreating.php | 5 +---- src/Events/AssetDeleted.php | 5 +---- src/Events/AssetDeleting.php | 5 +---- src/Events/AssetFolderDeleted.php | 5 +---- src/Events/AssetFolderSaved.php | 5 +---- src/Events/AssetReferencesUpdated.php | 5 +---- src/Events/AssetReplaced.php | 7 +------ src/Events/AssetReuploaded.php | 5 +---- src/Events/AssetSaved.php | 5 +---- src/Events/AssetSaving.php | 5 +---- src/Events/AssetUploaded.php | 5 +---- src/Events/BlueprintCreated.php | 5 +---- src/Events/BlueprintCreating.php | 5 +---- src/Events/BlueprintDeleted.php | 5 +---- src/Events/BlueprintDeleting.php | 5 +---- src/Events/BlueprintReset.php | 5 +---- src/Events/BlueprintSaved.php | 5 +---- src/Events/BlueprintSaving.php | 5 +---- src/Events/CollectionCreated.php | 5 +---- src/Events/CollectionCreating.php | 5 +---- src/Events/CollectionDeleted.php | 5 +---- src/Events/CollectionDeleting.php | 5 +---- src/Events/CollectionSaved.php | 5 +---- src/Events/CollectionSaving.php | 5 +---- src/Events/CollectionTreeDeleted.php | 5 +---- src/Events/CollectionTreeSaved.php | 5 +---- src/Events/CollectionTreeSaving.php | 5 +---- src/Events/EntryBlueprintFound.php | 7 +------ src/Events/EntryCreated.php | 5 +---- src/Events/EntryCreating.php | 5 +---- src/Events/EntryDeleted.php | 5 +---- src/Events/EntryDeleting.php | 5 +---- src/Events/EntrySaved.php | 4 +--- src/Events/EntrySaving.php | 5 +---- src/Events/EntryScheduleReached.php | 5 +---- src/Events/FieldsetCreated.php | 5 +---- src/Events/FieldsetCreating.php | 5 +---- src/Events/FieldsetDeleted.php | 5 +---- src/Events/FieldsetDeleting.php | 5 +---- src/Events/FieldsetReset.php | 5 +---- src/Events/FieldsetSaved.php | 5 +---- src/Events/FieldsetSaving.php | 5 +---- src/Events/FormBlueprintFound.php | 7 +------ src/Events/FormCreated.php | 5 +---- src/Events/FormCreating.php | 5 +---- src/Events/FormDeleted.php | 5 +---- src/Events/FormDeleting.php | 5 +---- src/Events/FormSaved.php | 5 +---- src/Events/FormSaving.php | 5 +---- src/Events/FormSubmitted.php | 5 +---- src/Events/GlideImageGenerated.php | 7 +------ src/Events/GlobalSetCreated.php | 5 +---- src/Events/GlobalSetCreating.php | 5 +---- src/Events/GlobalSetDeleted.php | 5 +---- src/Events/GlobalSetDeleting.php | 5 +---- src/Events/GlobalSetSaved.php | 5 +---- src/Events/GlobalSetSaving.php | 5 +---- src/Events/GlobalVariablesBlueprintFound.php | 7 +------ src/Events/GlobalVariablesCreated.php | 5 +---- src/Events/GlobalVariablesCreating.php | 5 +---- src/Events/GlobalVariablesDeleted.php | 5 +---- src/Events/GlobalVariablesDeleting.php | 5 +---- src/Events/GlobalVariablesSaved.php | 5 +---- src/Events/GlobalVariablesSaving.php | 5 +---- src/Events/LocalizedTermDeleted.php | 5 +---- src/Events/LocalizedTermSaved.php | 5 +---- src/Events/NavBlueprintFound.php | 7 +------ src/Events/NavCreated.php | 5 +---- src/Events/NavCreating.php | 5 +---- src/Events/NavDeleted.php | 5 +---- src/Events/NavDeleting.php | 5 +---- src/Events/NavSaved.php | 5 +---- src/Events/NavSaving.php | 5 +---- src/Events/NavTreeDeleted.php | 5 +---- src/Events/NavTreeSaved.php | 5 +---- src/Events/NavTreeSaving.php | 5 +---- src/Events/ResponseCreated.php | 11 +---------- src/Events/RevisionDeleted.php | 5 +---- src/Events/RevisionSaved.php | 5 +---- src/Events/RevisionSaving.php | 5 +---- src/Events/RoleDeleted.php | 5 +---- src/Events/RoleSaved.php | 5 +---- src/Events/SiteCreated.php | 1 - src/Events/SiteDeleted.php | 1 - src/Events/SiteSaved.php | 1 - src/Events/SubmissionCreated.php | 5 +---- src/Events/SubmissionCreating.php | 5 +---- src/Events/SubmissionDeleted.php | 5 +---- src/Events/SubmissionSaved.php | 5 +---- src/Events/SubmissionSaving.php | 5 +---- src/Events/TaxonomyCreated.php | 5 +---- src/Events/TaxonomyCreating.php | 5 +---- src/Events/TaxonomyDeleted.php | 5 +---- src/Events/TaxonomyDeleting.php | 5 +---- src/Events/TaxonomySaved.php | 5 +---- src/Events/TaxonomySaving.php | 5 +---- src/Events/TermBlueprintFound.php | 7 +------ src/Events/TermCreated.php | 5 +---- src/Events/TermCreating.php | 5 +---- src/Events/TermDeleted.php | 5 +---- src/Events/TermDeleting.php | 5 +---- src/Events/TermReferencesUpdated.php | 5 +---- src/Events/TermSaved.php | 5 +---- src/Events/TermSaving.php | 5 +---- src/Events/UserBlueprintFound.php | 5 +---- src/Events/UserCreated.php | 5 +---- src/Events/UserCreating.php | 5 +---- src/Events/UserDeleted.php | 5 +---- src/Events/UserDeleting.php | 5 +---- src/Events/UserGroupBlueprintFound.php | 5 +---- src/Events/UserGroupDeleted.php | 5 +---- src/Events/UserGroupSaved.php | 5 +---- src/Events/UserRegistered.php | 5 +---- src/Events/UserRegistering.php | 5 +---- src/Events/UserSaved.php | 5 +---- src/Events/UserSaving.php | 5 +---- 124 files changed, 121 insertions(+), 510 deletions(-) diff --git a/src/Events/AssetContainerBlueprintFound.php b/src/Events/AssetContainerBlueprintFound.php index 8bb6218d2c..36374aad53 100644 --- a/src/Events/AssetContainerBlueprintFound.php +++ b/src/Events/AssetContainerBlueprintFound.php @@ -4,14 +4,7 @@ class AssetContainerBlueprintFound extends Event { - public $blueprint; - public $container; - public $asset; - - public function __construct($blueprint, $container = null, $asset = null) + public function __construct(public $blueprint, public $container = null, public $asset = null) { - $this->blueprint = $blueprint; - $this->container = $container; - $this->asset = $asset; } } diff --git a/src/Events/AssetContainerCreated.php b/src/Events/AssetContainerCreated.php index 9d89f21e83..1254f6c1ec 100644 --- a/src/Events/AssetContainerCreated.php +++ b/src/Events/AssetContainerCreated.php @@ -4,10 +4,7 @@ class AssetContainerCreated extends Event { - public $container; - - public function __construct($container) + public function __construct(public $container) { - $this->container = $container; } } diff --git a/src/Events/AssetContainerCreating.php b/src/Events/AssetContainerCreating.php index 661015a402..a621cdfd63 100644 --- a/src/Events/AssetContainerCreating.php +++ b/src/Events/AssetContainerCreating.php @@ -4,11 +4,8 @@ class AssetContainerCreating extends Event { - public $container; - - public function __construct($container) + public function __construct(public $container) { - $this->container = $container; } /** diff --git a/src/Events/AssetContainerDeleted.php b/src/Events/AssetContainerDeleted.php index d622e31290..fe14939ab6 100644 --- a/src/Events/AssetContainerDeleted.php +++ b/src/Events/AssetContainerDeleted.php @@ -6,11 +6,8 @@ class AssetContainerDeleted extends Event implements ProvidesCommitMessage { - public $container; - - public function __construct($container) + public function __construct(public $container) { - $this->container = $container; } public function commitMessage() diff --git a/src/Events/AssetContainerDeleting.php b/src/Events/AssetContainerDeleting.php index 8a13dfcb56..2f0d790809 100644 --- a/src/Events/AssetContainerDeleting.php +++ b/src/Events/AssetContainerDeleting.php @@ -4,11 +4,8 @@ class AssetContainerDeleting extends Event { - public $container; - - public function __construct($container) + public function __construct(public $container) { - $this->container = $container; } /** diff --git a/src/Events/AssetContainerSaved.php b/src/Events/AssetContainerSaved.php index 4029cb1048..aacacad692 100644 --- a/src/Events/AssetContainerSaved.php +++ b/src/Events/AssetContainerSaved.php @@ -6,11 +6,8 @@ class AssetContainerSaved extends Event implements ProvidesCommitMessage { - public $container; - - public function __construct($container) + public function __construct(public $container) { - $this->container = $container; } public function commitMessage() diff --git a/src/Events/AssetContainerSaving.php b/src/Events/AssetContainerSaving.php index 481a98d1bd..f71c924074 100644 --- a/src/Events/AssetContainerSaving.php +++ b/src/Events/AssetContainerSaving.php @@ -4,11 +4,8 @@ class AssetContainerSaving extends Event { - public $container; - - public function __construct($container) + public function __construct(public $container) { - $this->container = $container; } /** diff --git a/src/Events/AssetCreated.php b/src/Events/AssetCreated.php index d01a048378..0588dd148a 100644 --- a/src/Events/AssetCreated.php +++ b/src/Events/AssetCreated.php @@ -4,10 +4,7 @@ class AssetCreated extends Event { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } } diff --git a/src/Events/AssetCreating.php b/src/Events/AssetCreating.php index 887d9d07a1..a375c80c9b 100644 --- a/src/Events/AssetCreating.php +++ b/src/Events/AssetCreating.php @@ -4,11 +4,8 @@ class AssetCreating extends Event { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } /** diff --git a/src/Events/AssetDeleted.php b/src/Events/AssetDeleted.php index 707cb28f87..9b5d33e1e6 100644 --- a/src/Events/AssetDeleted.php +++ b/src/Events/AssetDeleted.php @@ -6,11 +6,8 @@ class AssetDeleted extends Event implements ProvidesCommitMessage { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } public function commitMessage() diff --git a/src/Events/AssetDeleting.php b/src/Events/AssetDeleting.php index b278a86d14..2eadb47767 100644 --- a/src/Events/AssetDeleting.php +++ b/src/Events/AssetDeleting.php @@ -4,11 +4,8 @@ class AssetDeleting extends Event { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } /** diff --git a/src/Events/AssetFolderDeleted.php b/src/Events/AssetFolderDeleted.php index 8b9b5656f3..2e7503f5ca 100644 --- a/src/Events/AssetFolderDeleted.php +++ b/src/Events/AssetFolderDeleted.php @@ -6,11 +6,8 @@ class AssetFolderDeleted extends Event implements ProvidesCommitMessage { - public $folder; - - public function __construct($folder) + public function __construct(public $folder) { - $this->folder = $folder; } public function commitMessage() diff --git a/src/Events/AssetFolderSaved.php b/src/Events/AssetFolderSaved.php index b7706ba609..63ff5301e1 100644 --- a/src/Events/AssetFolderSaved.php +++ b/src/Events/AssetFolderSaved.php @@ -6,11 +6,8 @@ class AssetFolderSaved extends Event implements ProvidesCommitMessage { - public $folder; - - public function __construct($folder) + public function __construct(public $folder) { - $this->folder = $folder; } public function commitMessage() diff --git a/src/Events/AssetReferencesUpdated.php b/src/Events/AssetReferencesUpdated.php index 85ff63b902..a9a57041fa 100644 --- a/src/Events/AssetReferencesUpdated.php +++ b/src/Events/AssetReferencesUpdated.php @@ -6,11 +6,8 @@ class AssetReferencesUpdated extends Event implements ProvidesCommitMessage { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } public function commitMessage() diff --git a/src/Events/AssetReplaced.php b/src/Events/AssetReplaced.php index 42eb05543a..466053c619 100644 --- a/src/Events/AssetReplaced.php +++ b/src/Events/AssetReplaced.php @@ -4,12 +4,7 @@ class AssetReplaced extends Event { - public $originalAsset; - public $newAsset; - - public function __construct($originalAsset, $newAsset) + public function __construct(public $originalAsset, public $newAsset) { - $this->originalAsset = $originalAsset; - $this->newAsset = $newAsset; } } diff --git a/src/Events/AssetReuploaded.php b/src/Events/AssetReuploaded.php index 0efc2f0d0b..fe7f328bb6 100644 --- a/src/Events/AssetReuploaded.php +++ b/src/Events/AssetReuploaded.php @@ -6,11 +6,8 @@ class AssetReuploaded extends Event implements ProvidesCommitMessage { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } public function commitMessage() diff --git a/src/Events/AssetSaved.php b/src/Events/AssetSaved.php index 44d0c7a6f8..8c6cd86707 100644 --- a/src/Events/AssetSaved.php +++ b/src/Events/AssetSaved.php @@ -6,11 +6,8 @@ class AssetSaved extends Event implements ProvidesCommitMessage { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } public function commitMessage() diff --git a/src/Events/AssetSaving.php b/src/Events/AssetSaving.php index 4d766d799b..535f75b938 100644 --- a/src/Events/AssetSaving.php +++ b/src/Events/AssetSaving.php @@ -4,11 +4,8 @@ class AssetSaving extends Event { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } /** diff --git a/src/Events/AssetUploaded.php b/src/Events/AssetUploaded.php index 915d9ffb16..d1015639f1 100644 --- a/src/Events/AssetUploaded.php +++ b/src/Events/AssetUploaded.php @@ -6,11 +6,8 @@ class AssetUploaded extends Event implements ProvidesCommitMessage { - public $asset; - - public function __construct($asset) + public function __construct(public $asset) { - $this->asset = $asset; } public function commitMessage() diff --git a/src/Events/BlueprintCreated.php b/src/Events/BlueprintCreated.php index 8d0920b3e2..0632c267ab 100644 --- a/src/Events/BlueprintCreated.php +++ b/src/Events/BlueprintCreated.php @@ -4,10 +4,7 @@ class BlueprintCreated extends Event { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } } diff --git a/src/Events/BlueprintCreating.php b/src/Events/BlueprintCreating.php index 51b630bc9d..44425253d5 100644 --- a/src/Events/BlueprintCreating.php +++ b/src/Events/BlueprintCreating.php @@ -4,11 +4,8 @@ class BlueprintCreating extends Event { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } /** diff --git a/src/Events/BlueprintDeleted.php b/src/Events/BlueprintDeleted.php index befdcc604e..81ad7727de 100644 --- a/src/Events/BlueprintDeleted.php +++ b/src/Events/BlueprintDeleted.php @@ -6,11 +6,8 @@ class BlueprintDeleted extends Event implements ProvidesCommitMessage { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } public function commitMessage() diff --git a/src/Events/BlueprintDeleting.php b/src/Events/BlueprintDeleting.php index 5e9729424d..9d3b3f8330 100644 --- a/src/Events/BlueprintDeleting.php +++ b/src/Events/BlueprintDeleting.php @@ -4,11 +4,8 @@ class BlueprintDeleting extends Event { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } /** diff --git a/src/Events/BlueprintReset.php b/src/Events/BlueprintReset.php index 2de760bb2e..1a074e801b 100644 --- a/src/Events/BlueprintReset.php +++ b/src/Events/BlueprintReset.php @@ -6,11 +6,8 @@ class BlueprintReset extends Event implements ProvidesCommitMessage { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } public function commitMessage() diff --git a/src/Events/BlueprintSaved.php b/src/Events/BlueprintSaved.php index 2380ba2b38..9aa43ae0eb 100644 --- a/src/Events/BlueprintSaved.php +++ b/src/Events/BlueprintSaved.php @@ -6,11 +6,8 @@ class BlueprintSaved extends Event implements ProvidesCommitMessage { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } public function commitMessage() diff --git a/src/Events/BlueprintSaving.php b/src/Events/BlueprintSaving.php index 9d1a6973a0..1129baa2b9 100644 --- a/src/Events/BlueprintSaving.php +++ b/src/Events/BlueprintSaving.php @@ -4,11 +4,8 @@ class BlueprintSaving extends Event { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } /** diff --git a/src/Events/CollectionCreated.php b/src/Events/CollectionCreated.php index 2665be3760..3b015b875f 100644 --- a/src/Events/CollectionCreated.php +++ b/src/Events/CollectionCreated.php @@ -4,10 +4,7 @@ class CollectionCreated extends Event { - public $collection; - - public function __construct($collection) + public function __construct(public $collection) { - $this->collection = $collection; } } diff --git a/src/Events/CollectionCreating.php b/src/Events/CollectionCreating.php index ab46413926..f60b8588a2 100644 --- a/src/Events/CollectionCreating.php +++ b/src/Events/CollectionCreating.php @@ -4,11 +4,8 @@ class CollectionCreating extends Event { - public $collection; - - public function __construct($collection) + public function __construct(public $collection) { - $this->collection = $collection; } /** diff --git a/src/Events/CollectionDeleted.php b/src/Events/CollectionDeleted.php index e9f2944c84..20ac5bd0d8 100644 --- a/src/Events/CollectionDeleted.php +++ b/src/Events/CollectionDeleted.php @@ -6,11 +6,8 @@ class CollectionDeleted extends Event implements ProvidesCommitMessage { - public $collection; - - public function __construct($collection) + public function __construct(public $collection) { - $this->collection = $collection; } public function commitMessage() diff --git a/src/Events/CollectionDeleting.php b/src/Events/CollectionDeleting.php index 43df645dd1..d216bf6043 100644 --- a/src/Events/CollectionDeleting.php +++ b/src/Events/CollectionDeleting.php @@ -4,11 +4,8 @@ class CollectionDeleting extends Event { - public $collection; - - public function __construct($collection) + public function __construct(public $collection) { - $this->collection = $collection; } /** diff --git a/src/Events/CollectionSaved.php b/src/Events/CollectionSaved.php index 48df90b659..320c81cb35 100644 --- a/src/Events/CollectionSaved.php +++ b/src/Events/CollectionSaved.php @@ -6,11 +6,8 @@ class CollectionSaved extends Event implements ProvidesCommitMessage { - public $collection; - - public function __construct($collection) + public function __construct(public $collection) { - $this->collection = $collection; } public function commitMessage() diff --git a/src/Events/CollectionSaving.php b/src/Events/CollectionSaving.php index b27e185d48..4d02803683 100644 --- a/src/Events/CollectionSaving.php +++ b/src/Events/CollectionSaving.php @@ -4,11 +4,8 @@ class CollectionSaving extends Event { - public $collection; - - public function __construct($collection) + public function __construct(public $collection) { - $this->collection = $collection; } /** diff --git a/src/Events/CollectionTreeDeleted.php b/src/Events/CollectionTreeDeleted.php index 31123d5b34..0e49f041db 100644 --- a/src/Events/CollectionTreeDeleted.php +++ b/src/Events/CollectionTreeDeleted.php @@ -6,11 +6,8 @@ class CollectionTreeDeleted extends Event implements ProvidesCommitMessage { - public $tree; - - public function __construct($tree) + public function __construct(public $tree) { - $this->tree = $tree; } public function commitMessage() diff --git a/src/Events/CollectionTreeSaved.php b/src/Events/CollectionTreeSaved.php index e8e537bf33..f8817e897e 100644 --- a/src/Events/CollectionTreeSaved.php +++ b/src/Events/CollectionTreeSaved.php @@ -6,11 +6,8 @@ class CollectionTreeSaved extends Event implements ProvidesCommitMessage { - public $tree; - - public function __construct($tree) + public function __construct(public $tree) { - $this->tree = $tree; } public function commitMessage() diff --git a/src/Events/CollectionTreeSaving.php b/src/Events/CollectionTreeSaving.php index 02537e2f81..27be32b9d3 100644 --- a/src/Events/CollectionTreeSaving.php +++ b/src/Events/CollectionTreeSaving.php @@ -4,11 +4,8 @@ class CollectionTreeSaving extends Event { - public $tree; - - public function __construct($tree) + public function __construct(public $tree) { - $this->tree = $tree; } /** diff --git a/src/Events/EntryBlueprintFound.php b/src/Events/EntryBlueprintFound.php index 324b7a4981..823d4e564b 100644 --- a/src/Events/EntryBlueprintFound.php +++ b/src/Events/EntryBlueprintFound.php @@ -4,12 +4,7 @@ class EntryBlueprintFound extends Event { - public $blueprint; - public $entry; - - public function __construct($blueprint, $entry = null) + public function __construct(public $blueprint, public $entry = null) { - $this->blueprint = $blueprint; - $this->entry = $entry; } } diff --git a/src/Events/EntryCreated.php b/src/Events/EntryCreated.php index 48a2b3ed4f..8f064e7e93 100644 --- a/src/Events/EntryCreated.php +++ b/src/Events/EntryCreated.php @@ -4,10 +4,7 @@ class EntryCreated extends Event { - public $entry; - - public function __construct($entry) + public function __construct(public $entry) { - $this->entry = $entry; } } diff --git a/src/Events/EntryCreating.php b/src/Events/EntryCreating.php index 68b558b5bb..9e6c782611 100644 --- a/src/Events/EntryCreating.php +++ b/src/Events/EntryCreating.php @@ -4,11 +4,8 @@ class EntryCreating extends Event { - public $entry; - - public function __construct($entry) + public function __construct(public $entry) { - $this->entry = $entry; } /** diff --git a/src/Events/EntryDeleted.php b/src/Events/EntryDeleted.php index b95e13b112..57a82e8985 100644 --- a/src/Events/EntryDeleted.php +++ b/src/Events/EntryDeleted.php @@ -6,11 +6,8 @@ class EntryDeleted extends Event implements ProvidesCommitMessage { - public $entry; - - public function __construct($entry) + public function __construct(public $entry) { - $this->entry = $entry; } public function commitMessage() diff --git a/src/Events/EntryDeleting.php b/src/Events/EntryDeleting.php index 3b2e64ce8f..8d62b8104c 100644 --- a/src/Events/EntryDeleting.php +++ b/src/Events/EntryDeleting.php @@ -4,11 +4,8 @@ class EntryDeleting extends Event { - public $entry; - - public function __construct($entry) + public function __construct(public $entry) { - $this->entry = $entry; } /** diff --git a/src/Events/EntrySaved.php b/src/Events/EntrySaved.php index 423ce0ddf6..50d28ca23c 100644 --- a/src/Events/EntrySaved.php +++ b/src/Events/EntrySaved.php @@ -7,12 +7,10 @@ class EntrySaved extends Event implements ProvidesCommitMessage { - public $entry; public $initiator; - public function __construct($entry) + public function __construct(public $entry) { - $this->entry = $entry; $this->initiator = InitiatorStack::entry($entry)->initiator(); } diff --git a/src/Events/EntrySaving.php b/src/Events/EntrySaving.php index 609a42fd15..06539c14a1 100644 --- a/src/Events/EntrySaving.php +++ b/src/Events/EntrySaving.php @@ -4,11 +4,8 @@ class EntrySaving extends Event { - public $entry; - - public function __construct($entry) + public function __construct(public $entry) { - $this->entry = $entry; } /** diff --git a/src/Events/EntryScheduleReached.php b/src/Events/EntryScheduleReached.php index 15196ca238..421fbf81e2 100644 --- a/src/Events/EntryScheduleReached.php +++ b/src/Events/EntryScheduleReached.php @@ -6,11 +6,8 @@ class EntryScheduleReached extends Event implements ProvidesCommitMessage { - public $entry; - - public function __construct($entry) + public function __construct(public $entry) { - $this->entry = $entry; } public function commitMessage() diff --git a/src/Events/FieldsetCreated.php b/src/Events/FieldsetCreated.php index 691a4d7365..fbc461ad84 100644 --- a/src/Events/FieldsetCreated.php +++ b/src/Events/FieldsetCreated.php @@ -4,10 +4,7 @@ class FieldsetCreated extends Event { - public $fieldset; - - public function __construct($fieldset) + public function __construct(public $fieldset) { - $this->fieldset = $fieldset; } } diff --git a/src/Events/FieldsetCreating.php b/src/Events/FieldsetCreating.php index 6685185a13..a26fd6d306 100644 --- a/src/Events/FieldsetCreating.php +++ b/src/Events/FieldsetCreating.php @@ -4,11 +4,8 @@ class FieldsetCreating extends Event { - public $fieldset; - - public function __construct($fieldset) + public function __construct(public $fieldset) { - $this->fieldset = $fieldset; } /** diff --git a/src/Events/FieldsetDeleted.php b/src/Events/FieldsetDeleted.php index 15b9d3aca0..c09f766b64 100644 --- a/src/Events/FieldsetDeleted.php +++ b/src/Events/FieldsetDeleted.php @@ -6,11 +6,8 @@ class FieldsetDeleted extends Event implements ProvidesCommitMessage { - public $fieldset; - - public function __construct($fieldset) + public function __construct(public $fieldset) { - $this->fieldset = $fieldset; } public function commitMessage() diff --git a/src/Events/FieldsetDeleting.php b/src/Events/FieldsetDeleting.php index 86722807bd..af09dcbfab 100644 --- a/src/Events/FieldsetDeleting.php +++ b/src/Events/FieldsetDeleting.php @@ -4,11 +4,8 @@ class FieldsetDeleting extends Event { - public $fieldset; - - public function __construct($fieldset) + public function __construct(public $fieldset) { - $this->fieldset = $fieldset; } /** diff --git a/src/Events/FieldsetReset.php b/src/Events/FieldsetReset.php index c403389e2c..a6aaba54bc 100644 --- a/src/Events/FieldsetReset.php +++ b/src/Events/FieldsetReset.php @@ -6,11 +6,8 @@ class FieldsetReset extends Event implements ProvidesCommitMessage { - public $fieldset; - - public function __construct($fieldset) + public function __construct(public $fieldset) { - $this->fieldset = $fieldset; } public function commitMessage() diff --git a/src/Events/FieldsetSaved.php b/src/Events/FieldsetSaved.php index 166b8be70a..40f157ca84 100644 --- a/src/Events/FieldsetSaved.php +++ b/src/Events/FieldsetSaved.php @@ -6,11 +6,8 @@ class FieldsetSaved extends Event implements ProvidesCommitMessage { - public $fieldset; - - public function __construct($fieldset) + public function __construct(public $fieldset) { - $this->fieldset = $fieldset; } public function commitMessage() diff --git a/src/Events/FieldsetSaving.php b/src/Events/FieldsetSaving.php index bf5f863eec..ef7ed93113 100644 --- a/src/Events/FieldsetSaving.php +++ b/src/Events/FieldsetSaving.php @@ -4,11 +4,8 @@ class FieldsetSaving extends Event { - public $fieldset; - - public function __construct($fieldset) + public function __construct(public $fieldset) { - $this->fieldset = $fieldset; } /** diff --git a/src/Events/FormBlueprintFound.php b/src/Events/FormBlueprintFound.php index 0603802a5a..bc64c6e660 100644 --- a/src/Events/FormBlueprintFound.php +++ b/src/Events/FormBlueprintFound.php @@ -4,12 +4,7 @@ class FormBlueprintFound extends Event { - public $blueprint; - public $form; - - public function __construct($blueprint, $form = null) + public function __construct(public $blueprint, public $form = null) { - $this->blueprint = $blueprint; - $this->form = $form; } } diff --git a/src/Events/FormCreated.php b/src/Events/FormCreated.php index 80248cf58f..112c72fcb6 100644 --- a/src/Events/FormCreated.php +++ b/src/Events/FormCreated.php @@ -4,10 +4,7 @@ class FormCreated extends Event { - public $form; - - public function __construct($form) + public function __construct(public $form) { - $this->form = $form; } } diff --git a/src/Events/FormCreating.php b/src/Events/FormCreating.php index e952b17847..e9a86eefdd 100644 --- a/src/Events/FormCreating.php +++ b/src/Events/FormCreating.php @@ -4,11 +4,8 @@ class FormCreating extends Event { - public $form; - - public function __construct($form) + public function __construct(public $form) { - $this->form = $form; } /** diff --git a/src/Events/FormDeleted.php b/src/Events/FormDeleted.php index 9625e9e4c1..88e0f2914b 100644 --- a/src/Events/FormDeleted.php +++ b/src/Events/FormDeleted.php @@ -6,11 +6,8 @@ class FormDeleted extends Event implements ProvidesCommitMessage { - public $form; - - public function __construct($form) + public function __construct(public $form) { - $this->form = $form; } public function commitMessage() diff --git a/src/Events/FormDeleting.php b/src/Events/FormDeleting.php index 9f00481367..35745cfd34 100644 --- a/src/Events/FormDeleting.php +++ b/src/Events/FormDeleting.php @@ -4,11 +4,8 @@ class FormDeleting extends Event { - public $form; - - public function __construct($form) + public function __construct(public $form) { - $this->form = $form; } /** diff --git a/src/Events/FormSaved.php b/src/Events/FormSaved.php index 0eb12a1a76..420b5df4f2 100644 --- a/src/Events/FormSaved.php +++ b/src/Events/FormSaved.php @@ -6,11 +6,8 @@ class FormSaved extends Event implements ProvidesCommitMessage { - public $form; - - public function __construct($form) + public function __construct(public $form) { - $this->form = $form; } public function commitMessage() diff --git a/src/Events/FormSaving.php b/src/Events/FormSaving.php index 21c49b265d..513f818485 100644 --- a/src/Events/FormSaving.php +++ b/src/Events/FormSaving.php @@ -4,11 +4,8 @@ class FormSaving extends Event { - public $form; - - public function __construct($form) + public function __construct(public $form) { - $this->form = $form; } /** diff --git a/src/Events/FormSubmitted.php b/src/Events/FormSubmitted.php index 434887e209..cb81358b3c 100644 --- a/src/Events/FormSubmitted.php +++ b/src/Events/FormSubmitted.php @@ -6,11 +6,8 @@ class FormSubmitted extends Event { - public $submission; - - public function __construct(Submission $submission) + public function __construct(public Submission $submission) { - $this->submission = $submission; } /** diff --git a/src/Events/GlideImageGenerated.php b/src/Events/GlideImageGenerated.php index f046965aaa..8f1aed858b 100644 --- a/src/Events/GlideImageGenerated.php +++ b/src/Events/GlideImageGenerated.php @@ -4,12 +4,7 @@ class GlideImageGenerated extends Event { - public $path; - public $params; - - public function __construct($path, $params) + public function __construct(public $path, public $params) { - $this->path = $path; - $this->params = $params; } } diff --git a/src/Events/GlobalSetCreated.php b/src/Events/GlobalSetCreated.php index 776bd78b34..ac58490b35 100644 --- a/src/Events/GlobalSetCreated.php +++ b/src/Events/GlobalSetCreated.php @@ -4,10 +4,7 @@ class GlobalSetCreated extends Event { - public $globals; - - public function __construct($globals) + public function __construct(public $globals) { - $this->globals = $globals; } } diff --git a/src/Events/GlobalSetCreating.php b/src/Events/GlobalSetCreating.php index 2d8600c38d..5d535df8f6 100644 --- a/src/Events/GlobalSetCreating.php +++ b/src/Events/GlobalSetCreating.php @@ -4,11 +4,8 @@ class GlobalSetCreating extends Event { - public $globals; - - public function __construct($globals) + public function __construct(public $globals) { - $this->globals = $globals; } /** diff --git a/src/Events/GlobalSetDeleted.php b/src/Events/GlobalSetDeleted.php index a87478b772..743ff23540 100644 --- a/src/Events/GlobalSetDeleted.php +++ b/src/Events/GlobalSetDeleted.php @@ -6,11 +6,8 @@ class GlobalSetDeleted extends Event implements ProvidesCommitMessage { - public $globals; - - public function __construct($globals) + public function __construct(public $globals) { - $this->globals = $globals; } public function commitMessage() diff --git a/src/Events/GlobalSetDeleting.php b/src/Events/GlobalSetDeleting.php index bbbc5549de..570098c1f9 100644 --- a/src/Events/GlobalSetDeleting.php +++ b/src/Events/GlobalSetDeleting.php @@ -4,11 +4,8 @@ class GlobalSetDeleting extends Event { - public $globals; - - public function __construct($globals) + public function __construct(public $globals) { - $this->globals = $globals; } /** diff --git a/src/Events/GlobalSetSaved.php b/src/Events/GlobalSetSaved.php index 3f9ff3afc7..728192644e 100644 --- a/src/Events/GlobalSetSaved.php +++ b/src/Events/GlobalSetSaved.php @@ -6,11 +6,8 @@ class GlobalSetSaved extends Event implements ProvidesCommitMessage { - public $globals; - - public function __construct($globals) + public function __construct(public $globals) { - $this->globals = $globals; } public function commitMessage() diff --git a/src/Events/GlobalSetSaving.php b/src/Events/GlobalSetSaving.php index 6858dff1d1..1a3b3e6352 100644 --- a/src/Events/GlobalSetSaving.php +++ b/src/Events/GlobalSetSaving.php @@ -4,11 +4,8 @@ class GlobalSetSaving extends Event { - public $globals; - - public function __construct($globals) + public function __construct(public $globals) { - $this->globals = $globals; } /** diff --git a/src/Events/GlobalVariablesBlueprintFound.php b/src/Events/GlobalVariablesBlueprintFound.php index 7f43cb4318..ea645c1a55 100644 --- a/src/Events/GlobalVariablesBlueprintFound.php +++ b/src/Events/GlobalVariablesBlueprintFound.php @@ -4,12 +4,7 @@ class GlobalVariablesBlueprintFound extends Event { - public $blueprint; - public $globals; - - public function __construct($blueprint, $globals = null) + public function __construct(public $blueprint, public $globals = null) { - $this->blueprint = $blueprint; - $this->globals = $globals; } } diff --git a/src/Events/GlobalVariablesCreated.php b/src/Events/GlobalVariablesCreated.php index ff18949f6f..a1f0e39c03 100644 --- a/src/Events/GlobalVariablesCreated.php +++ b/src/Events/GlobalVariablesCreated.php @@ -4,10 +4,7 @@ class GlobalVariablesCreated extends Event { - public $variables; - - public function __construct($variables) + public function __construct(public $variables) { - $this->variables = $variables; } } diff --git a/src/Events/GlobalVariablesCreating.php b/src/Events/GlobalVariablesCreating.php index 3d224042c4..630a25633f 100644 --- a/src/Events/GlobalVariablesCreating.php +++ b/src/Events/GlobalVariablesCreating.php @@ -4,11 +4,8 @@ class GlobalVariablesCreating extends Event { - public $variables; - - public function __construct($variables) + public function __construct(public $variables) { - $this->variables = $variables; } /** diff --git a/src/Events/GlobalVariablesDeleted.php b/src/Events/GlobalVariablesDeleted.php index 44afbf320c..20df8d7ba7 100644 --- a/src/Events/GlobalVariablesDeleted.php +++ b/src/Events/GlobalVariablesDeleted.php @@ -4,10 +4,7 @@ class GlobalVariablesDeleted extends Event { - public $variables; - - public function __construct($variables) + public function __construct(public $variables) { - $this->variables = $variables; } } diff --git a/src/Events/GlobalVariablesDeleting.php b/src/Events/GlobalVariablesDeleting.php index 9db8c2e8b9..69c24b3f47 100644 --- a/src/Events/GlobalVariablesDeleting.php +++ b/src/Events/GlobalVariablesDeleting.php @@ -4,11 +4,8 @@ class GlobalVariablesDeleting extends Event { - public $variables; - - public function __construct($variables) + public function __construct(public $variables) { - $this->variables = $variables; } /** diff --git a/src/Events/GlobalVariablesSaved.php b/src/Events/GlobalVariablesSaved.php index 93a3538bf6..62f690f158 100644 --- a/src/Events/GlobalVariablesSaved.php +++ b/src/Events/GlobalVariablesSaved.php @@ -4,10 +4,7 @@ class GlobalVariablesSaved extends Event { - public $variables; - - public function __construct($variables) + public function __construct(public $variables) { - $this->variables = $variables; } } diff --git a/src/Events/GlobalVariablesSaving.php b/src/Events/GlobalVariablesSaving.php index df2996f536..594ea22bc2 100644 --- a/src/Events/GlobalVariablesSaving.php +++ b/src/Events/GlobalVariablesSaving.php @@ -4,11 +4,8 @@ class GlobalVariablesSaving extends Event { - public $variables; - - public function __construct($variables) + public function __construct(public $variables) { - $this->variables = $variables; } /** diff --git a/src/Events/LocalizedTermDeleted.php b/src/Events/LocalizedTermDeleted.php index 6964f4d5eb..5f72e9210e 100644 --- a/src/Events/LocalizedTermDeleted.php +++ b/src/Events/LocalizedTermDeleted.php @@ -4,10 +4,7 @@ class LocalizedTermDeleted extends Event { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } } diff --git a/src/Events/LocalizedTermSaved.php b/src/Events/LocalizedTermSaved.php index 77af1e0c88..0a50df3904 100644 --- a/src/Events/LocalizedTermSaved.php +++ b/src/Events/LocalizedTermSaved.php @@ -4,10 +4,7 @@ class LocalizedTermSaved extends Event { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } } diff --git a/src/Events/NavBlueprintFound.php b/src/Events/NavBlueprintFound.php index 02d69b55eb..4a200fa5df 100644 --- a/src/Events/NavBlueprintFound.php +++ b/src/Events/NavBlueprintFound.php @@ -4,12 +4,7 @@ class NavBlueprintFound extends Event { - public $blueprint; - public $nav; - - public function __construct($blueprint, $nav = null) + public function __construct(public $blueprint, public $nav = null) { - $this->blueprint = $blueprint; - $this->nav = $nav; } } diff --git a/src/Events/NavCreated.php b/src/Events/NavCreated.php index b9b29cdba5..610583f86f 100644 --- a/src/Events/NavCreated.php +++ b/src/Events/NavCreated.php @@ -4,10 +4,7 @@ class NavCreated extends Event { - public $nav; - - public function __construct($nav) + public function __construct(public $nav) { - $this->nav = $nav; } } diff --git a/src/Events/NavCreating.php b/src/Events/NavCreating.php index 5998cb0770..ada7d791e3 100644 --- a/src/Events/NavCreating.php +++ b/src/Events/NavCreating.php @@ -4,11 +4,8 @@ class NavCreating extends Event { - public $nav; - - public function __construct($nav) + public function __construct(public $nav) { - $this->nav = $nav; } /** diff --git a/src/Events/NavDeleted.php b/src/Events/NavDeleted.php index 4e118c4058..b3f4cb2318 100644 --- a/src/Events/NavDeleted.php +++ b/src/Events/NavDeleted.php @@ -6,11 +6,8 @@ class NavDeleted extends Event implements ProvidesCommitMessage { - public $nav; - - public function __construct($nav) + public function __construct(public $nav) { - $this->nav = $nav; } public function commitMessage() diff --git a/src/Events/NavDeleting.php b/src/Events/NavDeleting.php index be0f8d3e25..d64882ffc7 100644 --- a/src/Events/NavDeleting.php +++ b/src/Events/NavDeleting.php @@ -4,11 +4,8 @@ class NavDeleting extends Event { - public $nav; - - public function __construct($nav) + public function __construct(public $nav) { - $this->nav = $nav; } /** diff --git a/src/Events/NavSaved.php b/src/Events/NavSaved.php index 55778b9b16..a5f41dcefa 100644 --- a/src/Events/NavSaved.php +++ b/src/Events/NavSaved.php @@ -6,11 +6,8 @@ class NavSaved extends Event implements ProvidesCommitMessage { - public $nav; - - public function __construct($nav) + public function __construct(public $nav) { - $this->nav = $nav; } public function commitMessage() diff --git a/src/Events/NavSaving.php b/src/Events/NavSaving.php index 44df656ba6..8ae6accbef 100644 --- a/src/Events/NavSaving.php +++ b/src/Events/NavSaving.php @@ -4,11 +4,8 @@ class NavSaving extends Event { - public $nav; - - public function __construct($nav) + public function __construct(public $nav) { - $this->nav = $nav; } /** diff --git a/src/Events/NavTreeDeleted.php b/src/Events/NavTreeDeleted.php index ea9e056d0a..0c98073d83 100644 --- a/src/Events/NavTreeDeleted.php +++ b/src/Events/NavTreeDeleted.php @@ -6,11 +6,8 @@ class NavTreeDeleted extends Event implements ProvidesCommitMessage { - public $tree; - - public function __construct($tree) + public function __construct(public $tree) { - $this->tree = $tree; } public function commitMessage() diff --git a/src/Events/NavTreeSaved.php b/src/Events/NavTreeSaved.php index a86198f99b..c96c1a9058 100644 --- a/src/Events/NavTreeSaved.php +++ b/src/Events/NavTreeSaved.php @@ -6,11 +6,8 @@ class NavTreeSaved extends Event implements ProvidesCommitMessage { - public $tree; - - public function __construct($tree) + public function __construct(public $tree) { - $this->tree = $tree; } public function commitMessage() diff --git a/src/Events/NavTreeSaving.php b/src/Events/NavTreeSaving.php index 8b1f05b7cb..58b117e7ab 100644 --- a/src/Events/NavTreeSaving.php +++ b/src/Events/NavTreeSaving.php @@ -4,11 +4,8 @@ class NavTreeSaving extends Event { - public $tree; - - public function __construct($tree) + public function __construct(public $tree) { - $this->tree = $tree; } /** diff --git a/src/Events/ResponseCreated.php b/src/Events/ResponseCreated.php index f1fd9fa659..7908de4777 100644 --- a/src/Events/ResponseCreated.php +++ b/src/Events/ResponseCreated.php @@ -6,16 +6,7 @@ class ResponseCreated extends Event { - /** - * @var Response - */ - public $response; - - public $data; - - public function __construct(Response $response, $data) + public function __construct(public Response $response, public $data) { - $this->response = $response; - $this->data = $data; } } diff --git a/src/Events/RevisionDeleted.php b/src/Events/RevisionDeleted.php index df6d9c5dce..543c7e00c4 100644 --- a/src/Events/RevisionDeleted.php +++ b/src/Events/RevisionDeleted.php @@ -6,11 +6,8 @@ class RevisionDeleted extends Event implements ProvidesCommitMessage { - public $revision; - - public function __construct($revision) + public function __construct(public $revision) { - $this->revision = $revision; } public function commitMessage() diff --git a/src/Events/RevisionSaved.php b/src/Events/RevisionSaved.php index bb570e5fc8..d3f7ed361d 100644 --- a/src/Events/RevisionSaved.php +++ b/src/Events/RevisionSaved.php @@ -6,11 +6,8 @@ class RevisionSaved extends Event implements ProvidesCommitMessage { - public $revision; - - public function __construct($revision) + public function __construct(public $revision) { - $this->revision = $revision; } public function commitMessage() diff --git a/src/Events/RevisionSaving.php b/src/Events/RevisionSaving.php index 0385891dcf..8d295b2f00 100644 --- a/src/Events/RevisionSaving.php +++ b/src/Events/RevisionSaving.php @@ -4,11 +4,8 @@ class RevisionSaving extends Event { - public $revision; - - public function __construct($revision) + public function __construct(public $revision) { - $this->revision = $revision; } /** diff --git a/src/Events/RoleDeleted.php b/src/Events/RoleDeleted.php index 5325a14426..16c4651616 100644 --- a/src/Events/RoleDeleted.php +++ b/src/Events/RoleDeleted.php @@ -6,11 +6,8 @@ class RoleDeleted extends Event implements ProvidesCommitMessage { - public $role; - - public function __construct($role) + public function __construct(public $role) { - $this->role = $role; } public function commitMessage() diff --git a/src/Events/RoleSaved.php b/src/Events/RoleSaved.php index 19da980989..97e669f7e2 100644 --- a/src/Events/RoleSaved.php +++ b/src/Events/RoleSaved.php @@ -6,11 +6,8 @@ class RoleSaved extends Event implements ProvidesCommitMessage { - public $role; - - public function __construct($role) + public function __construct(public $role) { - $this->role = $role; } public function commitMessage() diff --git a/src/Events/SiteCreated.php b/src/Events/SiteCreated.php index 19e76434db..02fdf8ed5f 100644 --- a/src/Events/SiteCreated.php +++ b/src/Events/SiteCreated.php @@ -8,6 +8,5 @@ class SiteCreated extends Event { public function __construct(public Site $site) { - // } } diff --git a/src/Events/SiteDeleted.php b/src/Events/SiteDeleted.php index eeaf9bebb8..18cbd2c324 100644 --- a/src/Events/SiteDeleted.php +++ b/src/Events/SiteDeleted.php @@ -9,7 +9,6 @@ class SiteDeleted extends Event implements ProvidesCommitMessage { public function __construct(public Site $site) { - // } public function commitMessage() diff --git a/src/Events/SiteSaved.php b/src/Events/SiteSaved.php index 7507448e29..3032c71ee0 100644 --- a/src/Events/SiteSaved.php +++ b/src/Events/SiteSaved.php @@ -9,7 +9,6 @@ class SiteSaved extends Event implements ProvidesCommitMessage { public function __construct(public Site $site) { - // } public function commitMessage() diff --git a/src/Events/SubmissionCreated.php b/src/Events/SubmissionCreated.php index ec15c6f94f..227e20f801 100644 --- a/src/Events/SubmissionCreated.php +++ b/src/Events/SubmissionCreated.php @@ -4,10 +4,7 @@ class SubmissionCreated extends Event { - public $submission; - - public function __construct($submission) + public function __construct(public $submission) { - $this->submission = $submission; } } diff --git a/src/Events/SubmissionCreating.php b/src/Events/SubmissionCreating.php index a2e1dc6a12..a7ad5c930b 100644 --- a/src/Events/SubmissionCreating.php +++ b/src/Events/SubmissionCreating.php @@ -4,11 +4,8 @@ class SubmissionCreating extends Event { - public $submission; - - public function __construct($submission) + public function __construct(public $submission) { - $this->submission = $submission; } /** diff --git a/src/Events/SubmissionDeleted.php b/src/Events/SubmissionDeleted.php index 6476e75486..0f45be1556 100644 --- a/src/Events/SubmissionDeleted.php +++ b/src/Events/SubmissionDeleted.php @@ -6,11 +6,8 @@ class SubmissionDeleted extends Event implements ProvidesCommitMessage { - public $submission; - - public function __construct($submission) + public function __construct(public $submission) { - $this->submission = $submission; } public function commitMessage() diff --git a/src/Events/SubmissionSaved.php b/src/Events/SubmissionSaved.php index 47ee84b5cc..b2c9eb9e6c 100644 --- a/src/Events/SubmissionSaved.php +++ b/src/Events/SubmissionSaved.php @@ -6,11 +6,8 @@ class SubmissionSaved extends Event implements ProvidesCommitMessage { - public $submission; - - public function __construct($submission) + public function __construct(public $submission) { - $this->submission = $submission; } public function commitMessage() diff --git a/src/Events/SubmissionSaving.php b/src/Events/SubmissionSaving.php index 20e092dfbb..e632a22fd4 100644 --- a/src/Events/SubmissionSaving.php +++ b/src/Events/SubmissionSaving.php @@ -4,11 +4,8 @@ class SubmissionSaving extends Event { - public $submission; - - public function __construct($submission) + public function __construct(public $submission) { - $this->submission = $submission; } /** diff --git a/src/Events/TaxonomyCreated.php b/src/Events/TaxonomyCreated.php index ef696c3446..a2eca8569d 100644 --- a/src/Events/TaxonomyCreated.php +++ b/src/Events/TaxonomyCreated.php @@ -4,10 +4,7 @@ class TaxonomyCreated extends Event { - public $taxonomy; - - public function __construct($taxonomy) + public function __construct(public $taxonomy) { - $this->taxonomy = $taxonomy; } } diff --git a/src/Events/TaxonomyCreating.php b/src/Events/TaxonomyCreating.php index e21175a831..2f869eb4be 100644 --- a/src/Events/TaxonomyCreating.php +++ b/src/Events/TaxonomyCreating.php @@ -4,11 +4,8 @@ class TaxonomyCreating extends Event { - public $taxonomy; - - public function __construct($taxonomy) + public function __construct(public $taxonomy) { - $this->taxonomy = $taxonomy; } /** diff --git a/src/Events/TaxonomyDeleted.php b/src/Events/TaxonomyDeleted.php index 87c9700cd2..e0b7e060a5 100644 --- a/src/Events/TaxonomyDeleted.php +++ b/src/Events/TaxonomyDeleted.php @@ -6,11 +6,8 @@ class TaxonomyDeleted extends Event implements ProvidesCommitMessage { - public $taxonomy; - - public function __construct($taxonomy) + public function __construct(public $taxonomy) { - $this->taxonomy = $taxonomy; } public function commitMessage() diff --git a/src/Events/TaxonomyDeleting.php b/src/Events/TaxonomyDeleting.php index 8db9dee261..b157a192e8 100644 --- a/src/Events/TaxonomyDeleting.php +++ b/src/Events/TaxonomyDeleting.php @@ -4,11 +4,8 @@ class TaxonomyDeleting extends Event { - public $taxonomy; - - public function __construct($taxonomy) + public function __construct(public $taxonomy) { - $this->taxonomy = $taxonomy; } /** diff --git a/src/Events/TaxonomySaved.php b/src/Events/TaxonomySaved.php index 1463e51867..1d45978504 100644 --- a/src/Events/TaxonomySaved.php +++ b/src/Events/TaxonomySaved.php @@ -6,11 +6,8 @@ class TaxonomySaved extends Event implements ProvidesCommitMessage { - public $taxonomy; - - public function __construct($taxonomy) + public function __construct(public $taxonomy) { - $this->taxonomy = $taxonomy; } public function commitMessage() diff --git a/src/Events/TaxonomySaving.php b/src/Events/TaxonomySaving.php index e3a6853be6..fc1ac3e656 100644 --- a/src/Events/TaxonomySaving.php +++ b/src/Events/TaxonomySaving.php @@ -4,11 +4,8 @@ class TaxonomySaving extends Event { - public $taxonomy; - - public function __construct($taxonomy) + public function __construct(public $taxonomy) { - $this->taxonomy = $taxonomy; } /** diff --git a/src/Events/TermBlueprintFound.php b/src/Events/TermBlueprintFound.php index 2f35db5010..a2202dcfc8 100644 --- a/src/Events/TermBlueprintFound.php +++ b/src/Events/TermBlueprintFound.php @@ -4,12 +4,7 @@ class TermBlueprintFound extends Event { - public $blueprint; - public $term; - - public function __construct($blueprint, $term = null) + public function __construct(public $blueprint, public $term = null) { - $this->blueprint = $blueprint; - $this->term = $term; } } diff --git a/src/Events/TermCreated.php b/src/Events/TermCreated.php index 50cd65ce83..566aab36ae 100644 --- a/src/Events/TermCreated.php +++ b/src/Events/TermCreated.php @@ -4,10 +4,7 @@ class TermCreated extends Event { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } } diff --git a/src/Events/TermCreating.php b/src/Events/TermCreating.php index 788c0ef8c3..d8432b528a 100644 --- a/src/Events/TermCreating.php +++ b/src/Events/TermCreating.php @@ -4,11 +4,8 @@ class TermCreating extends Event { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } /** diff --git a/src/Events/TermDeleted.php b/src/Events/TermDeleted.php index 6ffe9003cc..2e711b31af 100644 --- a/src/Events/TermDeleted.php +++ b/src/Events/TermDeleted.php @@ -6,11 +6,8 @@ class TermDeleted extends Event implements ProvidesCommitMessage { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } public function commitMessage() diff --git a/src/Events/TermDeleting.php b/src/Events/TermDeleting.php index 4e29862b3d..179a701788 100644 --- a/src/Events/TermDeleting.php +++ b/src/Events/TermDeleting.php @@ -4,11 +4,8 @@ class TermDeleting extends Event { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } /** diff --git a/src/Events/TermReferencesUpdated.php b/src/Events/TermReferencesUpdated.php index 0c3f4dd8f1..3bb6246298 100644 --- a/src/Events/TermReferencesUpdated.php +++ b/src/Events/TermReferencesUpdated.php @@ -6,11 +6,8 @@ class TermReferencesUpdated extends Event implements ProvidesCommitMessage { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } public function commitMessage() diff --git a/src/Events/TermSaved.php b/src/Events/TermSaved.php index 4b53422532..d1d8e14b78 100644 --- a/src/Events/TermSaved.php +++ b/src/Events/TermSaved.php @@ -6,11 +6,8 @@ class TermSaved extends Event implements ProvidesCommitMessage { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } public function commitMessage() diff --git a/src/Events/TermSaving.php b/src/Events/TermSaving.php index b13d479ef1..da2d86d5a4 100644 --- a/src/Events/TermSaving.php +++ b/src/Events/TermSaving.php @@ -4,11 +4,8 @@ class TermSaving extends Event { - public $term; - - public function __construct($term) + public function __construct(public $term) { - $this->term = $term; } /** diff --git a/src/Events/UserBlueprintFound.php b/src/Events/UserBlueprintFound.php index fca469473b..95dd00ede6 100644 --- a/src/Events/UserBlueprintFound.php +++ b/src/Events/UserBlueprintFound.php @@ -4,10 +4,7 @@ class UserBlueprintFound extends Event { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } } diff --git a/src/Events/UserCreated.php b/src/Events/UserCreated.php index 47c0233fd9..0977c94ce4 100644 --- a/src/Events/UserCreated.php +++ b/src/Events/UserCreated.php @@ -4,10 +4,7 @@ class UserCreated extends Event { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } } diff --git a/src/Events/UserCreating.php b/src/Events/UserCreating.php index 69365b5612..55989dc3e4 100644 --- a/src/Events/UserCreating.php +++ b/src/Events/UserCreating.php @@ -4,11 +4,8 @@ class UserCreating extends Event { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } /** diff --git a/src/Events/UserDeleted.php b/src/Events/UserDeleted.php index eff47d6939..c16d767f88 100644 --- a/src/Events/UserDeleted.php +++ b/src/Events/UserDeleted.php @@ -6,11 +6,8 @@ class UserDeleted extends Event implements ProvidesCommitMessage { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } public function commitMessage() diff --git a/src/Events/UserDeleting.php b/src/Events/UserDeleting.php index 56d823bcee..40192e48ae 100644 --- a/src/Events/UserDeleting.php +++ b/src/Events/UserDeleting.php @@ -4,11 +4,8 @@ class UserDeleting extends Event { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } /** diff --git a/src/Events/UserGroupBlueprintFound.php b/src/Events/UserGroupBlueprintFound.php index dd58861c45..3cc7160c10 100644 --- a/src/Events/UserGroupBlueprintFound.php +++ b/src/Events/UserGroupBlueprintFound.php @@ -4,10 +4,7 @@ class UserGroupBlueprintFound extends Event { - public $blueprint; - - public function __construct($blueprint) + public function __construct(public $blueprint) { - $this->blueprint = $blueprint; } } diff --git a/src/Events/UserGroupDeleted.php b/src/Events/UserGroupDeleted.php index 2b5ec4497e..1a42af188e 100644 --- a/src/Events/UserGroupDeleted.php +++ b/src/Events/UserGroupDeleted.php @@ -6,11 +6,8 @@ class UserGroupDeleted extends Event implements ProvidesCommitMessage { - public $group; - - public function __construct($group) + public function __construct(public $group) { - $this->group = $group; } public function commitMessage() diff --git a/src/Events/UserGroupSaved.php b/src/Events/UserGroupSaved.php index da1aca845e..96391540a9 100644 --- a/src/Events/UserGroupSaved.php +++ b/src/Events/UserGroupSaved.php @@ -6,11 +6,8 @@ class UserGroupSaved extends Event implements ProvidesCommitMessage { - public $group; - - public function __construct($group) + public function __construct(public $group) { - $this->group = $group; } public function commitMessage() diff --git a/src/Events/UserRegistered.php b/src/Events/UserRegistered.php index 3ed7479c54..f6b44955da 100644 --- a/src/Events/UserRegistered.php +++ b/src/Events/UserRegistered.php @@ -4,10 +4,7 @@ class UserRegistered extends Event { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } } diff --git a/src/Events/UserRegistering.php b/src/Events/UserRegistering.php index 857f2d47da..e9c8d51321 100644 --- a/src/Events/UserRegistering.php +++ b/src/Events/UserRegistering.php @@ -4,11 +4,8 @@ class UserRegistering extends Event { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } /** diff --git a/src/Events/UserSaved.php b/src/Events/UserSaved.php index bc5b464b79..62d1dd971c 100644 --- a/src/Events/UserSaved.php +++ b/src/Events/UserSaved.php @@ -6,11 +6,8 @@ class UserSaved extends Event implements ProvidesCommitMessage { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } public function commitMessage() diff --git a/src/Events/UserSaving.php b/src/Events/UserSaving.php index 51f5861b19..b42a063152 100644 --- a/src/Events/UserSaving.php +++ b/src/Events/UserSaving.php @@ -4,11 +4,8 @@ class UserSaving extends Event { - public $user; - - public function __construct($user) + public function __construct(public $user) { - $this->user = $user; } /**