mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Add support for Override attribute
This commit is contained in:
parent
64dc2ff747
commit
d6cf9faebb
@ -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
|
||||
{
|
||||
|
@ -293,6 +293,22 @@ class AttributeTest extends TestCase
|
||||
'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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user