mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Cleanup
This commit is contained in:
parent
b6e7201b5a
commit
ce60fa2151
@ -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);
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user