Skip to content

Commit eff619e

Browse files
Merge branch '5.4' into 6.0
* 5.4: More return type fixes (bis) Cleanup `@return` annotations
2 parents 4c5a8f6 + 8b23d3d commit eff619e

15 files changed

+19
-15
lines changed

Generator/Dumper/GeneratorDumperInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function dump(array $options = []);
3131
/**
3232
* Gets the routes to dump.
3333
*
34-
* @return RouteCollection A RouteCollection instance
34+
* @return RouteCollection
3535
*/
3636
public function getRoutes();
3737
}

Loader/AnnotationClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function setRouteAnnotationClass(string $class)
102102
/**
103103
* Loads from annotations from a class.
104104
*
105-
* @return RouteCollection A RouteCollection instance
105+
* @return RouteCollection
106106
*
107107
* @throws \InvalidArgumentException When route can't be parsed
108108
*/

Loader/AnnotationDirectoryLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class AnnotationDirectoryLoader extends AnnotationFileLoader
2424
{
2525
/**
26-
* @return RouteCollection A RouteCollection instance
26+
* @return RouteCollection
2727
*
2828
* @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed
2929
*/

Loader/AnnotationFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(FileLocatorInterface $locator, AnnotationClassLoader
4040
/**
4141
* Loads from annotations from a file.
4242
*
43-
* @return RouteCollection|null A RouteCollection instance
43+
* @return RouteCollection|null
4444
*
4545
* @throws \InvalidArgumentException When the file does not exist or its routes cannot be parsed
4646
*/

Loader/ClosureLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ClosureLoader extends Loader
2626
/**
2727
* Loads a Closure.
2828
*
29-
* @return RouteCollection A RouteCollection instance
29+
* @return RouteCollection
3030
*/
3131
public function load(mixed $closure, string $type = null)
3232
{

Loader/PhpFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class PhpFileLoader extends FileLoader
3030
/**
3131
* Loads a PHP file.
3232
*
33-
* @return RouteCollection A RouteCollection instance
33+
* @return RouteCollection
3434
*/
3535
public function load(mixed $file, string $type = null)
3636
{

Loader/XmlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class XmlFileLoader extends FileLoader
3535
public const SCHEME_PATH = '/schema/routing/routing-1.0.xsd';
3636

3737
/**
38-
* @return RouteCollection A RouteCollection instance
38+
* @return RouteCollection
3939
*
4040
* @throws \InvalidArgumentException when the file cannot be loaded or when the XML cannot be
4141
* parsed because it does not validate against the scheme

Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class YamlFileLoader extends FileLoader
3939
private $yamlParser;
4040

4141
/**
42-
* @return RouteCollection A RouteCollection instance
42+
* @return RouteCollection
4343
*
4444
* @throws \InvalidArgumentException When a route can't be parsed because YAML is invalid
4545
*/

Matcher/Dumper/MatcherDumperInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function dump(array $options = []);
3131
/**
3232
* Gets the routes to dump.
3333
*
34-
* @return RouteCollection A RouteCollection instance
34+
* @return RouteCollection
3535
*/
3636
public function getRoutes();
3737
}

Matcher/ExpressionLanguageProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ public function __construct(ServiceProviderInterface $functions)
3434
*/
3535
public function getFunctions()
3636
{
37+
$functions = [];
38+
3739
foreach ($this->functions->getProvidedServices() as $function => $type) {
38-
yield new ExpressionFunction(
40+
$functions[] = new ExpressionFunction(
3941
$function,
4042
static function (...$args) use ($function) {
4143
return sprintf('($context->getParameter(\'_functions\')->get(%s)(%s))', var_export($function, true), implode(', ', $args));
@@ -45,6 +47,8 @@ function ($values, ...$args) use ($function) {
4547
}
4648
);
4749
}
50+
51+
return $functions;
4852
}
4953

5054
public function get(string $function): callable

0 commit comments

Comments
 (0)