Skip to content

Commit

Permalink
Merge pull request #308 from hacheraw/controller-events
Browse files Browse the repository at this point in the history
Remove return type for Controller events
  • Loading branch information
dereuromark authored Jun 19, 2023
2 parents f5289db + a9ea461 commit 3c9c9b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/CodeCompletion/Task/ControllerEventsTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ public function type(): string {
*/
public function create(): string {
$events = <<<'TXT'
public function startup(EventInterface $event): ?Response {
public function startup(EventInterface $event) {
return null;
}
public function beforeFilter(EventInterface $event): ?Response {
public function beforeFilter(EventInterface $event) {
return null;
}
public function beforeRender(EventInterface $event): ?Response {
public function beforeRender(EventInterface $event) {
return null;
}
public function afterFilter(EventInterface $event): ?Response {
public function afterFilter(EventInterface $event) {
return null;
}
public function shutdown(EventInterface $event): ?Response {
public function shutdown(EventInterface $event) {
return null;
}
public function beforeRedirect(EventInterface $event, $url, Response $response) {
Expand Down
20 changes: 10 additions & 10 deletions tests/TestCase/CodeCompletion/Task/ControllerEventsTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ public function testCollect() {
if (false) {
abstract class Controller {
public function startup(EventInterface $event): ?Response {
public function startup(EventInterface $event) {
return null;
}
public function beforeFilter(EventInterface $event): ?Response {
public function beforeFilter(EventInterface $event) {
return null;
}
public function beforeRender(EventInterface $event): ?Response {
public function beforeRender(EventInterface $event) {
return null;
}
public function afterFilter(EventInterface $event): ?Response {
public function afterFilter(EventInterface $event) {
return null;
}
public function shutdown(EventInterface $event): ?Response {
public function shutdown(EventInterface $event) {
return null;
}
public function beforeRedirect(EventInterface $event, $url, Response $response) {
Expand All @@ -55,19 +55,19 @@ public function beforeRedirect(EventInterface $event, $url, Response $response)
}
abstract class Component {
public function startup(EventInterface $event): ?Response {
public function startup(EventInterface $event) {
return null;
}
public function beforeFilter(EventInterface $event): ?Response {
public function beforeFilter(EventInterface $event) {
return null;
}
public function beforeRender(EventInterface $event): ?Response {
public function beforeRender(EventInterface $event) {
return null;
}
public function afterFilter(EventInterface $event): ?Response {
public function afterFilter(EventInterface $event) {
return null;
}
public function shutdown(EventInterface $event): ?Response {
public function shutdown(EventInterface $event) {
return null;
}
public function beforeRedirect(EventInterface $event, $url, Response $response) {
Expand Down

0 comments on commit 3c9c9b5

Please sign in to comment.