From d6cf9faebbfc0c21710b99eae01e9d4188aae76e Mon Sep 17 00:00:00 2001 From: Antonio del Olmo Date: Fri, 15 Dec 2023 11:14:53 +0100 Subject: [PATCH] Add support for Override attribute --- stubs/CoreGenericAttributes.phpstub | 6 ++++++ tests/AttributeTest.php | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/stubs/CoreGenericAttributes.phpstub b/stubs/CoreGenericAttributes.phpstub index 7aa6400df..92abe9542 100644 --- a/stubs/CoreGenericAttributes.phpstub +++ b/stubs/CoreGenericAttributes.phpstub @@ -6,6 +6,12 @@ final class AllowDynamicProperties public function __construct() {} } +#[Attribute(Attribute::TARGET_METHOD)] +final class Override +{ + public function __construct() {} +} + #[Attribute(Attribute::TARGET_PARAMETER)] final class SensitiveParameter { diff --git a/tests/AttributeTest.php b/tests/AttributeTest.php index f10517738..ddb5b1f5f 100644 --- a/tests/AttributeTest.php +++ b/tests/AttributeTest.php @@ -293,6 +293,22 @@ class AttributeTest extends TestCase 'ignored_issues' => [], 'php_version' => '8.2', ], + 'override' => [ + 'code' => ' [], + 'ignored_issues' => [], + 'php_version' => '8.3', + ], 'sensitiveParameter' => [ 'code' => '