Skip to content

Commit

Permalink
Merge pull request #397 from daniel-sc/fix-self
Browse files Browse the repository at this point in the history
fix error with "self" references in top level ns
  • Loading branch information
lisachenko committed Jun 8, 2018
2 parents 152abbf + 94a7e0a commit 0b066ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Instrument/Transformer/SelfValueVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected function resolveClassName(Name $name)
$name->setAttribute('originalName', $originalName);

$fullClassName = Name::concat($this->namespace, $this->className);
$resolvedSelfName = new FullyQualified('\\' . $fullClassName->toString(), $name->getAttributes());
$resolvedSelfName = new FullyQualified('\\' . ltrim($fullClassName->toString(), '\\'), $name->getAttributes());

$this->replacedNodes[] = $resolvedSelfName;

Expand Down

0 comments on commit 0b066ad

Please sign in to comment.