Skip to content

Commit e944c59

Browse files
Allow Twig 3
1 parent 248345c commit e944c59

File tree

11 files changed

+35
-2
lines changed

11 files changed

+35
-2
lines changed

Extension/ProfilerExtension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public function __construct(Profile $profile, Stopwatch $stopwatch = null)
3333
$this->events = new \SplObjectStorage();
3434
}
3535

36+
/**
37+
* @return void
38+
*/
3639
public function enter(Profile $profile)
3740
{
3841
if ($this->stopwatch && $profile->isTemplate()) {
@@ -42,6 +45,9 @@ public function enter(Profile $profile)
4245
parent::enter($profile);
4346
}
4447

48+
/**
49+
* @return void
50+
*/
4551
public function leave(Profile $profile)
4652
{
4753
parent::leave($profile);

Node/DumpNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct($varPrefix, Node $values = null, int $lineno, string
3535
}
3636

3737
/**
38-
* {@inheritdoc}
38+
* @return void
3939
*/
4040
public function compile(Compiler $compiler)
4141
{

Node/FormThemeNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function __construct(Node $form, Node $resources, int $lineno, string $ta
2727
parent::__construct(['form' => $form, 'resources' => $resources], ['only' => $only], $lineno, $tag);
2828
}
2929

30+
/**
31+
* @return void
32+
*/
3033
public function compile(Compiler $compiler)
3134
{
3235
$compiler

Node/RenderBlockNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
*/
2727
class RenderBlockNode extends FunctionExpression
2828
{
29+
/**
30+
* @return void
31+
*/
2932
public function compile(Compiler $compiler)
3033
{
3134
$compiler->addDebugInfo($this);

Node/SearchAndRenderBlockNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
*/
2424
class SearchAndRenderBlockNode extends FunctionExpression
2525
{
26+
/**
27+
* @return void
28+
*/
2629
public function compile(Compiler $compiler)
2730
{
2831
$compiler->addDebugInfo($this);

Node/StopwatchNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public function __construct(Node $name, Node $body, AssignNameExpression $var, i
2929
parent::__construct(['body' => $body, 'name' => $name, 'var' => $var], [], $lineno, $tag);
3030
}
3131

32+
/**
33+
* @return void
34+
*/
3235
public function compile(Compiler $compiler)
3336
{
3437
$compiler

Node/TransDefaultDomainNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function __construct(AbstractExpression $expr, int $lineno = 0, string $t
2727
parent::__construct(['expr' => $expr], [], $lineno, $tag);
2828
}
2929

30+
/**
31+
* @return void
32+
*/
3033
public function compile(Compiler $compiler)
3134
{
3235
// noop as this node is just a marker for TranslationDefaultDomainNodeVisitor

Node/TransNode.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public function __construct(Node $body, Node $domain = null, AbstractExpression
4848
parent::__construct($nodes, [], $lineno, $tag);
4949
}
5050

51+
/**
52+
* @return void
53+
*/
5154
public function compile(Compiler $compiler)
5255
{
5356
$compiler->addDebugInfo($this);

NodeVisitor/TranslationNodeVisitor.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ class TranslationNodeVisitor extends AbstractNodeVisitor
3232
private $enabled = false;
3333
private $messages = [];
3434

35+
/**
36+
* @return void
37+
*/
3538
public function enable()
3639
{
3740
$this->enabled = true;
3841
$this->messages = [];
3942
}
4043

44+
/**
45+
* @return void
46+
*/
4147
public function disable()
4248
{
4349
$this->enabled = false;

Tests/Extension/Fixtures/StubFilesystemLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
class StubFilesystemLoader extends FilesystemLoader
1717
{
18+
/**
19+
* @return string|null
20+
*/
1821
protected function findTemplate($name, $throw = true)
1922
{
2023
// strip away bundle name

0 commit comments

Comments
 (0)