From 0f0ebc5114909c6d1bc18a94d1fa87860ac08be1 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Tue, 10 Oct 2023 13:13:58 -0300 Subject: [PATCH] Add `Module.stub`. --- extension.neon | 1 + phpstan.neon | 1 + stubs/Module.stub | 18 ++++++++++++++++++ tests/Yii/MyController.php | 4 ++++ 4 files changed, 24 insertions(+) create mode 100644 stubs/Module.stub diff --git a/extension.neon b/extension.neon index 2c86e71..ed2ba05 100644 --- a/extension.neon +++ b/extension.neon @@ -3,6 +3,7 @@ parameters: config_path: null stubFiles: - stubs/BaseYii.stub + - stubs/Module.stub parametersSchema: yii2: structure([ diff --git a/phpstan.neon b/phpstan.neon index 05aafa2..b686772 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,6 +12,7 @@ parameters: paths: - src + - tests scanFiles: - vendor/yiisoft/yii2/Yii.php diff --git a/stubs/Module.stub b/stubs/Module.stub new file mode 100644 index 0000000..5ec52ec --- /dev/null +++ b/stubs/Module.stub @@ -0,0 +1,18 @@ +request->headers->get('X-Key', '', false); + $mailer = $this->module->mailer; + $session = $this->module->session; + $request = $this->module->request; + reset($values); } }