Created
March 14, 2012 22:05
-
-
Save juzna/2039906 to your computer and use it in GitHub Desktop.
PhpStorm inconsistent use proof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tools = new \MyApp\MyModule\Tools; | |
$tools->getObject()->isThisAnObject(); // will show a warning because return type of getObject() won't be recognized correctly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyApp; | |
/** | |
*/ | |
class Object { | |
function isThisAnObject() { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyApp\MyModule; | |
use MyApp; | |
/** | |
*/ | |
class Tools { | |
/** | |
* Test - return type will be wrong here | |
* @return MyApp\Object | |
*/ | |
public function getObject() { | |
$x = call_user_func('a'); | |
return $x; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment