Skip to content

Commit fe9fab9

Browse files
authored
Fixed broken build (#98)
1 parent 1de6a4d commit fe9fab9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Visitor/Php/SourceLocationContainerVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function enterNode(Node $node)
5151

5252
if ($node instanceof Node\Stmt\UseUse) {
5353
$key = isset($node->alias) ? $node->alias : $node->name->parts[count($node->name->parts) - 1];
54-
$this->useStatements[$key] = implode('\\', $node->name->parts);
54+
$this->useStatements[(string) $key] = implode('\\', $node->name->parts);
5555

5656
return;
5757
}

src/Visitor/Php/Symfony/AbstractFormType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ abstract class AbstractFormType extends BasePHPVisitor implements NodeVisitor
3434
public function enterNode(Node $node)
3535
{
3636
if ($node instanceof Node\Expr\MethodCall) {
37-
if (!is_string($node->name)) {
37+
if (!is_string($node->name) && !$node->name instanceof Node\Identifier) {
3838
return;
3939
}
4040

41-
$name = strtolower($node->name);
41+
$name = strtolower((string) $node->name);
4242
if ('setdefaults' === $name || 'replacedefaults' === $name || 'setdefault' === $name) {
4343
$this->parseDefaultsCall($node);
4444

0 commit comments

Comments
 (0)