bytic /
controllers
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Nip\Controllers\Traits; |
||||||
| 4 | |||||||
| 5 | use Nip\Http\Request; |
||||||
| 6 | |||||||
| 7 | /** |
||||||
| 8 | * Trait RequestAwareTrait |
||||||
| 9 | * @package Nip\Controllers\Traits |
||||||
| 10 | */ |
||||||
| 11 | trait RequestAwareTrait |
||||||
| 12 | { |
||||||
| 13 | use \Nip\Http\Request\RequestAwareTrait; |
||||||
| 14 | |||||||
| 15 | /** |
||||||
| 16 | * @param Request $request |
||||||
| 17 | */ |
||||||
| 18 | public function populateFromRequest(Request $request) |
||||||
| 19 | { |
||||||
| 20 | $this->setName($request->getControllerName()); |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 21 | $this->setAction($request->getActionName()); |
||||||
|
0 ignored issues
–
show
It seems like
setAction() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 22 | } |
||||||
| 23 | } |
||||||
| 24 |