* [FIX] Wrong behavior when returning controller's method result

* [MOD] Code refactoring
This commit is contained in:
nuxsmin
2018-08-22 20:22:50 +02:00
parent 3c78910569
commit b2687c58a6
40 changed files with 653 additions and 653 deletions

View File

@@ -24,8 +24,6 @@
namespace SP\Modules\Web\Controllers;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use SP\Core\Exceptions\SPException;
use SP\Core\Language;
use SP\Core\PhpExtensionChecker;
@@ -46,8 +44,7 @@ final class InstallController extends ControllerBase
use JsonTrait;
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* indexAction
*/
public function indexAction()
{
@@ -72,9 +69,6 @@ final class InstallController extends ControllerBase
/**
* Performs sysPass installation
*
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function installAction()
{
@@ -92,11 +86,11 @@ final class InstallController extends ControllerBase
try {
$this->dic->get(Installer::class)->run($installData);
$this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Instalación finalizada'));
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Instalación finalizada'));
} catch (\Exception $e) {
processException($e);
$this->returnJsonResponseException($e);
return $this->returnJsonResponseException($e);
}
}
}