Skip to content

Commit 24ced7d

Browse files
committed
Coding standards.
1 parent c149f81 commit 24ced7d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

visitor.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
private $docBlockFactory;
2121

2222
/**
23-
* @var array<string,array<int|string,string>>
23+
* @var ?array<string,array<int|string,string>>
2424
*/
25-
private $functionMap;
25+
private $functionMap = null;
2626

2727
/**
2828
* @var string
@@ -54,11 +54,13 @@ public function enterNode(Node $node)
5454
/** @var \PhpParser\Node\Stmt\Class_ $parent */
5555
$parent = $this->stack[count($this->stack) - 2];
5656

57-
$this->currentSymbolName = sprintf(
58-
'%1$s::%2$s',
59-
$parent->name->name,
60-
$node->name->name
61-
);
57+
if (isset($parent->name)) {
58+
$this->currentSymbolName = sprintf(
59+
'%1$s::%2$s',
60+
$parent->name->name,
61+
$node->name->name
62+
);
63+
}
6264
}
6365

6466
$newDocComment = $this->addArrayHashNotation($docComment);

0 commit comments

Comments
 (0)