Skip to content

Commit 26e5684

Browse files
Tobionarnaud-lb
authored andcommitted
some type fixes
1 parent 514e27a commit 26e5684

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Component\Console\Input\InputInterface;
1616
use Symfony\Component\Console\Output\OutputInterface;
1717
use Symfony\Component\Routing\RouterInterface;
18-
use Symfony\Component\Console\Output\Output;
1918

2019
/**
2120
* A console command for retrieving information about routes
@@ -112,7 +111,7 @@ protected function outputRoutes(OutputInterface $output, $routes = null)
112111
? implode(', ', $requirements['_method']) : $requirements['_method']
113112
)
114113
: 'ANY';
115-
$hostname = null !== $route->getHostnamePattern()
114+
$hostname = '' !== $route->getHostnamePattern()
116115
? $route->getHostnamePattern() : 'ANY';
117116
$output->writeln(sprintf($format, $name, $method, $hostname, $route->getPattern()));
118117
}

src/Symfony/Component/Routing/CompiledRoute.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ class CompiledRoute
3030
/**
3131
* Constructor.
3232
*
33-
* @param string $staticPrefix The static prefix of the compiled route
34-
* @param string $regex The regular expression to use to match this route
35-
* @param array $tokens An array of tokens to use to generate URL for this route
36-
* @param array $pathVariables An array of path variables
37-
* @param array $hostnameRegex|null Hostname regex
38-
* @param array $hostnameTokens Hostname tokens
39-
* @param array $hostnameVariables An array of hostname variables
40-
* @param array $variables An array of variables (variables defined in the path and in the hostname patterns)
33+
* @param string $staticPrefix The static prefix of the compiled route
34+
* @param string $regex The regular expression to use to match this route
35+
* @param array $tokens An array of tokens to use to generate URL for this route
36+
* @param array $pathVariables An array of path variables
37+
* @param string|null $hostnameRegex Hostname regex
38+
* @param array $hostnameTokens Hostname tokens
39+
* @param array $hostnameVariables An array of hostname variables
40+
* @param array $variables An array of variables (variables defined in the path and in the hostname patterns)
4141
*/
4242
public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostnameRegex = null, array $hostnameTokens = array(), array $hostnameVariables = array(), array $variables = array())
4343
{
44-
$this->staticPrefix = $staticPrefix;
44+
$this->staticPrefix = (string) $staticPrefix;
4545
$this->regex = $regex;
4646
$this->tokens = $tokens;
4747
$this->pathVariables = $pathVariables;

src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class DumperCollection implements \IteratorAggregate
2020
{
2121
private $parent;
2222
private $children = array();
23+
private $attributes = array();
2324

2425
/**
2526
* Returns the children routes and collections.

src/Symfony/Component/Routing/RouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public function getHostnamePattern()
282282
*/
283283
public function setHostnamePattern($pattern)
284284
{
285-
$this->hostnamePattern = $pattern;
285+
$this->hostnamePattern = (string) $pattern;
286286

287287
if ('' === $pattern) {
288288
return;

0 commit comments

Comments
 (0)