Skip to content

Commit 6d560c4

Browse files
committed
Add missing return types
1 parent 7b0ac58 commit 6d560c4

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

Compiler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public function __construct(array $functions)
2828
$this->functions = $functions;
2929
}
3030

31+
/**
32+
* @return array
33+
*/
3134
public function getFunction(string $name)
3235
{
3336
return $this->functions[$name];

Node/Node.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ public function evaluate(array $functions, array $values)
8080
return $results;
8181
}
8282

83+
/**
84+
* @return array
85+
*
86+
* @throws \BadMethodCallException when this node cannot be transformed to an array
87+
*/
8388
public function toArray()
8489
{
8590
throw new \BadMethodCallException(sprintf('Dumping a "%s" instance is not supported yet.', static::class));

Parser.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ private function doParse(TokenStream $stream, ?array $names = []): Node\Node
130130
return $node;
131131
}
132132

133+
/**
134+
* @return Node\Node
135+
*/
133136
public function parseExpression(int $precedence = 0)
134137
{
135138
$expr = $this->getPrimary();
@@ -151,6 +154,9 @@ public function parseExpression(int $precedence = 0)
151154
return $expr;
152155
}
153156

157+
/**
158+
* @return Node\Node
159+
*/
154160
protected function getPrimary()
155161
{
156162
$token = $this->stream->current;

SerializedParsedExpression.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\ExpressionLanguage;
1313

14+
use Symfony\Component\ExpressionLanguage\Node\Node;
15+
1416
/**
1517
* Represents an already parsed expression.
1618
*
@@ -30,6 +32,9 @@ public function __construct(string $expression, string $nodes)
3032
$this->nodes = $nodes;
3133
}
3234

35+
/**
36+
* @return Node
37+
*/
3338
public function getNodes()
3439
{
3540
return unserialize($this->nodes);

0 commit comments

Comments
 (0)