mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Add flag
This commit is contained in:
parent
fe17720441
commit
2e8fd6fc1d
@ -357,12 +357,12 @@ abstract class Type
|
|||||||
/**
|
/**
|
||||||
* @psalm-pure
|
* @psalm-pure
|
||||||
*/
|
*/
|
||||||
public static function getFloat(?float $value = null): Union
|
public static function getFloat(?float $value = null, bool $from_docblock = false): Union
|
||||||
{
|
{
|
||||||
if ($value !== null) {
|
if ($value !== null) {
|
||||||
$type = new TLiteralFloat($value);
|
$type = new TLiteralFloat($value, $from_docblock);
|
||||||
} else {
|
} else {
|
||||||
$type = new TFloat();
|
$type = new TFloat($from_docblock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Union([$type]);
|
return new Union([$type]);
|
||||||
|
Loading…
Reference in New Issue
Block a user