1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
This commit is contained in:
Daniil Gentili 2021-10-13 11:26:01 +02:00
parent b6e7201b5a
commit ce60fa2151
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 1 additions and 21 deletions

View File

@ -130,9 +130,7 @@ class TNamedObject extends Atomic
$result = $this->toNamespacedString($namespace, $aliased_classes, $this_class, false);
$intersection = strrpos($result, '&');
if ($intersection === false ||
($intersection !== false && $php_major_version >= 8 && $php_minor_version >= 1)
) {
if ($intersection === false || ($php_major_version >= 8 && $php_minor_version >= 1)) {
return $result;
}
return substr($result, $intersection+1);

View File

@ -750,24 +750,6 @@ class ReturnTypeManipulationTest extends FileManipulationTestCase
false,
true,
],
'OrFalseNullInReturn' => [
'<?php
function a() {
/** @var array|false|null $a */
$a = false;
return $a;
}',
'<?php
function a(): array|false|null {
/** @var array|false|null $a */
$a = false;
return $a;
}',
'8.0',
['MissingReturnType'],
false,
true,
],
'ForeignStatic' => [
'<?php
class a {