Skip to content

Commit

Permalink
Preserve from_docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Dec 24, 2022
1 parent 57d1bd4 commit cb9d1ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Psalm/Type/MutableUnion.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function setTypes(array $types): self
$this->typed_class_strings = [];
$this->checked = false;

$from_docblock = false;
$from_docblock = $this->from_docblock;
$keyed_types = [];

foreach ($types as $type) {
Expand Down
4 changes: 3 additions & 1 deletion tests/TypeReconciliation/RedundantConditionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1550,8 +1550,10 @@ function f(array $p) : void {
'code' => '<?php
/**
* @param array|null $value
* *
* * @return null
*/
function reverseTransform($value): null
function reverseTransform($value)
{
if (null === $value) {
return null;
Expand Down

0 comments on commit cb9d1ed

Please sign in to comment.