Skip to content

Commit 77f21ed

Browse files
committed
Added more parameter type declarations.
1 parent b64fdb7 commit 77f21ed

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private function sanitizeQueries(string $connectionName, array $queries)
126126
return $queries;
127127
}
128128

129-
private function sanitizeQuery(string $connectionName, $query)
129+
private function sanitizeQuery(string $connectionName, array $query): array
130130
{
131131
$query['explainable'] = true;
132132
if (null === $query['params']) {

src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function format(array $record)
133133
/**
134134
* @internal
135135
*/
136-
public function echoLine($line, $depth, $indentPad)
136+
public function echoLine(string $line, int $depth, string $indentPad)
137137
{
138138
if (-1 !== $depth) {
139139
fwrite($this->outputBuffer, $line);
@@ -143,7 +143,7 @@ public function echoLine($line, $depth, $indentPad)
143143
/**
144144
* @internal
145145
*/
146-
public function castObject($v, array $a, Stub $s, $isNested)
146+
public function castObject($v, array $a, Stub $s, bool $isNested)
147147
{
148148
if ($this->options['multiline']) {
149149
return $a;
@@ -180,7 +180,7 @@ private function replacePlaceHolder(array $record)
180180
return $record;
181181
}
182182

183-
private function dumpData($data, $colors = null)
183+
private function dumpData($data, bool $colors = null): string
184184
{
185185
if (null === $this->dumper) {
186186
return '';

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ protected function findFiles(string $filename)
118118
throw new RuntimeException(sprintf('File or directory "%s" is not readable', $filename));
119119
}
120120

121-
private function validate(string $template, $file)
121+
private function validate(string $template, string $file): array
122122
{
123123
$realLoader = $this->twig->getLoader();
124124
try {
125-
$temporaryLoader = new ArrayLoader([(string) $file => $template]);
125+
$temporaryLoader = new ArrayLoader([$file => $template]);
126126
$this->twig->setLoader($temporaryLoader);
127-
$nodeTree = $this->twig->parse($this->twig->tokenize(new Source($template, (string) $file)));
127+
$nodeTree = $this->twig->parse($this->twig->tokenize(new Source($template, $file)));
128128
$this->twig->compile($nodeTree);
129129
$this->twig->setLoader($realLoader);
130130
} catch (Error $e) {

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