Skip to content

Commit

Permalink
FRW-19 Support Symfony packages v6. (#2280)
Browse files Browse the repository at this point in the history
FRW-19 Support Symfony v6
  • Loading branch information
geega authored Jan 24, 2023
1 parent 619fe9d commit d46dd1d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/SprykerShop/Yves/ShopRouter/Generator/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(Pimple $app, RouteCollection $routes, RequestContext
*
* @return string
*/
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
{
$route = $this->routes->get($name);
if ($route === null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function setContext(RequestContext $context)
/**
* @inheritDoc
*/
public function getContext()
public function getContext(): RequestContext
{
return $this->context;
}
Expand Down
6 changes: 3 additions & 3 deletions src/SprykerShop/Yves/ShopRouter/Plugin/Router/SilexRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function setContext(RequestContext $context)
/**
* @return \Symfony\Component\Routing\RequestContext
*/
public function getContext()
public function getContext(): RequestContext
{
return $this->sharedSilexRouter->getContext();
}
Expand All @@ -61,7 +61,7 @@ public function getRouteCollection()
*
* @return string
*/
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
{
$generator = $this->getFactory()->createUrlGenerator($this->getRouteCollection(), $this->getContext());

Expand All @@ -73,7 +73,7 @@ public function generate($name, $parameters = [], $referenceType = self::ABSOLUT
*
* @return array
*/
public function match($pathinfo)
public function match(string $pathinfo): array
{
return $this->sharedSilexRouter->match($pathinfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class StorageRouter extends AbstractRouter
*
* @return string
*/
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
{
$urlMatcher = $this->getFactory()->getUrlMatcher();
$localeName = $this->getLocale();
Expand Down Expand Up @@ -61,7 +61,7 @@ public function generate($name, $parameters = [], $referenceType = self::ABSOLUT
*
* @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException
*/
public function match($pathinfo)
public function match(string $pathinfo): array
{
$defaultLocalePrefix = $this->getDefaultLocalePrefix();

Expand Down

0 comments on commit d46dd1d

Please sign in to comment.