From 59fee015e43e4ebfa94e78e52ef6d9c3af6fe35b Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sun, 9 Jan 2022 01:00:59 +0100 Subject: [PATCH] Use the readonly annotation --- lib/Doctrine/ORM/Cache/AssociationCacheEntry.php | 6 ++---- lib/Doctrine/ORM/Cache/CacheKey.php | 3 +-- lib/Doctrine/ORM/Cache/CollectionCacheEntry.php | 3 +-- lib/Doctrine/ORM/Cache/CollectionCacheKey.php | 9 +++------ lib/Doctrine/ORM/Cache/EntityCacheEntry.php | 6 ++---- lib/Doctrine/ORM/Cache/EntityCacheKey.php | 6 ++---- lib/Doctrine/ORM/Cache/QueryCacheEntry.php | 6 ++---- lib/Doctrine/ORM/Cache/QueryCacheKey.php | 9 +++------ lib/Doctrine/ORM/Cache/TimestampCacheEntry.php | 3 +-- lib/Doctrine/ORM/Query/Parser.php | 9 +++------ 10 files changed, 20 insertions(+), 40 deletions(-) diff --git a/lib/Doctrine/ORM/Cache/AssociationCacheEntry.php b/lib/Doctrine/ORM/Cache/AssociationCacheEntry.php index 636577ba0ee..24c63152e78 100644 --- a/lib/Doctrine/ORM/Cache/AssociationCacheEntry.php +++ b/lib/Doctrine/ORM/Cache/AssociationCacheEntry.php @@ -10,15 +10,13 @@ class AssociationCacheEntry implements CacheEntry { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var array The entity identifier */ public $identifier; /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var string The entity class name */ public $class; diff --git a/lib/Doctrine/ORM/Cache/CacheKey.php b/lib/Doctrine/ORM/Cache/CacheKey.php index 0cc1b6d6746..e548fd5b0fd 100644 --- a/lib/Doctrine/ORM/Cache/CacheKey.php +++ b/lib/Doctrine/ORM/Cache/CacheKey.php @@ -11,8 +11,7 @@ abstract class CacheKey { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var string Unique identifier */ public $hash; diff --git a/lib/Doctrine/ORM/Cache/CollectionCacheEntry.php b/lib/Doctrine/ORM/Cache/CollectionCacheEntry.php index eaddfa97d25..7531e83998a 100644 --- a/lib/Doctrine/ORM/Cache/CollectionCacheEntry.php +++ b/lib/Doctrine/ORM/Cache/CollectionCacheEntry.php @@ -10,8 +10,7 @@ class CollectionCacheEntry implements CacheEntry { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var CacheKey[] The list of entity identifiers hold by the collection */ public $identifiers; diff --git a/lib/Doctrine/ORM/Cache/CollectionCacheKey.php b/lib/Doctrine/ORM/Cache/CollectionCacheKey.php index b7037add6f3..e2e8de94ce3 100644 --- a/lib/Doctrine/ORM/Cache/CollectionCacheKey.php +++ b/lib/Doctrine/ORM/Cache/CollectionCacheKey.php @@ -15,22 +15,19 @@ class CollectionCacheKey extends CacheKey { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var array The owner entity identifier */ public $ownerIdentifier; /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var string The owner entity class */ public $entityClass; /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var string The association name */ public $association; diff --git a/lib/Doctrine/ORM/Cache/EntityCacheEntry.php b/lib/Doctrine/ORM/Cache/EntityCacheEntry.php index 72b5eeb8755..74bf95f34b1 100644 --- a/lib/Doctrine/ORM/Cache/EntityCacheEntry.php +++ b/lib/Doctrine/ORM/Cache/EntityCacheEntry.php @@ -14,15 +14,13 @@ class EntityCacheEntry implements CacheEntry { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var array The entity map data */ public $data; /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var string The entity class name * @psalm-var class-string */ diff --git a/lib/Doctrine/ORM/Cache/EntityCacheKey.php b/lib/Doctrine/ORM/Cache/EntityCacheKey.php index 9125bba484d..ad7c43b7fce 100644 --- a/lib/Doctrine/ORM/Cache/EntityCacheKey.php +++ b/lib/Doctrine/ORM/Cache/EntityCacheKey.php @@ -15,15 +15,13 @@ class EntityCacheKey extends CacheKey { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var array The entity identifier */ public $identifier; /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var string The entity class name */ public $entityClass; diff --git a/lib/Doctrine/ORM/Cache/QueryCacheEntry.php b/lib/Doctrine/ORM/Cache/QueryCacheEntry.php index 7c720356d2d..a5436ec0e2f 100644 --- a/lib/Doctrine/ORM/Cache/QueryCacheEntry.php +++ b/lib/Doctrine/ORM/Cache/QueryCacheEntry.php @@ -12,15 +12,13 @@ class QueryCacheEntry implements CacheEntry { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var array List of entity identifiers */ public $result; /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var float Time creation of this cache entry */ public $time; diff --git a/lib/Doctrine/ORM/Cache/QueryCacheKey.php b/lib/Doctrine/ORM/Cache/QueryCacheKey.php index 3adc57eee94..4a510fd8a45 100644 --- a/lib/Doctrine/ORM/Cache/QueryCacheKey.php +++ b/lib/Doctrine/ORM/Cache/QueryCacheKey.php @@ -12,8 +12,7 @@ class QueryCacheKey extends CacheKey { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var int Cache key lifetime */ public $lifetime; @@ -21,16 +20,14 @@ class QueryCacheKey extends CacheKey /** * Cache mode * - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var int * @psalm-var Cache::MODE_* */ public $cacheMode; /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var TimestampCacheKey|null */ public $timestampKey; diff --git a/lib/Doctrine/ORM/Cache/TimestampCacheEntry.php b/lib/Doctrine/ORM/Cache/TimestampCacheEntry.php index e4daf60a308..d212f3f6b84 100644 --- a/lib/Doctrine/ORM/Cache/TimestampCacheEntry.php +++ b/lib/Doctrine/ORM/Cache/TimestampCacheEntry.php @@ -12,8 +12,7 @@ class TimestampCacheEntry implements CacheEntry { /** - * READ-ONLY: Public only for performance reasons, it should be considered immutable. - * + * @readonly Public only for performance reasons, it should be considered immutable. * @var float */ public $time; diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index baab67c0800..b0516d011aa 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -87,8 +87,7 @@ class Parser { /** - * READ-ONLY: Maps BUILT-IN string function names to AST class names. - * + * @readonly Maps BUILT-IN string function names to AST class names. * @psalm-var array> */ private static $stringFunctions = [ @@ -101,8 +100,7 @@ class Parser ]; /** - * READ-ONLY: Maps BUILT-IN numeric function names to AST class names. - * + * @readonly Maps BUILT-IN numeric function names to AST class names. * @psalm-var array> */ private static $numericFunctions = [ @@ -125,8 +123,7 @@ class Parser ]; /** - * READ-ONLY: Maps BUILT-IN datetime function names to AST class names. - * + * @readonly Maps BUILT-IN datetime function names to AST class names. * @psalm-var array> */ private static $datetimeFunctions = [