[web-php] master: Enhancement: Mark class as readonly (#861)
| From: | Andreas Möller via GitHub | Date: | Wed, 06 Dec 2023 14:12:55 +0000 |
| Subject: | [web-php] master: Enhancement: Mark class as readonly (#861) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-31178@lists.php.net to get a copy of this message | ||
Author: Andreas Möller (localheinz)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2023-12-06T14:59:15+01:00
Commit: https://github.com/php/web-php/commit/d36359230f959723250a64dae27521a6731fcf5b
Raw diff: https://github.com/php/web-php/commit/d36359230f959723250a64dae27521a6731fcf5b.diff
Enhancement: Mark class as readonly (#861)
Changed paths:
M src/UserNotes/UserNote.php
Diff:
diff --git a/src/UserNotes/UserNote.php b/src/UserNotes/UserNote.php
index f90fac9b09..8ea133bea3 100644
--- a/src/UserNotes/UserNote.php
+++ b/src/UserNotes/UserNote.php
@@ -2,11 +2,7 @@
namespace phpweb\UserNotes;
-/**
- * @readonly
- * @psalm-immutable
- */
-final class UserNote
+final readonly class UserNote
{
public function __construct(
public string $id,