在php mvc结构中,我有这个基本控制器类,并添加如下构造函数:

namespace App\Core;
/**
* Controller class
*/

class Controller
{
    /** @var View View The view object */
    public $View;
    public $templates;
    public $app;
    /**
     * Construct the (base) controller. This happens when a real controller is constructed, like in
     * the constructor of IndexController when it says: parent::__construct();
     */
    public function __construct()
    {
        $this->app = \App\Core\System\App::instance();
        $this->Language = new Language('en-gb');
        $this->templates = new \League\Plates\Engine(Config::get('PATH_VIEW'));
        $this->Url = new \App\Core\Url(Config::get('URL'),Config::get('URL'));
    }

    public function loadModel($name) {

        $path = '\App\Catalog\Model\\'.$name;

        $this->model = new $path;

        return $this->model;

    }

    public function loadController($name) {

        $path = '\App\Catalog\Controller\\'.$name;

        $this->controller = new $path;

        return $this->controller;

    }
}

现在在行动(即编辑帐户)控制器我有:

namespace App\Catalog\Controller\Account;
use App\Core\Config;
use App\Core\Csrf;
use App\Core\Response;
use App\Core\Session;

class EditAccount extends \App\Core\Controller
{
    public function __construct()
    {
        parent::__construct();

        //Auth::checkAuthentication();
    }
    public function index()
    {
    }
    public function action()
    {
    }
}

现在,我在PhpStorm工作并看到 override 错误:

如何修复此错误?

注意:如果我从 EditAccount 类中删除 extends \App\Core\Controller ,错误已修复但我需要 extends \App\Core\Controller .