Skip to content

Commit a589e2b

Browse files
committed
add parameter type declarations where possible
1 parent e852e76 commit a589e2b

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private function getFilesInfo(array $filenames)
107107
return $filesInfo;
108108
}
109109

110-
protected function findFiles($filename)
110+
protected function findFiles(string $filename)
111111
{
112112
if (is_file($filename)) {
113113
return [$filename];

src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(ContainerInterface $container, iterable $iterator)
3838
/**
3939
* {@inheritdoc}
4040
*/
41-
public function warmUp($cacheDir)
41+
public function warmUp(string $cacheDir)
4242
{
4343
if (null === $this->twig) {
4444
$this->twig = $this->container->get('twig');

src/Symfony/Bundle/TwigBundle/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function configure()
4242
;
4343
}
4444

45-
protected function findFiles($filename)
45+
protected function findFiles(string $filename)
4646
{
4747
if (0 === strpos($filename, '@')) {
4848
$dir = $this->getApplication()->getKernel()->locateResource($filename);

src/Symfony/Bundle/TwigBundle/Controller/PreviewErrorController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(HttpKernelInterface $kernel, $controller, ErrorRende
3737
$this->errorRenderer = $errorRenderer;
3838
}
3939

40-
public function previewErrorPageAction(Request $request, $code)
40+
public function previewErrorPageAction(Request $request, int $code)
4141
{
4242
$exception = FlattenException::createFromThrowable(new \Exception('Something has intentionally gone wrong.'), $code, ['X-Debug' => false]);
4343

src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private function getBundleTemplatePaths(ContainerBuilder $container, array $conf
170170
return $bundleHierarchy;
171171
}
172172

173-
private function normalizeBundleName($name)
173+
private function normalizeBundleName(string $name)
174174
{
175175
if ('Bundle' === substr($name, -6)) {
176176
$name = substr($name, 0, -6);

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"php": "^7.2.9",
2020
"symfony/config": "^4.4|^5.0",
2121
"symfony/error-renderer": "^4.4|^5.0",
22-
"symfony/twig-bridge": "^4.4|^5.0",
22+
"symfony/twig-bridge": "^5.0",
2323
"symfony/http-foundation": "^4.4|^5.0",
24-
"symfony/http-kernel": "^4.4|^5.0",
24+
"symfony/http-kernel": "^5.0",
2525
"symfony/polyfill-ctype": "~1.8",
2626
"twig/twig": "^2.10"
2727
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy