Skip to content

Commit

Permalink
BUGFIX: Fix type hint in Signal method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastian Heist committed Jul 5, 2017
1 parent 4800956 commit b0a5acb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 2 additions & 3 deletions Classes/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace Sandstorm\UserManagement\Controller;

use Neos\Error\Messages\Error;
use Neos\Flow\Http\Request;
use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Security\Exception\AuthenticationRequiredException;
use Sandstorm\UserManagement\Domain\Service\RedirectTargetServiceInterface;
Expand Down Expand Up @@ -135,10 +134,10 @@ protected function getErrorFlashMessage()

/**
* @param ControllerContext $controllerContext
* @param Request $originalRequest
* @param ActionRequest $originalRequest
* @Flow\Signal
*/
protected function emitAuthenticationSuccess(ControllerContext $controllerContext, Request $originalRequest = null)
protected function emitAuthenticationSuccess(ControllerContext $controllerContext, ActionRequest $originalRequest = null)
{
}

Expand Down
9 changes: 3 additions & 6 deletions Classes/Domain/Service/Flow/FlowRedirectTargetService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Sandstorm\UserManagement\Domain\Service\Flow;

use Sandstorm\UserManagement\Domain\Service\RedirectTargetServiceInterface;
Expand Down Expand Up @@ -34,9 +35,7 @@ public function onAuthenticationSuccess(ControllerContext $controllerContext, Ac
&& array_key_exists('package', $this->redirectAfterLogin)
) {
$controllerArguments = [];
if (array_key_exists('controllerArguments', $this->redirectAfterLogin) &&
is_array($this->redirectAfterLogin['controllerArguments'])
) {
if (array_key_exists('controllerArguments', $this->redirectAfterLogin) && is_array($this->redirectAfterLogin['controllerArguments'])) {
$controllerArguments = $this->redirectAfterLogin['controllerArguments'];
}

Expand All @@ -60,9 +59,7 @@ public function onLogout(ControllerContext $controllerContext)
&& array_key_exists('package', $this->redirectAfterLogout)
) {
$controllerArguments = [];
if (array_key_exists('controllerArguments', $this->redirectAfterLogout) &&
is_array($this->redirectAfterLogout['controllerArguments'])
) {
if (array_key_exists('controllerArguments', $this->redirectAfterLogout) && is_array($this->redirectAfterLogout['controllerArguments'])) {
$controllerArguments = $this->redirectAfterLogout['controllerArguments'];
}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@ Your example service could then look like this:
```PHP
namespace Your\Package\Domain\Service;
use Neos\Flow\Http\Request;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Security\Exception\AuthenticationRequiredException;
class ExampleService
{
public function onAuthenticationSuccess(ControllerContext $controllerContext, Request $originalRequest = null)
public function onAuthenticationSuccess(ControllerContext $controllerContext, ActionRequest $originalRequest = null)
{
// Do custom stuff here
}
Expand Down

0 comments on commit b0a5acb

Please sign in to comment.