summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-kernel/Controller')
-rw-r--r--vendor/symfony/http-kernel/Controller/ArgumentResolver.php8
-rw-r--r--vendor/symfony/http-kernel/Controller/ControllerReference.php6
-rw-r--r--vendor/symfony/http-kernel/Controller/ControllerResolver.php6
3 files changed, 10 insertions, 10 deletions
diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php
index 142a6d54a6..86ceab2f26 100644
--- a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php
+++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php
@@ -34,7 +34,7 @@ final class ArgumentResolver implements ArgumentResolverInterface
*/
private $argumentValueResolvers;
- public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = array())
+ public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = [])
{
$this->argumentMetadataFactory = $argumentMetadataFactory ?: new ArgumentMetadataFactory();
$this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers();
@@ -45,7 +45,7 @@ final class ArgumentResolver implements ArgumentResolverInterface
*/
public function getArguments(Request $request, $controller)
{
- $arguments = array();
+ $arguments = [];
foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller) as $metadata) {
foreach ($this->argumentValueResolvers as $resolver) {
@@ -83,12 +83,12 @@ final class ArgumentResolver implements ArgumentResolverInterface
public static function getDefaultArgumentValueResolvers(): iterable
{
- return array(
+ return [
new RequestAttributeValueResolver(),
new RequestValueResolver(),
new SessionValueResolver(),
new DefaultValueResolver(),
new VariadicValueResolver(),
- );
+ ];
}
}
diff --git a/vendor/symfony/http-kernel/Controller/ControllerReference.php b/vendor/symfony/http-kernel/Controller/ControllerReference.php
index f424fdc833..b4fdadd21e 100644
--- a/vendor/symfony/http-kernel/Controller/ControllerReference.php
+++ b/vendor/symfony/http-kernel/Controller/ControllerReference.php
@@ -27,15 +27,15 @@ use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface;
class ControllerReference
{
public $controller;
- public $attributes = array();
- public $query = array();
+ public $attributes = [];
+ public $query = [];
/**
* @param string $controller The controller name
* @param array $attributes An array of parameters to add to the Request attributes
* @param array $query An array of parameters to add to the Request query string
*/
- public function __construct(string $controller, array $attributes = array(), array $query = array())
+ public function __construct(string $controller, array $attributes = [], array $query = [])
{
$this->controller = $controller;
$this->attributes = $attributes;
diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php
index 04c5fcf53d..3cebfb3e8b 100644
--- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php
+++ b/vendor/symfony/http-kernel/Controller/ControllerResolver.php
@@ -107,7 +107,7 @@ class ControllerResolver implements ControllerResolverInterface
list($class, $method) = explode('::', $controller, 2);
try {
- return array($this->instantiateController($class), $method);
+ return [$this->instantiateController($class), $method];
} catch (\Error | \LogicException $e) {
try {
if ((new \ReflectionMethod($class, $method))->isStatic()) {
@@ -155,7 +155,7 @@ class ControllerResolver implements ControllerResolverInterface
}
if (!isset($callable[0]) || !isset($callable[1]) || 2 !== \count($callable)) {
- return 'Invalid array callable, expected array(controller, method).';
+ return 'Invalid array callable, expected [controller, method].';
}
list($controller, $method) = $callable;
@@ -172,7 +172,7 @@ class ControllerResolver implements ControllerResolverInterface
$collection = $this->getClassMethodsWithoutMagicMethods($controller);
- $alternatives = array();
+ $alternatives = [];
foreach ($collection as $item) {
$lev = levenshtein($method, $item);