Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Fix displaying duplicate namespace #46

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- if node.name.namespaceNode %}{%- set fqn = '\\' ~ node.name.namespaceNode.name ~ '\\' ~ node.name.namespaceNode.name -%}{% endif -%}
{%- if node.name.namespaceNode %}{%- set fqn = '\\' ~ node.name.namespaceNode.name ~ '\\' ~ node.name.name -%}{% endif -%}
<dl class="php {{ node.type }}">
<dt class="sig sig-object php"
{%- if not node.noindex %} id="{{ node.id }}"{% endif -%}>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-abstract/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>abstract class</h1>
<dt class="sig sig-object php" id="typo3-cms-core-abstracttest">
<span class="sig-name modifier"><span class="pre">abstract</span></span> <em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">AbstractTest</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\AbstractTest" title="\TYPO3\CMS\Core\AbstractTest">AbstractTest</span>
</span> <a class="headerlink" href="#typo3-cms-core-abstracttest" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\AbstractTest</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-duplicate/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>final class</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<span class="sig-name modifier"><span class="pre">final</span></span> <em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-final-abstract/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>abstract final class causes warning</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<span class="sig-name modifier"><span class="pre">abstract</span></span> <span class="sig-name modifier"><span class="pre">final</span></span> <em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-final/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>final class</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<span class="sig-name modifier"><span class="pre">final</span></span> <em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/class-namespace-directive/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP Class with current namespace from directive</h1>
<dt class="sig sig-object php" id="typo3-cms-core-testclass">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">TestClass</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TestClass" title="\TYPO3\CMS\Core\TestClass">TestClass</span>
</span> <a class="headerlink" href="#typo3-cms-core-testclass" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\TestClass</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand All @@ -23,14 +23,14 @@ <h1>PHP Class with current namespace from directive</h1>
<dt class="sig sig-object php" id="typo3-cms-core-anotherclass">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">AnotherClass</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\AnotherClass" title="\TYPO3\CMS\Core\AnotherClass">AnotherClass</span>
</span> <a class="headerlink" href="#typo3-cms-core-anotherclass" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\AnotherClass</span> </dd>
</dl>

<p>Lorem Ipsum Dolor Another!</p>
Expand All @@ -41,14 +41,14 @@ <h1>PHP Class with current namespace from directive</h1>
<dt class="sig sig-object php" id="myvendor-some-namespace-anotherclass">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\MyVendor\Some\Namespace\MyVendor\Some\Namespace" title="\MyVendor\Some\Namespace\MyVendor\Some\Namespace">AnotherClass</span>
<span class="pre fqn" data-fqn="\MyVendor\Some\Namespace\AnotherClass" title="\MyVendor\Some\Namespace\AnotherClass">AnotherClass</span>
</span> <a class="headerlink" href="#myvendor-some-namespace-anotherclass" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\MyVendor\Some\Namespace\MyVendor\Some\Namespace</span> </dd>
<span class="pre">\MyVendor\Some\Namespace\AnotherClass</span> </dd>
</dl>

<p>Lorem Ipsum Dolor Yet Another!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-twice-noindex/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>class listed twice throws warning</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-twice-noindex/expected/page2.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ <h1>class listed twice throws warning</h1>
<dt class="sig sig-object php">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> </dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-twice-warning/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>class listed twice throws warning</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-twice-warning/expected/page2.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>class listed twice throws warning</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP class with constants</h1>
<dt class="sig sig-object php" id="chucklefactory-funclass">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\ChuckleFactory\ChuckleFactory" title="\ChuckleFactory\ChuckleFactory">FunClass</span>
<span class="pre fqn" data-fqn="\ChuckleFactory\FunClass" title="\ChuckleFactory\FunClass">FunClass</span>
</span> <a class="headerlink" href="#chucklefactory-funclass" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\ChuckleFactory\ChuckleFactory</span> </dd>
<span class="pre">\ChuckleFactory\FunClass</span> </dd>
</dl>

<p>Where Fun Knows No Bounds!</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP class with constants</h1>
<dt class="sig sig-object php" id="secretsociety-enigmaticclass">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\SecretSociety\SecretSociety" title="\SecretSociety\SecretSociety">EnigmaticClass</span>
<span class="pre fqn" data-fqn="\SecretSociety\EnigmaticClass" title="\SecretSociety\EnigmaticClass">EnigmaticClass</span>
</span> <a class="headerlink" href="#secretsociety-enigmaticclass" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\SecretSociety\SecretSociety</span> </dd>
<span class="pre">\SecretSociety\EnigmaticClass</span> </dd>
</dl>

<p>Unveiling the mysteries of constants!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-with-const-link/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP class with constants</h1>
<dt class="sig sig-object php" id="secretsociety-enigmaticclass">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\SecretSociety\SecretSociety" title="\SecretSociety\SecretSociety">EnigmaticClass</span>
<span class="pre fqn" data-fqn="\SecretSociety\EnigmaticClass" title="\SecretSociety\EnigmaticClass">EnigmaticClass</span>
</span> <a class="headerlink" href="#secretsociety-enigmaticclass" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\SecretSociety\SecretSociety</span> </dd>
<span class="pre">\SecretSociety\EnigmaticClass</span> </dd>
</dl>

<p>Unveiling the mysteries of constants!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-with-const/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP class with constants</h1>
<dt class="sig sig-object php" id="secretsociety-enigmaticclass">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\SecretSociety\SecretSociety" title="\SecretSociety\SecretSociety">EnigmaticClass</span>
<span class="pre fqn" data-fqn="\SecretSociety\EnigmaticClass" title="\SecretSociety\EnigmaticClass">EnigmaticClass</span>
</span> <a class="headerlink" href="#secretsociety-enigmaticclass" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\SecretSociety\SecretSociety</span> </dd>
<span class="pre">\SecretSociety\EnigmaticClass</span> </dd>
</dl>

<p>Unveiling the mysteries of constants!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-with-link/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP Class with explicit namespace</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP Class with explicit namespace</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/class-with-method-link/expected/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ <h1>PHP Class with explicit namespace</h1>
<dt class="sig sig-object php" id="typo3-cms-core-test">
<em class="property"><span class="pre">class</span> </em>
<span class="sig-name descname">
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\TYPO3\CMS\Core" title="\TYPO3\CMS\Core\TYPO3\CMS\Core">Test</span>
<span class="pre fqn" data-fqn="\TYPO3\CMS\Core\Test" title="\TYPO3\CMS\Core\Test">Test</span>
</span> <a class="headerlink" href="#typo3-cms-core-test" title="Permalink to this definition">¶</a>
</dt>
<dd>
<dl class="field-list simple">
<dt class="field-even">Fully qualified name</dt>
<dd class="field-even">
<span class="pre">\TYPO3\CMS\Core\TYPO3\CMS\Core</span> </dd>
<span class="pre">\TYPO3\CMS\Core\Test</span> </dd>
</dl>

<p>Lorem Ipsum Dolor!</p>
Expand Down
Loading
Loading