php - How to enable warning for mismatched typehint for method call? -


i have method expecting int:

/**  * @param int $someint  */ public function methodexpectingint($someint) {     // stuff } 

yet when called somewhere when passing object it, warning occur in phpstorm.

/**  * @return void  */ public function somemethod() {     $this->methodexpectingint(23); // no warning int fine     $this->methodexpectingint(new \object()); // gets warning in phpstorm \o/     $this->methodexpectingint("this string should issue warning"); // no warning yet string     $this->methodexpectingint(null); // no warning yet null     $this->methodexpectingint(2.9); // no warning yet float } 

it this:

screenshot of method call , missing warning


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -