Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Make the code easier.
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Jun 25, 2016
1 parent 0a80dd0 commit 77d26f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Generator/ClassGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1021,9 +1021,9 @@ private function generateShortOrCompleteClassname($fqnClassName)
$parts = explode('\\', $fqnClassName);
$className = array_pop($parts);
$classNamespace = implode('\\', $parts);
$currentNamespace = $this->getNamespaceName();
$currentNamespace = (string) $this->getNamespaceName();

if (!$currentNamespace || $classNamespace === $currentNamespace || in_array($fqnClassName, $this->getUses())) {
if ($classNamespace === $currentNamespace || in_array($fqnClassName, $this->getUses())) {
return $className;
}

Expand Down

0 comments on commit 77d26f3

Please sign in to comment.