Skip to content

Commit 8b90404

Browse files
wouterjnicolas-grekas
authored andcommitted
Add void return types
1 parent 7be54bb commit 8b90404

File tree

7 files changed

+39
-7
lines changed

7 files changed

+39
-7
lines changed

AppVariable.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,33 @@ class AppVariable
3030
private string $environment;
3131
private bool $debug;
3232

33+
/**
34+
* @return void
35+
*/
3336
public function setTokenStorage(TokenStorageInterface $tokenStorage)
3437
{
3538
$this->tokenStorage = $tokenStorage;
3639
}
3740

41+
/**
42+
* @return void
43+
*/
3844
public function setRequestStack(RequestStack $requestStack)
3945
{
4046
$this->requestStack = $requestStack;
4147
}
4248

49+
/**
50+
* @return void
51+
*/
4352
public function setEnvironment(string $environment)
4453
{
4554
$this->environment = $environment;
4655
}
4756

57+
/**
58+
* @return void
59+
*/
4860
public function setDebug(bool $debug)
4961
{
5062
$this->debug = $debug;

Command/DebugCommand.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ public function __construct(Environment $twig, string $projectDir = null, array
5959
$this->fileLinkFormatter = $fileLinkFormatter;
6060
}
6161

62+
/**
63+
* @return void
64+
*/
6265
protected function configure()
6366
{
6467
$this
@@ -121,7 +124,7 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti
121124
}
122125
}
123126

124-
private function displayPathsText(SymfonyStyle $io, string $name)
127+
private function displayPathsText(SymfonyStyle $io, string $name): void
125128
{
126129
$file = new \ArrayIterator($this->findTemplateFiles($name));
127130
$paths = $this->getLoaderPaths($name);
@@ -196,7 +199,7 @@ private function displayPathsText(SymfonyStyle $io, string $name)
196199
}
197200
}
198201

199-
private function displayPathsJson(SymfonyStyle $io, string $name)
202+
private function displayPathsJson(SymfonyStyle $io, string $name): void
200203
{
201204
$files = $this->findTemplateFiles($name);
202205
$paths = $this->getLoaderPaths($name);
@@ -214,7 +217,7 @@ private function displayPathsJson(SymfonyStyle $io, string $name)
214217
$io->writeln(json_encode($data));
215218
}
216219

217-
private function displayGeneralText(SymfonyStyle $io, string $filter = null)
220+
private function displayGeneralText(SymfonyStyle $io, string $filter = null): void
218221
{
219222
$decorated = $io->isDecorated();
220223
$types = ['functions', 'filters', 'tests', 'globals'];
@@ -248,7 +251,7 @@ private function displayGeneralText(SymfonyStyle $io, string $filter = null)
248251
}
249252
}
250253

251-
private function displayGeneralJson(SymfonyStyle $io, ?string $filter)
254+
private function displayGeneralJson(SymfonyStyle $io, ?string $filter): void
252255
{
253256
$decorated = $io->isDecorated();
254257
$types = ['functions', 'filters', 'tests', 'globals'];

Command/LintCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public function __construct(
4848
parent::__construct();
4949
}
5050

51+
/**
52+
* @return void
53+
*/
5154
protected function configure()
5255
{
5356
$this

DataCollector/TwigDataCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ public function __construct(Profile $profile, Environment $twig = null)
3838
$this->twig = $twig;
3939
}
4040

41-
public function collect(Request $request, Response $response, \Throwable $exception = null)
41+
public function collect(Request $request, Response $response, \Throwable $exception = null): void
4242
{
4343
}
4444

45-
public function reset()
45+
public function reset(): void
4646
{
4747
$this->profile->reset();
4848
unset($this->computed);
4949
$this->data = [];
5050
}
5151

52-
public function lateCollect()
52+
public function lateCollect(): void
5353
{
5454
$this->data['profile'] = serialize($this->profile);
5555
$this->data['template_paths'] = [];

EventListener/TemplateAttributeListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public function __construct(
2828
) {
2929
}
3030

31+
/**
32+
* @return void
33+
*/
3134
public function onKernelView(ViewEvent $event)
3235
{
3336
$parameters = $event->getControllerResult();

Form/TwigRendererEngine.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ protected function loadResourceForBlockName(string $cacheKey, FormView $view, st
132132
* to initialize the theme first. Any changes made to
133133
* this variable will be kept and be available upon
134134
* further calls to this method using the same theme.
135+
*
136+
* @return void
135137
*/
136138
protected function loadResourcesFromTheme(string $cacheKey, mixed &$theme)
137139
{

Translation/TwigExtractor.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public function __construct(Environment $twig)
4545
$this->twig = $twig;
4646
}
4747

48+
/**
49+
* @return void
50+
*/
4851
public function extract($resource, MessageCatalogue $catalogue)
4952
{
5053
foreach ($this->extractFiles($resource) as $file) {
@@ -56,11 +59,17 @@ public function extract($resource, MessageCatalogue $catalogue)
5659
}
5760
}
5861

62+
/**
63+
* @return void
64+
*/
5965
public function setPrefix(string $prefix)
6066
{
6167
$this->prefix = $prefix;
6268
}
6369

70+
/**
71+
* @return void
72+
*/
6473
protected function extractTemplate(string $template, MessageCatalogue $catalogue)
6574
{
6675
$visitor = $this->twig->getExtension(TranslationExtension::class)->getTranslationNodeVisitor();

0 commit comments

Comments
 (0)