<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Phpstan on Murat Useinov</title>
    <link>https://useinov.com/tags/phpstan/</link>
    <description>Recent content in Phpstan on Murat Useinov</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 09 Oct 2021 20:05:00 +0300</lastBuildDate>
    <atom:link href="https://useinov.com/tags/phpstan/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Generics we already have</title>
      <link>https://useinov.com/posts/2021/phpstan-generics/</link>
      <pubDate>Sat, 09 Oct 2021 20:05:00 +0300</pubDate>
      <guid>https://useinov.com/posts/2021/phpstan-generics/</guid>
      <description>&lt;p&gt;A template calls &lt;code&gt;getEmail()&lt;/code&gt; on an Order at three in the morning. The method returned &lt;code&gt;array&lt;/code&gt;, the docblock said &amp;ldquo;array of User&amp;rdquo;, and eight months later someone put an Order in it. Everything was fine until it was not.&lt;/p&gt;
&lt;p&gt;PHP still has no generics and will not get them soon. Meanwhile PHPStan and Psalm shipped them anyway, in docblocks. Checked at analysis, not at runtime. For everyday backend work that turns out to be most of the value.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
