Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some type fixes

  • Loading branch information...
commit 26e56842dc00e2a402b058d330aeb30ef53dd804 1 parent 514e27a
@Tobion Tobion authored arnaud-lb committed
View
3  src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php
@@ -15,7 +15,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Routing\RouterInterface;
-use Symfony\Component\Console\Output\Output;
/**
* A console command for retrieving information about routes
@@ -112,7 +111,7 @@ protected function outputRoutes(OutputInterface $output, $routes = null)
? implode(', ', $requirements['_method']) : $requirements['_method']
)
: 'ANY';
- $hostname = null !== $route->getHostnamePattern()
+ $hostname = '' !== $route->getHostnamePattern()
? $route->getHostnamePattern() : 'ANY';
$output->writeln(sprintf($format, $name, $method, $hostname, $route->getPattern()));
}
View
18 src/Symfony/Component/Routing/CompiledRoute.php
@@ -30,18 +30,18 @@ class CompiledRoute
/**
* Constructor.
*
- * @param string $staticPrefix The static prefix of the compiled route
- * @param string $regex The regular expression to use to match this route
- * @param array $tokens An array of tokens to use to generate URL for this route
- * @param array $pathVariables An array of path variables
- * @param array $hostnameRegex|null Hostname regex
- * @param array $hostnameTokens Hostname tokens
- * @param array $hostnameVariables An array of hostname variables
- * @param array $variables An array of variables (variables defined in the path and in the hostname patterns)
+ * @param string $staticPrefix The static prefix of the compiled route
+ * @param string $regex The regular expression to use to match this route
+ * @param array $tokens An array of tokens to use to generate URL for this route
+ * @param array $pathVariables An array of path variables
+ * @param string|null $hostnameRegex Hostname regex
+ * @param array $hostnameTokens Hostname tokens
+ * @param array $hostnameVariables An array of hostname variables
+ * @param array $variables An array of variables (variables defined in the path and in the hostname patterns)
*/
public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostnameRegex = null, array $hostnameTokens = array(), array $hostnameVariables = array(), array $variables = array())
{
- $this->staticPrefix = $staticPrefix;
+ $this->staticPrefix = (string) $staticPrefix;
$this->regex = $regex;
$this->tokens = $tokens;
$this->pathVariables = $pathVariables;
View
1  src/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php
@@ -20,6 +20,7 @@ class DumperCollection implements \IteratorAggregate
{
private $parent;
private $children = array();
+ private $attributes = array();
/**
* Returns the children routes and collections.
View
2  src/Symfony/Component/Routing/RouteCollection.php
@@ -282,7 +282,7 @@ public function getHostnamePattern()
*/
public function setHostnamePattern($pattern)
{
- $this->hostnamePattern = $pattern;
+ $this->hostnamePattern = (string) $pattern;
if ('' === $pattern) {
return;
Please sign in to comment.
Something went wrong with that request. Please try again.