mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Add a stub file for Attributes defined by PHP
This commit is contained in:
parent
eb64a471c4
commit
5fc48bbb62
@ -2236,6 +2236,8 @@ class Config
|
||||
];
|
||||
|
||||
if ($codebase->analysis_php_version_id >= 8_00_00) {
|
||||
$stringable_path = $dir_lvl_2 . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'CoreGenericAttributes.phpstub';
|
||||
$this->internal_stubs[] = $stringable_path;
|
||||
$stringable_path = $dir_lvl_2 . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'Php80.phpstub';
|
||||
$this->internal_stubs[] = $stringable_path;
|
||||
}
|
||||
|
13
stubs/CoreGenericAttributes.phpstub
Normal file
13
stubs/CoreGenericAttributes.phpstub
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
final class AllowDynamicProperties
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
|
||||
#[Attribute(Attribute::TARGET_PARAMETER)]
|
||||
final class SensitiveParameter
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
@ -34,18 +34,6 @@ namespace {
|
||||
public function getIterator(): Iterator {}
|
||||
}
|
||||
|
||||
#[Attribute(Attribute::TARGET_PARAMETER)]
|
||||
final class SensitiveParameter
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
final class AllowDynamicProperties
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @psalm-pure
|
||||
* @param positive-int $length
|
||||
|
Loading…
Reference in New Issue
Block a user