bolha.us is one of the many independent Mastodon servers you can use to participate in the fediverse.
We're a Brazilian IT Community. We love IT/DevOps/Cloud, but we also love to talk about life, the universe, and more. | Nós somos uma comunidade de TI Brasileira, gostamos de Dev/DevOps/Cloud e mais!

Server stats:

254
active users

#phpdoc

0 posts0 participants0 posts today
Martin Herndl<p>a <a href="https://phpc.social/tags/cheatsheet" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cheatsheet</span></a> for <a href="https://phpc.social/tags/PHPStan" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PHPStan</span></a> <a href="https://phpc.social/tags/Psalm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Psalm</span></a> <a href="https://phpc.social/tags/PHPDoc" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PHPDoc</span></a> would be neat. similar as this one for <a href="https://phpc.social/tags/TypeScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TypeScript</span></a></p><p><a href="https://jasondavis.net/@jason/114269720824635092" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">jasondavis.net/@jason/11426972</span><span class="invisible">0824635092</span></a></p>
Daniel Neuman<p>Sitting in PhpStorm and trying to get type hinting to work for calling generic functions. <br>I assume `$result` should get the type `T` and `$x` should be parsed as `int`, but the editor gives me no hint at all.<br>Is this even supposed to work?<br>```<br>/**<br> * @template T<br> * <span class="h-card" translate="no"><a href="https://mastodon.social/@param" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>param</span></a></span> callable(): T $fun<br> * <span class="h-card" translate="no"><a href="https://mastodon.social/@return" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>return</span></a></span> T<br> */<br>function call(callable $fun) {<br> $result = $fun();<br> return $result;<br>}</p><p>$x = call(fn() =&gt; 1);<br>```<br><a href="https://phpstan.org/r/76b4d50f-dd91-4e39-993a-458b26c321cf" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">phpstan.org/r/76b4d50f-dd91-4e</span><span class="invisible">39-993a-458b26c321cf</span></a><br><a href="https://mastodon.social/tags/php" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>php</span></a> <a href="https://mastodon.social/tags/phpStorm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>phpStorm</span></a> <a href="https://mastodon.social/tags/generics" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>generics</span></a> <a href="https://mastodon.social/tags/phpDoc" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>phpDoc</span></a></p>