add parameter type declarations where possible
This commit is contained in:
parent
be50e2e177
commit
4dd3c549c8
@ -107,7 +107,7 @@ EOF
|
||||
return $filesInfo;
|
||||
}
|
||||
|
||||
protected function findFiles($filename)
|
||||
protected function findFiles(string $filename)
|
||||
{
|
||||
if (is_file($filename)) {
|
||||
return [$filename];
|
||||
|
@ -38,7 +38,7 @@ class TemplateCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInte
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function warmUp($cacheDir)
|
||||
public function warmUp(string $cacheDir)
|
||||
{
|
||||
if (null === $this->twig) {
|
||||
$this->twig = $this->container->get('twig');
|
||||
|
@ -42,7 +42,7 @@ EOF
|
||||
;
|
||||
}
|
||||
|
||||
protected function findFiles($filename)
|
||||
protected function findFiles(string $filename)
|
||||
{
|
||||
if (0 === strpos($filename, '@')) {
|
||||
$dir = $this->getApplication()->getKernel()->locateResource($filename);
|
||||
|
@ -37,7 +37,7 @@ class PreviewErrorController
|
||||
$this->errorRenderer = $errorRenderer;
|
||||
}
|
||||
|
||||
public function previewErrorPageAction(Request $request, $code)
|
||||
public function previewErrorPageAction(Request $request, int $code)
|
||||
{
|
||||
$exception = FlattenException::createFromThrowable(new \Exception('Something has intentionally gone wrong.'), $code, ['X-Debug' => false]);
|
||||
|
||||
|
@ -170,7 +170,7 @@ class TwigExtension extends Extension
|
||||
return $bundleHierarchy;
|
||||
}
|
||||
|
||||
private function normalizeBundleName($name)
|
||||
private function normalizeBundleName(string $name)
|
||||
{
|
||||
if ('Bundle' === substr($name, -6)) {
|
||||
$name = substr($name, 0, -6);
|
||||
|
@ -19,9 +19,9 @@
|
||||
"php": "^7.2.9",
|
||||
"symfony/config": "^4.4|^5.0",
|
||||
"symfony/error-renderer": "^4.4|^5.0",
|
||||
"symfony/twig-bridge": "^4.4|^5.0",
|
||||
"symfony/twig-bridge": "^5.0",
|
||||
"symfony/http-foundation": "^4.4|^5.0",
|
||||
"symfony/http-kernel": "^4.4|^5.0",
|
||||
"symfony/http-kernel": "^5.0",
|
||||
"symfony/polyfill-ctype": "~1.8",
|
||||
"twig/twig": "^2.10"
|
||||
},
|
||||
|
Reference in New Issue
Block a user