diff --git a/UPGRADING.md b/UPGRADING.md index f148dd72ab4..4a5a9f4b847 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -507,6 +507,59 @@ - [BC] Class `Psalm\Issue\ParseError` became final - [BC] Class `Psalm\Issue\PossiblyUndefinedStringArrayOffset` became final - [BC] Class `Psalm\Issue\ExtensionRequirementViolation` became final + - Storage classes became final: + - [BC] Class `Psalm\Storage\MethodStorage` became final + - [BC] Class `Psalm\Storage\AttributeStorage` became final + - [BC] Class `Psalm\Storage\FileStorage` became final + - [BC] Class `Psalm\Storage\PropertyStorage` became final + - [BC] Class `Psalm\Storage\FunctionStorage` became final + - [BC] Class `Psalm\Storage\Assertion\HasArrayKey` became final + - [BC] Class `Psalm\Storage\Assertion\Truthy` became final + - [BC] Class `Psalm\Storage\Assertion\IsAClass` became final + - [BC] Class `Psalm\Storage\Assertion\HasAtLeastCount` became final + - [BC] Class `Psalm\Storage\Assertion\HasMethod` became final + - [BC] Class `Psalm\Storage\Assertion\HasIntOrStringArrayAccess` became final + - [BC] Class `Psalm\Storage\Assertion\DoesNotHaveMethod` became final + - [BC] Class `Psalm\Storage\Assertion\IsLessThanOrEqualTo` became final + - [BC] Class `Psalm\Storage\Assertion\IsNotAClass` became final + - [BC] Class `Psalm\Storage\Assertion\ArrayKeyDoesNotExist` became final + - [BC] Class `Psalm\Storage\Assertion\IsNotIdentical` became final + - [BC] Class `Psalm\Storage\Assertion\IsClassEqual` became final + - [BC] Class `Psalm\Storage\Assertion\NotNonEmptyCountable` became final + - [BC] Class `Psalm\Storage\Assertion\Any` became final + - [BC] Class `Psalm\Storage\Assertion\IsLooselyEqual` became final + - [BC] Class `Psalm\Storage\Assertion\NonEmpty` became final + - [BC] Class `Psalm\Storage\Assertion\IsGreaterThanOrEqualTo` became final + - [BC] Class `Psalm\Storage\Assertion\HasStringArrayAccess` became final + - [BC] Class `Psalm\Storage\Assertion\IsClassNotEqual` became final + - [BC] Class `Psalm\Storage\Assertion\HasExactCount` became final + - [BC] Class `Psalm\Storage\Assertion\IsNotCountable` became final + - [BC] Class `Psalm\Storage\Assertion\IsIdentical` became final + - [BC] Class `Psalm\Storage\Assertion\IsType` became final + - [BC] Class `Psalm\Storage\Assertion\NotNestedAssertions` became final + - [BC] Class `Psalm\Storage\Assertion\IsGreaterThan` became final + - [BC] Class `Psalm\Storage\Assertion\IsIsset` became final + - [BC] Class `Psalm\Storage\Assertion\Empty_` became final + - [BC] Class `Psalm\Storage\Assertion\IsNotType` became final + - [BC] Class `Psalm\Storage\Assertion\ArrayKeyExists` became final + - [BC] Class `Psalm\Storage\Assertion\DoesNotHaveAtLeastCount` became final + - [BC] Class `Psalm\Storage\Assertion\IsNotIsset` became final + - [BC] Class `Psalm\Storage\Assertion\NonEmptyCountable` became final + - [BC] Class `Psalm\Storage\Assertion\NestedAssertions` became final + - [BC] Class `Psalm\Storage\Assertion\Falsy` became final + - [BC] Class `Psalm\Storage\Assertion\IsNotLooselyEqual` became final + - [BC] Class `Psalm\Storage\Assertion\IsEqualIsset` became final + - [BC] Class `Psalm\Storage\Assertion\IsLessThan` became final + - [BC] Class `Psalm\Storage\Assertion\DoesNotHaveExactCount` became final + - [BC] Class `Psalm\Storage\Assertion\IsCountable` became final + - [BC] Class `Psalm\Storage\Assertion\NotInArray` became final + - [BC] Class `Psalm\Storage\Assertion\InArray` became final + - [BC] Class `Psalm\Storage\FunctionLikeParameter` became final + - [BC] Class `Psalm\Storage\Possibilities` became final + - [BC] Class `Psalm\Storage\ClassConstantStorage` became final + - [BC] Class `Psalm\Storage\ClassLikeStorage` became final + - [BC] Class `Psalm\Storage\AttributeArg` became final + - [BC] Class `Psalm\Storage\EnumCaseStorage` became final ## Removed - [BC] Property `Psalm\Codebase::$php_major_version` was removed, use @@ -564,4 +617,3 @@ - :information_source: migration possible using `Psalm\PluginFileExtensionsSocket` - [BC] Method `\Psalm\Plugin\EventHandler\Event\AfterFunctionLikeAnalysisEvent::getClasslikeStorage()` was removed, use correct `\Psalm\Plugin\EventHandler\Event\AfterFunctionLikeAnalysisEvent::getFunctionlikeStorage()` instead - diff --git a/src/Psalm/Storage/Assertion/Any.php b/src/Psalm/Storage/Assertion/Any.php index 6256e0a5f64..4aab3fda16a 100644 --- a/src/Psalm/Storage/Assertion/Any.php +++ b/src/Psalm/Storage/Assertion/Any.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class Any extends Assertion +final class Any extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php b/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php index f174a7fea8e..43a6f0bd557 100644 --- a/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php +++ b/src/Psalm/Storage/Assertion/ArrayKeyDoesNotExist.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class ArrayKeyDoesNotExist extends Assertion +final class ArrayKeyDoesNotExist extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/ArrayKeyExists.php b/src/Psalm/Storage/Assertion/ArrayKeyExists.php index 598a5b9bd84..0b803cd4dd9 100644 --- a/src/Psalm/Storage/Assertion/ArrayKeyExists.php +++ b/src/Psalm/Storage/Assertion/ArrayKeyExists.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class ArrayKeyExists extends Assertion +final class ArrayKeyExists extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php b/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php index a64c52c509b..297e61ddb83 100644 --- a/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php +++ b/src/Psalm/Storage/Assertion/DoesNotHaveAtLeastCount.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class DoesNotHaveAtLeastCount extends Assertion +final class DoesNotHaveAtLeastCount extends Assertion { /** @var positive-int */ public $count; diff --git a/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php b/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php index 4a4eb645f89..950bf72eba6 100644 --- a/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php +++ b/src/Psalm/Storage/Assertion/DoesNotHaveExactCount.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class DoesNotHaveExactCount extends Assertion +final class DoesNotHaveExactCount extends Assertion { /** @var positive-int */ public $count; diff --git a/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php b/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php index 1a80432ba5c..eef48187543 100644 --- a/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php +++ b/src/Psalm/Storage/Assertion/DoesNotHaveMethod.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class DoesNotHaveMethod extends Assertion +final class DoesNotHaveMethod extends Assertion { public string $method; diff --git a/src/Psalm/Storage/Assertion/Empty_.php b/src/Psalm/Storage/Assertion/Empty_.php index 6dced7aa8f6..91613b0f4a2 100644 --- a/src/Psalm/Storage/Assertion/Empty_.php +++ b/src/Psalm/Storage/Assertion/Empty_.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class Empty_ extends Assertion +final class Empty_ extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/Falsy.php b/src/Psalm/Storage/Assertion/Falsy.php index 81e139a0d86..13c85088eeb 100644 --- a/src/Psalm/Storage/Assertion/Falsy.php +++ b/src/Psalm/Storage/Assertion/Falsy.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class Falsy extends Assertion +final class Falsy extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/HasArrayKey.php b/src/Psalm/Storage/Assertion/HasArrayKey.php index 168357daca8..7442c4a39a7 100644 --- a/src/Psalm/Storage/Assertion/HasArrayKey.php +++ b/src/Psalm/Storage/Assertion/HasArrayKey.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use UnexpectedValueException; -class HasArrayKey extends Assertion +final class HasArrayKey extends Assertion { public $key; diff --git a/src/Psalm/Storage/Assertion/HasAtLeastCount.php b/src/Psalm/Storage/Assertion/HasAtLeastCount.php index 699823a8302..46ec83abfeb 100644 --- a/src/Psalm/Storage/Assertion/HasAtLeastCount.php +++ b/src/Psalm/Storage/Assertion/HasAtLeastCount.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class HasAtLeastCount extends Assertion +final class HasAtLeastCount extends Assertion { /** @var positive-int */ public $count; diff --git a/src/Psalm/Storage/Assertion/HasExactCount.php b/src/Psalm/Storage/Assertion/HasExactCount.php index 777e74fce95..36d0400c29c 100644 --- a/src/Psalm/Storage/Assertion/HasExactCount.php +++ b/src/Psalm/Storage/Assertion/HasExactCount.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class HasExactCount extends Assertion +final class HasExactCount extends Assertion { /** @var positive-int */ public $count; diff --git a/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php b/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php index 63bd651e5d9..88620c8b0f8 100644 --- a/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php +++ b/src/Psalm/Storage/Assertion/HasIntOrStringArrayAccess.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use UnexpectedValueException; -class HasIntOrStringArrayAccess extends Assertion +final class HasIntOrStringArrayAccess extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/HasMethod.php b/src/Psalm/Storage/Assertion/HasMethod.php index de99013a2e4..94508472404 100644 --- a/src/Psalm/Storage/Assertion/HasMethod.php +++ b/src/Psalm/Storage/Assertion/HasMethod.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class HasMethod extends Assertion +final class HasMethod extends Assertion { public string $method; diff --git a/src/Psalm/Storage/Assertion/HasStringArrayAccess.php b/src/Psalm/Storage/Assertion/HasStringArrayAccess.php index b0251c026d8..d7595287857 100644 --- a/src/Psalm/Storage/Assertion/HasStringArrayAccess.php +++ b/src/Psalm/Storage/Assertion/HasStringArrayAccess.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use UnexpectedValueException; -class HasStringArrayAccess extends Assertion +final class HasStringArrayAccess extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/InArray.php b/src/Psalm/Storage/Assertion/InArray.php index fcc127e0347..b5e1abc2ea7 100644 --- a/src/Psalm/Storage/Assertion/InArray.php +++ b/src/Psalm/Storage/Assertion/InArray.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Union; -class InArray extends Assertion +final class InArray extends Assertion { public Union $type; diff --git a/src/Psalm/Storage/Assertion/IsAClass.php b/src/Psalm/Storage/Assertion/IsAClass.php index 83b056abbab..3b6c5473952 100644 --- a/src/Psalm/Storage/Assertion/IsAClass.php +++ b/src/Psalm/Storage/Assertion/IsAClass.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsAClass extends Assertion +final class IsAClass extends Assertion { /** @var Atomic\TTemplateParamClass|Atomic\TNamedObject */ public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/IsClassEqual.php b/src/Psalm/Storage/Assertion/IsClassEqual.php index 307b399b9e4..da5307aa7f5 100644 --- a/src/Psalm/Storage/Assertion/IsClassEqual.php +++ b/src/Psalm/Storage/Assertion/IsClassEqual.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsClassEqual extends Assertion +final class IsClassEqual extends Assertion { public string $type; diff --git a/src/Psalm/Storage/Assertion/IsClassNotEqual.php b/src/Psalm/Storage/Assertion/IsClassNotEqual.php index 39241ac2508..c8d05dc8b77 100644 --- a/src/Psalm/Storage/Assertion/IsClassNotEqual.php +++ b/src/Psalm/Storage/Assertion/IsClassNotEqual.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsClassNotEqual extends Assertion +final class IsClassNotEqual extends Assertion { public string $type; diff --git a/src/Psalm/Storage/Assertion/IsCountable.php b/src/Psalm/Storage/Assertion/IsCountable.php index 543921d808c..dea9295b28c 100644 --- a/src/Psalm/Storage/Assertion/IsCountable.php +++ b/src/Psalm/Storage/Assertion/IsCountable.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsCountable extends Assertion +final class IsCountable extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/IsEqualIsset.php b/src/Psalm/Storage/Assertion/IsEqualIsset.php index 0ac2e9af920..bded7c5ce06 100644 --- a/src/Psalm/Storage/Assertion/IsEqualIsset.php +++ b/src/Psalm/Storage/Assertion/IsEqualIsset.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsEqualIsset extends Assertion +final class IsEqualIsset extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/IsGreaterThan.php b/src/Psalm/Storage/Assertion/IsGreaterThan.php index 96ba74aa396..131c3fc94a9 100644 --- a/src/Psalm/Storage/Assertion/IsGreaterThan.php +++ b/src/Psalm/Storage/Assertion/IsGreaterThan.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsGreaterThan extends Assertion +final class IsGreaterThan extends Assertion { public int $value; diff --git a/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php b/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php index 5cf032ae063..ce8590eafc8 100644 --- a/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php +++ b/src/Psalm/Storage/Assertion/IsGreaterThanOrEqualTo.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsGreaterThanOrEqualTo extends Assertion +final class IsGreaterThanOrEqualTo extends Assertion { public int $value; diff --git a/src/Psalm/Storage/Assertion/IsIdentical.php b/src/Psalm/Storage/Assertion/IsIdentical.php index 9d29d5b59f7..9f6dccfae10 100644 --- a/src/Psalm/Storage/Assertion/IsIdentical.php +++ b/src/Psalm/Storage/Assertion/IsIdentical.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsIdentical extends Assertion +final class IsIdentical extends Assertion { public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/IsIsset.php b/src/Psalm/Storage/Assertion/IsIsset.php index dda04c24f32..7b5fd06423b 100644 --- a/src/Psalm/Storage/Assertion/IsIsset.php +++ b/src/Psalm/Storage/Assertion/IsIsset.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsIsset extends Assertion +final class IsIsset extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/IsLessThan.php b/src/Psalm/Storage/Assertion/IsLessThan.php index ab797dac228..0f26f5c53e1 100644 --- a/src/Psalm/Storage/Assertion/IsLessThan.php +++ b/src/Psalm/Storage/Assertion/IsLessThan.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsLessThan extends Assertion +final class IsLessThan extends Assertion { public int $value; diff --git a/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php b/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php index 82dc9d65732..36afbe8e282 100644 --- a/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php +++ b/src/Psalm/Storage/Assertion/IsLessThanOrEqualTo.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsLessThanOrEqualTo extends Assertion +final class IsLessThanOrEqualTo extends Assertion { public int $value; diff --git a/src/Psalm/Storage/Assertion/IsLooselyEqual.php b/src/Psalm/Storage/Assertion/IsLooselyEqual.php index 33cfccd9320..35b1e6d6259 100644 --- a/src/Psalm/Storage/Assertion/IsLooselyEqual.php +++ b/src/Psalm/Storage/Assertion/IsLooselyEqual.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsLooselyEqual extends Assertion +final class IsLooselyEqual extends Assertion { public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/IsNotAClass.php b/src/Psalm/Storage/Assertion/IsNotAClass.php index 1ac2b5166ac..45cbd3442ef 100644 --- a/src/Psalm/Storage/Assertion/IsNotAClass.php +++ b/src/Psalm/Storage/Assertion/IsNotAClass.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsNotAClass extends Assertion +final class IsNotAClass extends Assertion { /** @var Atomic\TTemplateParamClass|Atomic\TNamedObject */ public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/IsNotCountable.php b/src/Psalm/Storage/Assertion/IsNotCountable.php index 615269bbb36..b09a7a7dcdc 100644 --- a/src/Psalm/Storage/Assertion/IsNotCountable.php +++ b/src/Psalm/Storage/Assertion/IsNotCountable.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsNotCountable extends Assertion +final class IsNotCountable extends Assertion { public $is_negatable; diff --git a/src/Psalm/Storage/Assertion/IsNotIdentical.php b/src/Psalm/Storage/Assertion/IsNotIdentical.php index 9c9ab732eb5..2c023300a02 100644 --- a/src/Psalm/Storage/Assertion/IsNotIdentical.php +++ b/src/Psalm/Storage/Assertion/IsNotIdentical.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsNotIdentical extends Assertion +final class IsNotIdentical extends Assertion { public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/IsNotIsset.php b/src/Psalm/Storage/Assertion/IsNotIsset.php index 4bb32b24cc1..defa8479a32 100644 --- a/src/Psalm/Storage/Assertion/IsNotIsset.php +++ b/src/Psalm/Storage/Assertion/IsNotIsset.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class IsNotIsset extends Assertion +final class IsNotIsset extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php b/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php index f1fd889a777..bcf77c78514 100644 --- a/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php +++ b/src/Psalm/Storage/Assertion/IsNotLooselyEqual.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsNotLooselyEqual extends Assertion +final class IsNotLooselyEqual extends Assertion { public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/IsNotType.php b/src/Psalm/Storage/Assertion/IsNotType.php index ddad7757231..321dd744e0c 100644 --- a/src/Psalm/Storage/Assertion/IsNotType.php +++ b/src/Psalm/Storage/Assertion/IsNotType.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsNotType extends Assertion +final class IsNotType extends Assertion { public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/IsType.php b/src/Psalm/Storage/Assertion/IsType.php index 3f305d548b1..2c822a79d40 100644 --- a/src/Psalm/Storage/Assertion/IsType.php +++ b/src/Psalm/Storage/Assertion/IsType.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Atomic; -class IsType extends Assertion +final class IsType extends Assertion { public Atomic $type; diff --git a/src/Psalm/Storage/Assertion/NestedAssertions.php b/src/Psalm/Storage/Assertion/NestedAssertions.php index 9e74e04725b..c7fa0a48e62 100644 --- a/src/Psalm/Storage/Assertion/NestedAssertions.php +++ b/src/Psalm/Storage/Assertion/NestedAssertions.php @@ -8,7 +8,7 @@ use const JSON_THROW_ON_ERROR; -class NestedAssertions extends Assertion +final class NestedAssertions extends Assertion { /** @var array>> */ public array $assertions; diff --git a/src/Psalm/Storage/Assertion/NonEmpty.php b/src/Psalm/Storage/Assertion/NonEmpty.php index 785c3388ee9..bb662d9591f 100644 --- a/src/Psalm/Storage/Assertion/NonEmpty.php +++ b/src/Psalm/Storage/Assertion/NonEmpty.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class NonEmpty extends Assertion +final class NonEmpty extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/NonEmptyCountable.php b/src/Psalm/Storage/Assertion/NonEmptyCountable.php index 9990e348035..c42eca24d57 100644 --- a/src/Psalm/Storage/Assertion/NonEmptyCountable.php +++ b/src/Psalm/Storage/Assertion/NonEmptyCountable.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class NonEmptyCountable extends Assertion +final class NonEmptyCountable extends Assertion { public $is_negatable; diff --git a/src/Psalm/Storage/Assertion/NotInArray.php b/src/Psalm/Storage/Assertion/NotInArray.php index 138786bb02e..2dbbb71161b 100644 --- a/src/Psalm/Storage/Assertion/NotInArray.php +++ b/src/Psalm/Storage/Assertion/NotInArray.php @@ -5,7 +5,7 @@ use Psalm\Storage\Assertion; use Psalm\Type\Union; -class NotInArray extends Assertion +final class NotInArray extends Assertion { public Union $type; diff --git a/src/Psalm/Storage/Assertion/NotNestedAssertions.php b/src/Psalm/Storage/Assertion/NotNestedAssertions.php index f594bd22ae6..ad6f46f9ef6 100644 --- a/src/Psalm/Storage/Assertion/NotNestedAssertions.php +++ b/src/Psalm/Storage/Assertion/NotNestedAssertions.php @@ -8,7 +8,7 @@ use const JSON_THROW_ON_ERROR; -class NotNestedAssertions extends Assertion +final class NotNestedAssertions extends Assertion { /** @var array>> */ public array $assertions; diff --git a/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php b/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php index 2e7cf3e8224..d4a59fbd1a6 100644 --- a/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php +++ b/src/Psalm/Storage/Assertion/NotNonEmptyCountable.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class NotNonEmptyCountable extends Assertion +final class NotNonEmptyCountable extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/Assertion/Truthy.php b/src/Psalm/Storage/Assertion/Truthy.php index 78ba516899c..1d92be6e158 100644 --- a/src/Psalm/Storage/Assertion/Truthy.php +++ b/src/Psalm/Storage/Assertion/Truthy.php @@ -4,7 +4,7 @@ use Psalm\Storage\Assertion; -class Truthy extends Assertion +final class Truthy extends Assertion { /** @psalm-mutation-free */ public function getNegation(): Assertion diff --git a/src/Psalm/Storage/AttributeArg.php b/src/Psalm/Storage/AttributeArg.php index 510fe06c7e7..7d15a214a70 100644 --- a/src/Psalm/Storage/AttributeArg.php +++ b/src/Psalm/Storage/AttributeArg.php @@ -6,7 +6,7 @@ use Psalm\Internal\Scanner\UnresolvedConstantComponent; use Psalm\Type\Union; -class AttributeArg +final class AttributeArg { /** * @var ?string diff --git a/src/Psalm/Storage/AttributeStorage.php b/src/Psalm/Storage/AttributeStorage.php index 3fe6b9bb1eb..b07d922222e 100644 --- a/src/Psalm/Storage/AttributeStorage.php +++ b/src/Psalm/Storage/AttributeStorage.php @@ -4,7 +4,7 @@ use Psalm\CodeLocation; -class AttributeStorage +final class AttributeStorage { /** * @var string diff --git a/src/Psalm/Storage/ClassConstantStorage.php b/src/Psalm/Storage/ClassConstantStorage.php index e1cd077fe06..61705fb77b4 100644 --- a/src/Psalm/Storage/ClassConstantStorage.php +++ b/src/Psalm/Storage/ClassConstantStorage.php @@ -10,7 +10,7 @@ /** * @psalm-suppress PossiblyUnusedProperty */ -class ClassConstantStorage +final class ClassConstantStorage { use CustomMetadataTrait; diff --git a/src/Psalm/Storage/ClassLikeStorage.php b/src/Psalm/Storage/ClassLikeStorage.php index 381f9c912a2..4d924e1b0b7 100644 --- a/src/Psalm/Storage/ClassLikeStorage.php +++ b/src/Psalm/Storage/ClassLikeStorage.php @@ -11,7 +11,7 @@ use Psalm\Type\Atomic\TTemplateParam; use Psalm\Type\Union; -class ClassLikeStorage +final class ClassLikeStorage { use CustomMetadataTrait; diff --git a/src/Psalm/Storage/EnumCaseStorage.php b/src/Psalm/Storage/EnumCaseStorage.php index c61fcea3d24..24ec0791399 100644 --- a/src/Psalm/Storage/EnumCaseStorage.php +++ b/src/Psalm/Storage/EnumCaseStorage.php @@ -4,7 +4,7 @@ use Psalm\CodeLocation; -class EnumCaseStorage +final class EnumCaseStorage { /** * @var int|string|null diff --git a/src/Psalm/Storage/FileStorage.php b/src/Psalm/Storage/FileStorage.php index df09117dbea..aebb14d192f 100644 --- a/src/Psalm/Storage/FileStorage.php +++ b/src/Psalm/Storage/FileStorage.php @@ -7,7 +7,7 @@ use Psalm\Issue\CodeIssue; use Psalm\Type\Union; -class FileStorage +final class FileStorage { use CustomMetadataTrait; diff --git a/src/Psalm/Storage/FunctionLikeParameter.php b/src/Psalm/Storage/FunctionLikeParameter.php index 261b203a3c7..1e60d086e5a 100644 --- a/src/Psalm/Storage/FunctionLikeParameter.php +++ b/src/Psalm/Storage/FunctionLikeParameter.php @@ -6,7 +6,7 @@ use Psalm\Internal\Scanner\UnresolvedConstantComponent; use Psalm\Type\Union; -class FunctionLikeParameter +final class FunctionLikeParameter { use CustomMetadataTrait; diff --git a/src/Psalm/Storage/FunctionStorage.php b/src/Psalm/Storage/FunctionStorage.php index 22be01b0a11..e39e7cc2356 100644 --- a/src/Psalm/Storage/FunctionStorage.php +++ b/src/Psalm/Storage/FunctionStorage.php @@ -2,7 +2,7 @@ namespace Psalm\Storage; -class FunctionStorage extends FunctionLikeStorage +final class FunctionStorage extends FunctionLikeStorage { /** @var array */ public $byref_uses = []; diff --git a/src/Psalm/Storage/MethodStorage.php b/src/Psalm/Storage/MethodStorage.php index f9ae6a2777d..5a9e59e3642 100644 --- a/src/Psalm/Storage/MethodStorage.php +++ b/src/Psalm/Storage/MethodStorage.php @@ -4,7 +4,7 @@ use Psalm\Type\Union; -class MethodStorage extends FunctionLikeStorage +final class MethodStorage extends FunctionLikeStorage { /** * @var bool diff --git a/src/Psalm/Storage/Possibilities.php b/src/Psalm/Storage/Possibilities.php index 72a7a882ff9..c526881800f 100644 --- a/src/Psalm/Storage/Possibilities.php +++ b/src/Psalm/Storage/Possibilities.php @@ -10,7 +10,7 @@ use function is_string; use function str_replace; -class Possibilities +final class Possibilities { /** * @var list the rule being asserted diff --git a/src/Psalm/Storage/PropertyStorage.php b/src/Psalm/Storage/PropertyStorage.php index 7fdc14f7ad8..08ad69bdd90 100644 --- a/src/Psalm/Storage/PropertyStorage.php +++ b/src/Psalm/Storage/PropertyStorage.php @@ -6,7 +6,7 @@ use Psalm\Internal\Analyzer\ClassLikeAnalyzer; use Psalm\Type\Union; -class PropertyStorage +final class PropertyStorage { use CustomMetadataTrait;