1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
This commit is contained in:
Vincent Langlet 2022-12-25 17:35:47 +01:00
parent ebd5727dec
commit a8ef02db5a
3 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@ abstract class Atomic implements TypeNode
?string $text = null,
bool $from_docblock = false
): Atomic {
$result = self::createInner($value, $analysis_php_version_id, $template_type_map, $type_aliases);
$result = self::createInner($value, $analysis_php_version_id, $template_type_map, $type_aliases, $from_docblock);
$result->offset_start = $offset_start;
$result->offset_end = $offset_end;
$result->text = $text;

View File

@ -234,7 +234,7 @@ final class MutableUnion implements TypeNode
$this->typed_class_strings = [];
$this->checked = false;
$from_docblock = $this->from_docblock;
$from_docblock = false;
$keyed_types = [];
foreach ($types as $type) {

View File

@ -1085,7 +1085,7 @@ class RedundantConditionTest extends TestCase
/** @psalm-suppress PossiblyNullArgument */
takesA($a);
if ($a instanceof A) {}',
'error_message' => 'RedundantConditionGivenDocblockType - src' . DIRECTORY_SEPARATOR . 'somefile.php:15',
'error_message' => 'RedundantCondition - src' . DIRECTORY_SEPARATOR . 'somefile.php:15',
],
'replaceFalseType' => [
'code' => '<?php