-
-
Notifications
You must be signed in to change notification settings - Fork 466
Open
Labels
Description
See below simplified Router class.
namespace Phalcon\Mvc;
class Router
{
protected action = null;
/**
* Returns the processed action name
*/
public function getActionName() -> string
{
return this->action;
}
}
This class will return null when getActionName() is called even when our return type specifies it as a string. I'm expecting a Fatal error: Uncaught TypeError.
It would be nice if our static code analyser / compiler would detect that our member variable is incompatible.