Skip to content

Commit

Permalink
[TASK] Add more code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Oct 25, 2024
1 parent 9316db7 commit cfb768e
Showing 1 changed file with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ class MyController extends ActionController
$this->redirectToUri('foo');
}

public function imageDeleteActionReturnVoid(): void
{
$this->redirectToUri('foo');
}

/**
* @return void
*/
public function imageDeleteActionWithReturnVoid(): void
public function imageDeleteActionWithReturnVoidInAnnotation(): void
{
$this->redirectToUri('foo');
}
Expand All @@ -34,6 +39,12 @@ class MyController extends ActionController
{
return $this->redirectToUri('foo');
}

protected function thisMethodIsNotReliable(): void
{
$url = 'https://example.com';
$this->redirectToUri($url);
}
}

?>
Expand All @@ -57,10 +68,15 @@ class MyController extends ActionController
return $this->redirectToUri('foo');
}

public function imageDeleteActionReturnVoid(): ResponseInterface
{
return $this->redirectToUri('foo');
}

/**
* @return \Psr\Http\Message\ResponseInterface
*/
public function imageDeleteActionWithReturnVoid(): ResponseInterface
public function imageDeleteActionWithReturnVoidInAnnotation(): ResponseInterface
{
return $this->redirectToUri('foo');
}
Expand All @@ -74,6 +90,12 @@ class MyController extends ActionController
{
return $this->redirectToUri('foo');
}

protected function thisMethodIsNotReliable()
{
$url = 'https://example.com';
return $this->redirectToUri($url);
}
}

?>

0 comments on commit cfb768e

Please sign in to comment.