Skip to content

Commit c04d77d

Browse files
committed
Причесывание.
1 parent 4cd948e commit c04d77d

File tree

5 files changed

+13
-46
lines changed

5 files changed

+13
-46
lines changed

Services/Utils/ClearRouteCacheService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class ClearRouteCacheService
3333
/**
3434
* Constructor
3535
*
36-
* @param Filesystem $fs Filesystem
37-
* @param Router $router Router
38-
* @param string $kernelCacheDir Cache dir path
36+
* @param Filesystem $fs Filesystem.
37+
* @param Router $router Router.
38+
* @param string $kernelCacheDir Cache dir path.
3939
*/
4040
public function __construct(Filesystem $fs, Router $router, string $kernelCacheDir)
4141
{

Services/Utils/DispatchController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ public function dispatch(
110110
): bool {
111111
// Задать контроллер
112112
$this->request->attributes->set(
113-
'_controller', $controllerAction
113+
'_controller',
114+
$controllerAction
114115
);
115116

116117
$this->request->headers->add($this->headers);
@@ -125,9 +126,8 @@ public function dispatch(
125126
);
126127

127128
try {
128-
$this->response = $framework->handle(
129-
$this->request
130-
);
129+
$this->response = $framework->handle($this->request);
130+
$framework->terminate($this->request, $this->response);
131131
} catch (Exception $e) {
132132
return false;
133133
}

Services/Utils/DispatchRoute.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ public function dispatch(string $url)
190190

191191
try {
192192
$this->response = $framework->handle($this->request);
193+
$framework->terminate($this->request, $this->response);
193194
} catch (Exception $e) {
194195
return false;
195196
}

Services/Utils/RouteChecker.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,18 @@ public function getRouteInfoReference(string $uri, array $options = []) : ?Contr
127127
/**
128128
* Generates a URL from the given parameters.
129129
*
130-
* @param string $route The name of the route
131-
* @param mixed $parameters An array of parameters
132-
* @param integer $referenceType The type of reference (one of the constants in UrlGeneratorInterface)
130+
* @param string $route The name of the route.
131+
* @param mixed $parameters An array of parameters.
132+
* @param integer $referenceType The type of reference (one of the constants in UrlGeneratorInterface).
133133
*
134134
* @return string The generated URL
135135
*
136136
* @see UrlGeneratorInterface
137137
*/
138138
public function generateUrl(
139-
$route,
139+
string $route,
140140
$parameters = [],
141-
$referenceType = UrlGeneratorInterface::ABSOLUTE_PATH
141+
int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH
142142
) : string {
143143
$routeParams = $this->routeCollection->get($route);
144144

Services/Utils/Supplemental.php

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)