Skip to content

Commit

Permalink
Add stubs for controller's request and response properties
Browse files Browse the repository at this point in the history
  • Loading branch information
erickskrauch committed Nov 27, 2023
1 parent c3944a6 commit 383a1f7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ parameters:
- src/Stubs/base/Controller.stub
- src/Stubs/base/Event.stub
- src/Stubs/base/Model.stub
- src/Stubs/base/Request.stub
- src/Stubs/base/Response.stub

- src/Stubs/data/ActiveDataProvider.stub
- src/Stubs/data/ArrayDataProvider.stub
Expand Down
4 changes: 4 additions & 0 deletions src/Stubs/base/Controller.stub
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ declare(strict_types=1);

namespace yii\base;

/**
* @property-read \yii\base\Request $request
* @property-read \yii\base\Response $response
*/
class Controller {

/**
Expand Down
8 changes: 8 additions & 0 deletions src/Stubs/base/Request.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
declare(strict_types=1);

namespace yii\base;

class Request {

}
8 changes: 8 additions & 0 deletions src/Stubs/base/Response.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
declare(strict_types=1);

namespace yii\base;

class Response {

}

0 comments on commit 383a1f7

Please sign in to comment.