Skip to content

Commit

Permalink
Merge pull request #10493 from delolmo/override-attribute
Browse files Browse the repository at this point in the history
Add support for Override attribute
  • Loading branch information
orklah committed Dec 16, 2023
2 parents 64dc2ff + d6cf9fa commit b113f3e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stubs/CoreGenericAttributes.phpstub
Expand Up @@ -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
{
Expand Down
16 changes: 16 additions & 0 deletions tests/AttributeTest.php
Expand Up @@ -293,6 +293,22 @@ class Foo
'ignored_issues' => [],
'php_version' => '8.2',
],
'override' => [
'code' => '<?php
namespace OverrideAttribute;
use Override;
class HelloWorld {
#[Override]
public function __invoke() {}
}
',
'assertions' => [],
'ignored_issues' => [],
'php_version' => '8.3',
],
'sensitiveParameter' => [
'code' => '<?php
Expand Down

0 comments on commit b113f3e

Please sign in to comment.