Skip to content

Conversation

dereuromark
Copy link
Contributor

Resolves #16

But it seems that union sniffs with more than a single type added dont get fixed up yet..

     protected $string1 = null;
 
     /**
-     * @var string|int|null
+     * @var ?string|int
      */
     protected $string2 = null;
 
     /**
      * @param string|null $string1
-     * @param string|null $string2
+     * @param ?string|null $string2
      *
      * @return string|null Some Comment
      */

Rest seems to work

@dereuromark dereuromark added enhancement New feature or request help wanted Extra attention is needed labels Oct 16, 2024
@dereuromark
Copy link
Contributor Author

If I var_dump all the snippets process() runs into, those are

string(20) "?string Some Comment"
string(11) "?string|int"
string(16) "?string $string1"
string(21) "?string|null $string2"
string(20) "?string Some Comment"
string(20) "?string Some Comment"
string(11) "?string|int"
string(16) "?string $string1"
string(21) "?string|null $string2"
string(20) "?string Some Comment"

So seems correct

@dereuromark dereuromark removed the help wanted Extra attention is needed label Oct 16, 2024
@dereuromark dereuromark merged commit 23fc3c8 into master Oct 16, 2024
4 checks passed
@dereuromark dereuromark deleted the nullable branch October 16, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix up ?type to type|null in docblocks

1 participant