8000 Add CI check ensuring interfaces have return types · symfony/templating@27d7947 · GitHub
[go: up one dir, main page]

Skip to c 8000 ontent

Commit 27d7947

Browse files
wouterjfabpot
authored andcommitted
Add CI check ensuring interfaces have return types
1 parent 9ac0bdf commit 27d7947

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Helper/HelperInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public function getName();
2727

2828
/**
2929
* Sets the default charset.
30+
*
31+
* @return void
3032
*/
3133
public function setCharset(string $charset);
3234

StreamingEngineInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ interface StreamingEngineInterface
2525
*
2626
* @throws \RuntimeException if the template cannot be rendered
2727
* @throws \LogicException if the template cannot be streamed
28+
*
29+
* @return void
2830
*/
2931
public function stream(string|TemplateReferenceInterface $name, array $parameters = []);
3032
}

Tests/DelegatingEngineTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,10 @@ public function testStreamDelegatesToSupportedEngine()
5050
$streamingEngine = $this->getStreamingEngineMock('template.php', true);
5151
$streamingEngine->expects($this->once())
5252
->method('stream')
53-
->with('template.php', ['foo' => 'bar'])
54-
->willReturn('<html />');
53+
->with('template.php', ['foo' => 'bar']);
5554

5655
$delegatingEngine = new DelegatingEngine([$streamingEngine]);
57-
$result = $delegatingEngine->stream('template.php', ['foo' => 'bar']);
58-
59-
$this->assertNull($result);
56+
$delegatingEngine->stream('template.php', ['foo' => 'bar']);
6057
}
6158

6259
public function testStreamRequiresStreamingEngine()

0 commit comments

Comments
 (0)
0