Skip to content

Commit

Permalink
Fix namespace of test and re-approach trimming because travis complains
Browse files Browse the repository at this point in the history
  • Loading branch information
mvriel committed Jun 12, 2015
1 parent 697c031 commit e99540d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/Types/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,17 @@ public function __construct($namespace, array $namespaceAliases = [])
: '';

foreach ($namespaceAliases as $alias => $fqnn) {
$this->namespaceAliases[$alias] = trim((string)$fqnn, '\\');
if ($fqnn[0] === '\\') {
$fqnn = substr($fqnn, 1);
}
if ($fqnn[count($fqnn)-1] === '\\') {
$fqnn = substr($fqnn, 0, -1);
}

$namespaceAliases[$alias] = $fqnn;
}

$this->namespaceAliases = $namespaceAliases;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Types/ContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @link http://phpdoc.org
*/

namespace phpDocumentor\Reflection\DocBlock;
namespace phpDocumentor\Reflection\Types;

use Mockery as m;

Expand Down

0 comments on commit e99540d

Please sign in to comment.