1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Made the test marked 7.4

This commit is contained in:
Aleksandr Zhuravlev 2021-10-14 22:05:40 +13:00
parent ff1b745e2a
commit 657f8e22ed
2 changed files with 5 additions and 9 deletions

View File

@ -126,18 +126,13 @@ class ReflectionParameter {
/**
* @psalm-immutable
* @since 8.0
*/
class ReflectionNamedType extends ReflectionType
{
/**
* @since 8.0
*/
public function getName(): string {}
/**
* @psalm-assert-if-false class-string $this->getName()
* @since 8.0
*/
public function isBuiltin(): bool {}
}

View File

@ -1465,13 +1465,14 @@ class AssertAnnotationTest extends TestCase
],
'reflectionNameTypeClassStringIfNotBuiltin' => [
'<?php
/**
* @return class-string|null
*/
/** @return class-string|null */
function getPropertyType(\ReflectionProperty $reflectionItem): ?string {
$type = $reflectionItem->getType();
return ($type instanceof \ReflectionNamedType) && !$type->isBuiltin() ? $type->getName() : null;
}'
}',
[],
[],
'7.4',
],
'withHasTypeCall' => [
'<?php