title: Variable "probably undefined" - am I missing something?
body: <p>Sanity check. I am still pretty new/dumb when it comes to OOP PHP.</p>
  <p>PhpStorm (PS) warns that &quot;$nowGmt&quot; is &quot;probably undefined&quot;. Is PS being over fussy or am I missing something obvious (looks good to me).</p>
  <pre><code>public function nowUTC($type)
  {
    if ($type==&quot;mysql&quot;) $nowGmt=gmdate(&quot;Y-m-d H:i:s&quot;);
    elseif ($type==&quot;text&quot;) $nowGmt=gmdate(&quot;M jS Y g:i a&quot;);
    elseif ($type==&quot;unix&quot;) $nowGmt=time();
    return $nowGmt;
  }
  </code></pre>
  <p>Thanks for any pointers.</p>
  <p>PS I should say for those of you not familiar with PS it is generally fantastic but occasionally a bit odd in some of its warnings. (Well the warnings probably reflect good practice and I am probably at fault.) It is the first IDE that I think is ****. Just did not want to put you off trying PS.</p>