Skip to content

Commit 2b69852

Browse files
committed
Removed BracketExpression from Nodes
1 parent 4825926 commit 2b69852

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

src/expression/BracketExpression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function toString(PrettyPrintOptions $prettyPrintOptions): string {
3232
}
3333

3434
public function buildNode(Scope $scope): Node {
35-
return new Node('BracketExpression', [$this->expression->buildNode($scope)]);
35+
return $this->expression->buildNode($scope);
3636
}
3737

3838
public function getExpression(): Expression {

src/type/DateTimeImmutableType.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ public function equals(Type $type): bool {
2020
return $type instanceof DateTimeImmutableType;
2121
}
2222

23-
// public function getImplementedOperators(): array {
24-
// return [
25-
// new ImplementableOperator(ImplementableOperator::TYPE_ADDITION),
26-
// new ImplementableOperator(ImplementableOperator::TYPE_SUBTRACTION),
27-
// new ImplementableOperator(ImplementableOperator::TYPE_TYPE_CAST)
28-
// ];
29-
// }
30-
3123
protected function getTypeCompatibleOperands(ImplementableOperator $operator): array {
3224
switch ($operator->getID()) {
3325
case ImplementableOperator::TYPE_ADDITION:

test/expression/BracketExpressionTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ public function testOK(): void {
4545
* Node
4646
*/
4747
$node = $expression->buildNode(new Scope());
48-
$this->assertEquals('BracketExpression', $node->nodeType);
49-
$this->assertCount(1, $node->connected);
50-
$this->assertEquals($constantNode, $node->connected[0]);
51-
$this->assertEquals([], $node->info);
48+
$this->assertEquals('ConstantExpression', $node->nodeType);
5249
}
5350
}

0 commit comments

Comments
 (0)