Skip to content

Commit db405e2

Browse files
committed
Rector
1 parent 920c919 commit db405e2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/lib/Server/Controller/Content/ContentViewController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
1212
use ApiPlatform\OpenApi\Model;
1313
use Ibexa\Rest\Server\Controller as RestController;
14-
use Symfony\Component\HttpFoundation\Request;
1514
use Symfony\Component\HttpFoundation\Response;
1615
use Symfony\Component\HttpKernel\HttpKernelInterface;
1716

@@ -71,7 +70,7 @@ public function createView()
7170
$response = $this->forward('ezpublish_rest.controller.views:createView');
7271

7372
// Add 301 status code and location href
74-
$response->setStatusCode(301);
73+
$response->setStatusCode(Response::HTTP_MOVED_PERMANENTLY);
7574
$response->headers->set('Location', $this->router->generate('ibexa.rest.views.create'));
7675

7776
return $response;
@@ -80,7 +79,7 @@ public function createView()
8079
/**
8180
* @param string $controller
8281
*
83-
* @return \Symfony\Component\HttpFoundation\Response
82+
* @return Response
8483
*/
8584
protected function forward($controller)
8685
{

src/lib/Server/Controller/Session/SessionBaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function logout(Request $request): Response
9090
$domain
9191
);
9292

93-
$response->setStatusCode(404);
93+
$response->setStatusCode(Response::HTTP_NOT_FOUND);
9494
$requestSession->clear();
9595

9696
return $response;

0 commit comments

Comments
 (0)