Skip to content

Commit ab677db

Browse files
wouterjnicolas-grekas
authored andcommitted
Add void return types
1 parent f51c317 commit ab677db

File tree

6 files changed

+37
-0
lines changed

6 files changed

+37
-0
lines changed

DelegatingEngine.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public function render(string|TemplateReferenceInterface $name, array $parameter
3838
return $this->getEngine($name)->render($name, $parameters);
3939
}
4040

41+
/**
42+
* @return void
43+
*/
4144
public function stream(string|TemplateReferenceInterface $name, array $parameters = [])
4245
{
4346
$engine = $this->getEngine($name);
@@ -53,6 +56,9 @@ public function exists(string|TemplateReferenceInterface $name): bool
5356
return $this->getEngine($name)->exists($name);
5457
}
5558

59+
/**
60+
* @return void
61+
*/
5662
public function addEngine(EngineInterface $engine)
5763
{
5864
$this->engines[] = $engine;

Helper/Helper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ abstract class Helper implements HelperInterface
2525

2626
/**
2727
* Sets the default charset.
28+
*
29+
* @return void
2830
*/
2931
public function setCharset(string $charset)
3032
{

Helper/SlotsHelper.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class SlotsHelper extends Helper
2828
* closed when the stop() method is called.
2929
*
3030
* @throws \InvalidArgumentException if a slot with the same name is already started
31+
*
32+
* @return void
3133
*/
3234
public function start(string $name)
3335
{
@@ -46,6 +48,8 @@ public function start(string $name)
4648
* Stops a slot.
4749
*
4850
* @throws \LogicException if no slot has been started
51+
*
52+
* @return void
4953
*/
5054
public function stop()
5155
{
@@ -76,6 +80,8 @@ public function get(string $name, bool|string $default = false): string
7680

7781
/**
7882
* Sets a slot value.
83+
*
84+
* @return void
7985
*/
8086
public function set(string $name, string $content)
8187
{

Loader/ChainLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public function __construct(array $loaders = [])
3333
}
3434
}
3535

36+
/**
37+
* @return void
38+
*/
3639
public function addLoader(LoaderInterface $loader)
3740
{
3841
$this->loaders[] = $loader;

Loader/Loader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ abstract class Loader implements LoaderInterface
2727

2828
/**
2929
* Sets the debug logger to use for this loader.
30+
*
31+
* @return void
3032
*/
3133
public function setLogger(LoggerInterface $logger)
3234
{

PhpEngine.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ public function offsetUnset(mixed $name): void
194194
* Adds some helpers.
195195
*
196196
* @param HelperInterface[] $helpers An array of helper
197+
*
198+
* @return void
197199
*/
198200
public function addHelpers(array $helpers)
199201
{
@@ -206,13 +208,18 @@ public function addHelpers(array $helpers)
206208
* Sets the helpers.
207209
*
208210
* @param HelperInterface[] $helpers An array of helper
211+
*
212+
* @return void
209213
*/
210214
public function setHelpers(array $helpers)
211215
{
212216
$this->helpers = [];
213217
$this->addHelpers($helpers);
214218
}
215219

220+
/**
221+
* @return void
222+
*/
216223
public function set(HelperInterface $helper, string $alias = null)
217224
{
218225
$this->helpers[$helper->getName()] = $helper;
@@ -247,6 +254,8 @@ public function get(string $name): HelperInterface
247254

248255
/**
249256
* Decorates the current template with another one.
257+
*
258+
* @return void
250259
*/
251260
public function extend(string $template)
252261
{
@@ -277,6 +286,8 @@ public function escape(mixed $value, string $context = 'html'): mixed
277286

278287
/**
279288
* Sets the charset to use.
289+
*
290+
* @return void
280291
*/
281292
public function setCharset(string $charset)
282293
{
@@ -300,6 +311,8 @@ public function getCharset(): string
300311

301312
/**
302313
* Adds an escaper for the given context.
314+
*
315+
* @return void
303316
*/
304317
public function setEscaper(string $context, callable $escaper)
305318
{
@@ -321,6 +334,9 @@ public function getEscaper(string $context): callable
321334
return $this->escapers[$context];
322335
}
323336

337+
/**
338+
* @return void
339+
*/
324340
public function addGlobal(string $name, mixed $value)
325341
{
326342
$this->globals[$name] = $value;
@@ -350,6 +366,8 @@ public function getGlobals(): array
350366
*
351367
* For each function there is a define to avoid problems with strings being
352368
* incorrectly specified.
369+
*
370+
* @return void
353371
*/
354372
protected function initializeEscapers()
355373
{

0 commit comments

Comments
 (0)