Compare commits

..
Author SHA1 Message Date
Barry vd. Heuvel 377c88f549 Revert "Revert "Check namespace + class to see if it exists""
This reverts commit 6eafab0ff3.
2022-10-31 16:23:59 +01:00
3 changed files with 13 additions and 8 deletions
+7 -6
View File
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage> <phpunit colors="true" strict="true" bootstrap="vendor/autoload.php">
<include>
<directory suffix=".php">./src/</directory>
</include>
</coverage>
<testsuites> <testsuites>
<testsuite name="phpDocumentor\Reflection\DocBlock"> <testsuite name="phpDocumentor\Reflection\DocBlock">
<directory>./tests/</directory> <directory>./tests/</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit> </phpunit>
@@ -109,7 +109,7 @@ class Description implements \Reflector
) )
\}/Sux', \}/Sux',
$this->contents, $this->contents,
-1, null,
PREG_SPLIT_DELIM_CAPTURE PREG_SPLIT_DELIM_CAPTURE
); );
@@ -210,7 +210,11 @@ class Collection extends \ArrayObject
if ('' !== $namespace) { if ('' !== $namespace) {
$namespace .= self::OPERATOR_NAMESPACE; $namespace .= self::OPERATOR_NAMESPACE;
} }
return self::OPERATOR_NAMESPACE . $namespace . $type; $with_name_space = self::OPERATOR_NAMESPACE . $namespace . $type;
if($this->shouldBeAbsolute($with_name_space)){
return $with_name_space;
}
return $type;
} }
if (strpos($type_parts[0], '::')) { if (strpos($type_parts[0], '::')) {