Answer the question
In order to leave comments, you need to log in
How to set phpdoc for method not found?
a piece of the router: the controller has already been called, we call the controller method and connect the view
if (method_exists($controller, $action)) {
$cObj->$action();
$cObj->getView(); // PhpStorm ругается, что метод не найден
} else {
echo "<code>Метод {$controller}::{$action} не найден</code>";
}
Answer the question
In order to leave comments, you need to log in
if (method_exists($controller, $action)) {
/** @var MyClass $cObj */
$cObj->$action();
$cObj->getView(); // PhpStorm ругается, что метод не найден
} else {
echo "<code>Метод {$controller}::{$action} не найден</code>";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question