From 46f1af82217e7a3b17b6379cf80793a1df6464d0 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 15 May 2024 09:38:09 +0200 Subject: [PATCH 1/4] [BUGFIX] Remove duplicate colon after "Returns" --- resources/template/html/body/directive/php/method.html.twig | 2 +- .../template/html/body/directive/php/methodName.html.twig | 6 +++++- .../method-returns-fieldlist/expected/index.html | 2 +- tests/integration/method-returns/expected/index.html | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/template/html/body/directive/php/method.html.twig b/resources/template/html/body/directive/php/method.html.twig index 0b45261..1001d90 100644 --- a/resources/template/html/body/directive/php/method.html.twig +++ b/resources/template/html/body/directive/php/method.html.twig @@ -10,7 +10,7 @@ {{ renderNode(node.value) }} {% if node.returnsDescription %}
-
Returns:
+
Returns
{{ renderNode(node.returnsDescription) }}
diff --git a/resources/template/html/body/directive/php/methodName.html.twig b/resources/template/html/body/directive/php/methodName.html.twig index e7c1471..94be072 100644 --- a/resources/template/html/body/directive/php/methodName.html.twig +++ b/resources/template/html/body/directive/php/methodName.html.twig @@ -1,5 +1,9 @@ -{{ node.name }} + + {%- for modifier in node.modifiers -%} + {{- renderNode(modifier) }}{{ ' ' -}} + {%- endfor -%} + {{ node.name }} ( {% for param in node.params -%} {{ param }} diff --git a/tests/integration/method-returns-fieldlist/expected/index.html b/tests/integration/method-returns-fieldlist/expected/index.html index 322fcc1..1b180c7 100644 --- a/tests/integration/method-returns-fieldlist/expected/index.html +++ b/tests/integration/method-returns-fieldlist/expected/index.html @@ -13,7 +13,7 @@

PHP methods with return value

Get the date.

-
Returns:
+
Returns

Either false on failure, or the datetime object for method chaining.

diff --git a/tests/integration/method-returns/expected/index.html b/tests/integration/method-returns/expected/index.html index a4becfb..32b418f 100644 --- a/tests/integration/method-returns/expected/index.html +++ b/tests/integration/method-returns/expected/index.html @@ -13,7 +13,7 @@

PHP methods with return value

Lorem Ipsum

-
Returns:
+
Returns
Something not specified...
From 7097a0134aa63a5ddfa47aec9166530230be0de4 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 15 May 2024 10:09:03 +0200 Subject: [PATCH 2/4] [TASK] Extract display of vendor from component name --- .../body/directive/php/component.html.twig | 11 ++++++ .../php/fullyQualifiedName.html.twig | 11 +++--- .../php/partials/codeStyle.html.twig | 1 + .../class-abstract/expected/index.html | 12 +++++-- .../class-duplicate/expected/index.html | 12 +++++-- .../class-final-abstract/expected/index.html | 12 +++++-- .../class-final/expected/index.html | 12 +++++-- .../expected/index.html | 36 +++++++++++++++---- .../class-twice-noindex/expected/index.html | 12 +++++-- .../class-twice-noindex/expected/page2.html | 12 +++++-- .../class-twice-warning/expected/index.html | 12 +++++-- .../class-twice-warning/expected/page2.html | 12 +++++-- .../expected/index.html | 12 +++++-- .../expected/index.html | 12 +++++-- .../class-with-const-link/expected/index.html | 12 +++++-- .../class-with-const/expected/index.html | 12 +++++-- .../class-with-link/expected/index.html | 12 +++++-- .../expected/index.html | 18 ++++++++-- .../expected/index.html | 12 +++++-- .../class-with-method/expected/index.html | 12 +++++-- .../expected/index.html | 6 +++- .../expected/index.html | 6 +++- .../class-with-property/expected/index.html | 6 +++- .../expected/index.html | 12 +++++-- .../expected/index.html | 12 +++++-- .../expected/index.html | 6 +++- .../expected/index.html | 6 +++- .../expected/index.html | 24 ++++++++++--- .../enum-with-cases-link/expected/index.html | 6 +++- .../enum-with-cases/expected/index.html | 6 +++- .../enum-with-constant/expected/index.html | 12 +++++-- .../enum-with-link/expected/index.html | 24 ++++++++++--- .../enum-with-namespace/expected/index.html | 24 ++++++++++--- .../enum-with-warnings/expected/index.html | 12 +++++-- .../expected/index.html | 12 +++++-- .../exception-directive/expected/index.html | 12 +++++-- .../expected/index.html | 12 +++++-- .../exception-with-link/expected/index.html | 12 +++++-- .../expected/index.html | 12 +++++-- .../interface-link/expected/index.html | 12 +++++-- .../expected/index.html | 24 ++++++++++--- .../interface-with-const/expected/index.html | 12 +++++-- .../interface-with-method/expected/index.html | 12 +++++-- .../expected/index.html | 6 +++- .../trait-directive/expected/index.html | 12 +++++-- .../trait-with-link/expected/index.html | 12 +++++-- 46 files changed, 474 insertions(+), 95 deletions(-) create mode 100644 resources/template/html/body/directive/php/partials/codeStyle.html.twig diff --git a/resources/template/html/body/directive/php/component.html.twig b/resources/template/html/body/directive/php/component.html.twig index fe9f310..c9e3ace 100644 --- a/resources/template/html/body/directive/php/component.html.twig +++ b/resources/template/html/body/directive/php/component.html.twig @@ -9,6 +9,17 @@ {% include "body/directive/php/partials/linkToSnippet.html.twig" %}
+ {% if node.name.namespaceNode %} +
+ {% if node.name.namespaceNode %} +
Fully qualified name
+
+ {% set fqn = '\\' ~ node.name.namespaceNode.name ~ '\\' ~ node.name.namespaceNode.name %} + {% include "body/directive/php/partials/codeStyle.html.twig" with {'code': fqn} %} +
+ {% endif -%} +
+ {% endif -%} {{ renderNode(node.value) }}
diff --git a/resources/template/html/body/directive/php/fullyQualifiedName.html.twig b/resources/template/html/body/directive/php/fullyQualifiedName.html.twig index 20daa18..a42277c 100644 --- a/resources/template/html/body/directive/php/fullyQualifiedName.html.twig +++ b/resources/template/html/body/directive/php/fullyQualifiedName.html.twig @@ -1,4 +1,7 @@ -{% if node.namespaceNode != null %} - \{{ node.namespaceNode.name }}\ -{% endif %} -{{ node.name }} + + + {{ node.name }} + + diff --git a/resources/template/html/body/directive/php/partials/codeStyle.html.twig b/resources/template/html/body/directive/php/partials/codeStyle.html.twig new file mode 100644 index 0000000..7341575 --- /dev/null +++ b/resources/template/html/body/directive/php/partials/codeStyle.html.twig @@ -0,0 +1 @@ +{{ code|raw }} diff --git a/tests/integration/class-abstract/expected/index.html b/tests/integration/class-abstract/expected/index.html index 599224b..41e387d 100644 --- a/tests/integration/class-abstract/expected/index.html +++ b/tests/integration/class-abstract/expected/index.html @@ -4,10 +4,18 @@

abstract class

abstract class - \TYPO3\CMS\Core\ -AbstractTest + + + AbstractTest + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-duplicate/expected/index.html b/tests/integration/class-duplicate/expected/index.html index 646d22b..4ff3d7a 100644 --- a/tests/integration/class-duplicate/expected/index.html +++ b/tests/integration/class-duplicate/expected/index.html @@ -4,10 +4,18 @@

final class

final class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-final-abstract/expected/index.html b/tests/integration/class-final-abstract/expected/index.html index a9ddaf4..e429c80 100644 --- a/tests/integration/class-final-abstract/expected/index.html +++ b/tests/integration/class-final-abstract/expected/index.html @@ -4,10 +4,18 @@

abstract final class causes warning

abstract final class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-final/expected/index.html b/tests/integration/class-final/expected/index.html index 646d22b..4ff3d7a 100644 --- a/tests/integration/class-final/expected/index.html +++ b/tests/integration/class-final/expected/index.html @@ -4,10 +4,18 @@

final class

final class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-namespace-directive/expected/index.html b/tests/integration/class-namespace-directive/expected/index.html index 5dfae5d..349b3f5 100644 --- a/tests/integration/class-namespace-directive/expected/index.html +++ b/tests/integration/class-namespace-directive/expected/index.html @@ -4,10 +4,18 @@

PHP Class with current namespace from directive

class - \TYPO3\CMS\Core\ -TestClass + + + TestClass + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

@@ -16,10 +24,18 @@

PHP Class with current namespace from directive

class - \TYPO3\CMS\Core\ -AnotherClass + + + AnotherClass + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor Another!

@@ -28,10 +44,18 @@

PHP Class with current namespace from directive

class - \MyVendor\Some\Namespace\ -AnotherClass + + + AnotherClass + +
+
+
Fully qualified name
+
+ \MyVendor\Some\Namespace\MyVendor\Some\Namespace
+

Lorem Ipsum Dolor Yet Another!

diff --git a/tests/integration/class-twice-noindex/expected/index.html b/tests/integration/class-twice-noindex/expected/index.html index 2b2b7dd..1a57479 100644 --- a/tests/integration/class-twice-noindex/expected/index.html +++ b/tests/integration/class-twice-noindex/expected/index.html @@ -4,10 +4,18 @@

class listed twice throws warning

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-twice-noindex/expected/page2.html b/tests/integration/class-twice-noindex/expected/page2.html index af5164c..cae4a38 100644 --- a/tests/integration/class-twice-noindex/expected/page2.html +++ b/tests/integration/class-twice-noindex/expected/page2.html @@ -4,9 +4,17 @@

class listed twice throws warning

class - \TYPO3\CMS\Core\ -Test
+ + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-twice-warning/expected/index.html b/tests/integration/class-twice-warning/expected/index.html index 2b2b7dd..1a57479 100644 --- a/tests/integration/class-twice-warning/expected/index.html +++ b/tests/integration/class-twice-warning/expected/index.html @@ -4,10 +4,18 @@

class listed twice throws warning

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-twice-warning/expected/page2.html b/tests/integration/class-twice-warning/expected/page2.html index 784ef96..b73b3f5 100644 --- a/tests/integration/class-twice-warning/expected/page2.html +++ b/tests/integration/class-twice-warning/expected/page2.html @@ -4,10 +4,18 @@

class listed twice throws warning

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html b/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html index 103ba48..5c7d8f7 100644 --- a/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html +++ b/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html @@ -4,10 +4,18 @@

PHP class with constants

class - \ChuckleFactory\ -FunClass + + + FunClass + +
+
+
Fully qualified name
+
+ \ChuckleFactory\ChuckleFactory
+

Where Fun Knows No Bounds!

diff --git a/tests/integration/class-with-const-link-warning/expected/index.html b/tests/integration/class-with-const-link-warning/expected/index.html index cbb3ed7..516e0f4 100644 --- a/tests/integration/class-with-const-link-warning/expected/index.html +++ b/tests/integration/class-with-const-link-warning/expected/index.html @@ -4,10 +4,18 @@

PHP class with constants

class - \SecretSociety\ -EnigmaticClass + + + EnigmaticClass + +
+
+
Fully qualified name
+
+ \SecretSociety\SecretSociety
+

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-with-const-link/expected/index.html b/tests/integration/class-with-const-link/expected/index.html index 4208f24..977607b 100644 --- a/tests/integration/class-with-const-link/expected/index.html +++ b/tests/integration/class-with-const-link/expected/index.html @@ -4,10 +4,18 @@

PHP class with constants

class - \SecretSociety\ -EnigmaticClass + + + EnigmaticClass + +
+
+
Fully qualified name
+
+ \SecretSociety\SecretSociety
+

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-with-const/expected/index.html b/tests/integration/class-with-const/expected/index.html index 9d7395a..10368a8 100644 --- a/tests/integration/class-with-const/expected/index.html +++ b/tests/integration/class-with-const/expected/index.html @@ -4,10 +4,18 @@

PHP class with constants

class - \SecretSociety\ -EnigmaticClass + + + EnigmaticClass + +
+
+
Fully qualified name
+
+ \SecretSociety\SecretSociety
+

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-with-link/expected/index.html b/tests/integration/class-with-link/expected/index.html index 5503593..369683f 100644 --- a/tests/integration/class-with-link/expected/index.html +++ b/tests/integration/class-with-link/expected/index.html @@ -4,10 +4,18 @@

PHP Class with explicit namespace

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-with-method-link-warning/expected/index.html b/tests/integration/class-with-method-link-warning/expected/index.html index 81d24e9..21c09bd 100644 --- a/tests/integration/class-with-method-link-warning/expected/index.html +++ b/tests/integration/class-with-method-link-warning/expected/index.html @@ -4,10 +4,18 @@

PHP Class with explicit namespace

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

@@ -38,7 +46,11 @@

PHP Class with explicit namespace

class - IllegalSubClass + + + IllegalSubClass + +
diff --git a/tests/integration/class-with-method-link/expected/index.html b/tests/integration/class-with-method-link/expected/index.html index a74c7e0..a4ebf39 100644 --- a/tests/integration/class-with-method-link/expected/index.html +++ b/tests/integration/class-with-method-link/expected/index.html @@ -4,10 +4,18 @@

PHP Class with explicit namespace

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-with-method/expected/index.html b/tests/integration/class-with-method/expected/index.html index b4712d4..c5e075d 100644 --- a/tests/integration/class-with-method/expected/index.html +++ b/tests/integration/class-with-method/expected/index.html @@ -4,10 +4,18 @@

PHP Class with explicit namespace

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-with-property-link/expected/index.html b/tests/integration/class-with-property-link/expected/index.html index 8a3aecd..c7a14b4 100644 --- a/tests/integration/class-with-property-link/expected/index.html +++ b/tests/integration/class-with-property-link/expected/index.html @@ -4,7 +4,11 @@

PHP class with properties

class - JollyElf + + + JollyElf + +
diff --git a/tests/integration/class-with-property-warnings/expected/index.html b/tests/integration/class-with-property-warnings/expected/index.html index 0fc2cee..791151e 100644 --- a/tests/integration/class-with-property-warnings/expected/index.html +++ b/tests/integration/class-with-property-warnings/expected/index.html @@ -4,7 +4,11 @@

PHP class with properties that cause warnings

class - GrumpyGoblin + + + GrumpyGoblin + +
diff --git a/tests/integration/class-with-property/expected/index.html b/tests/integration/class-with-property/expected/index.html index 2322e52..b3c7695 100644 --- a/tests/integration/class-with-property/expected/index.html +++ b/tests/integration/class-with-property/expected/index.html @@ -4,7 +4,11 @@

PHP class with properties

class - JollyElf + + + JollyElf + +
diff --git a/tests/integration/class-with-staticmethod/expected/index.html b/tests/integration/class-with-staticmethod/expected/index.html index 784b250..f8d4d60 100644 --- a/tests/integration/class-with-staticmethod/expected/index.html +++ b/tests/integration/class-with-staticmethod/expected/index.html @@ -4,10 +4,18 @@

PHP Class with static method

class - \TYPO3\CMS\Core\ -Test + + + Test + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-with-typed-const/expected/index.html b/tests/integration/class-with-typed-const/expected/index.html index ba1cc39..3995d7a 100644 --- a/tests/integration/class-with-typed-const/expected/index.html +++ b/tests/integration/class-with-typed-const/expected/index.html @@ -4,10 +4,18 @@

PHP class with constants

class - \SecretSociety\ -EnigmaticClass + + + EnigmaticClass + +
+
+
Fully qualified name
+
+ \SecretSociety\SecretSociety
+

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-without-namespace/expected/index.html b/tests/integration/class-without-namespace/expected/index.html index 9a93645..a51747c 100644 --- a/tests/integration/class-without-namespace/expected/index.html +++ b/tests/integration/class-without-namespace/expected/index.html @@ -4,7 +4,11 @@

PHP Class

class - TestClass + + + TestClass + +
diff --git a/tests/integration/enum-backed-with-cases/expected/index.html b/tests/integration/enum-backed-with-cases/expected/index.html index f12c70f..60996f1 100644 --- a/tests/integration/enum-backed-with-cases/expected/index.html +++ b/tests/integration/enum-backed-with-cases/expected/index.html @@ -4,7 +4,11 @@

PHP Enum, backed, with cases

enum - RedSuit : string + + + RedSuit + + : string
diff --git a/tests/integration/enum-namespace-directive/expected/index.html b/tests/integration/enum-namespace-directive/expected/index.html index 070628a..e5b91af 100644 --- a/tests/integration/enum-namespace-directive/expected/index.html +++ b/tests/integration/enum-namespace-directive/expected/index.html @@ -4,10 +4,18 @@

PHP Enum with current namespace from directive

enum - \MyVendor\MyExtension\ -SomeEnum + + + SomeEnum + +
+
+
Fully qualified name
+
+ \MyVendor\MyExtension\MyVendor\MyExtension
+

some stuff

@@ -16,10 +24,18 @@

PHP Enum with current namespace from directive

enum - \MyVendor\MyExtension\ -AnotherEnum + + + AnotherEnum + +
+
+
Fully qualified name
+
+ \MyVendor\MyExtension\MyVendor\MyExtension
+

another stuff

diff --git a/tests/integration/enum-with-cases-link/expected/index.html b/tests/integration/enum-with-cases-link/expected/index.html index 5ae6425..b0e8a9f 100644 --- a/tests/integration/enum-with-cases-link/expected/index.html +++ b/tests/integration/enum-with-cases-link/expected/index.html @@ -4,7 +4,11 @@

PHP Enum with Const

enum - Suit + + + Suit + +
diff --git a/tests/integration/enum-with-cases/expected/index.html b/tests/integration/enum-with-cases/expected/index.html index 459a3d6..c817ebf 100644 --- a/tests/integration/enum-with-cases/expected/index.html +++ b/tests/integration/enum-with-cases/expected/index.html @@ -4,7 +4,11 @@

PHP Enum with Const

enum - Suit + + + Suit + +
diff --git a/tests/integration/enum-with-constant/expected/index.html b/tests/integration/enum-with-constant/expected/index.html index 9b89f5a..d011e48 100644 --- a/tests/integration/enum-with-constant/expected/index.html +++ b/tests/integration/enum-with-constant/expected/index.html @@ -4,10 +4,18 @@

PHP Enum with Const

enum - \MyVendor\MyExtension\ -SomeEnum + + + SomeEnum + +
+
+
Fully qualified name
+
+ \MyVendor\MyExtension\MyVendor\MyExtension
+

some stuff

diff --git a/tests/integration/enum-with-link/expected/index.html b/tests/integration/enum-with-link/expected/index.html index 2cee9f7..58e21bc 100644 --- a/tests/integration/enum-with-link/expected/index.html +++ b/tests/integration/enum-with-link/expected/index.html @@ -4,10 +4,18 @@

PHP Enum with current namespace from directive

enum - \MyVendor\MyExtension\ -SomeEnum + + + SomeEnum + +
+
+
Fully qualified name
+
+ \MyVendor\MyExtension\MyVendor\MyExtension
+

some stuff

@@ -16,10 +24,18 @@

PHP Enum with current namespace from directive

enum - \MyVendor\MyExtension\ -AnotherEnum + + + AnotherEnum + +
+
+
Fully qualified name
+
+ \MyVendor\MyExtension\MyVendor\MyExtension
+

another stuff

diff --git a/tests/integration/enum-with-namespace/expected/index.html b/tests/integration/enum-with-namespace/expected/index.html index aa50103..bc822f8 100644 --- a/tests/integration/enum-with-namespace/expected/index.html +++ b/tests/integration/enum-with-namespace/expected/index.html @@ -4,10 +4,18 @@

PHP Enum without namespace from directive

enum - \MyVendor\MyExtension\ -SomeEnum + + + SomeEnum + +
+
+
Fully qualified name
+
+ \MyVendor\MyExtension\MyVendor\MyExtension
+

some stuff

@@ -16,10 +24,18 @@

PHP Enum without namespace from directive

enum - \MyVendor\MyExtension\ -AnotherEnum + + + AnotherEnum + +
+
+
Fully qualified name
+
+ \MyVendor\MyExtension\MyVendor\MyExtension
+

another stuff

diff --git a/tests/integration/enum-with-warnings/expected/index.html b/tests/integration/enum-with-warnings/expected/index.html index 02300d0..06c1a32 100644 --- a/tests/integration/enum-with-warnings/expected/index.html +++ b/tests/integration/enum-with-warnings/expected/index.html @@ -4,7 +4,11 @@

PHP Enum with Warnings

enum - RedSuit : string + + + RedSuit + + : string
@@ -32,7 +36,11 @@

PHP Enum with Warnings

enum - BlackSuit : string + + + BlackSuit + + : string
diff --git a/tests/integration/enum-without-namespace/expected/index.html b/tests/integration/enum-without-namespace/expected/index.html index ce7750e..c778c5d 100644 --- a/tests/integration/enum-without-namespace/expected/index.html +++ b/tests/integration/enum-without-namespace/expected/index.html @@ -4,7 +4,11 @@

PHP Enum without namespace from directive

enum - SomeEnum + + + SomeEnum + +
@@ -15,7 +19,11 @@

PHP Enum without namespace from directive

enum - AnotherEnum + + + AnotherEnum + +
diff --git a/tests/integration/exception-directive/expected/index.html b/tests/integration/exception-directive/expected/index.html index ef78907..858e93b 100644 --- a/tests/integration/exception-directive/expected/index.html +++ b/tests/integration/exception-directive/expected/index.html @@ -4,10 +4,18 @@

PHP Exception

exception - \TYPO3\CMS\Core\Exception\Page\ -BrokenRootLineException + + + BrokenRootLineException + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page
+

Exception for root line traversal when a page within the root line traversal is missing / can not be resolved.

diff --git a/tests/integration/exception-with-link-deprecated/expected/index.html b/tests/integration/exception-with-link-deprecated/expected/index.html index f8c5670..35421a8 100644 --- a/tests/integration/exception-with-link-deprecated/expected/index.html +++ b/tests/integration/exception-with-link-deprecated/expected/index.html @@ -4,10 +4,18 @@

PHP Exception

exception - \TYPO3\CMS\Core\Exception\Page\ -BrokenRootLineException + + + BrokenRootLineException + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page
+

Exception for root line traversal when a page within the root line traversal is missing / can not be resolved.

diff --git a/tests/integration/exception-with-link/expected/index.html b/tests/integration/exception-with-link/expected/index.html index f8c5670..35421a8 100644 --- a/tests/integration/exception-with-link/expected/index.html +++ b/tests/integration/exception-with-link/expected/index.html @@ -4,10 +4,18 @@

PHP Exception

exception - \TYPO3\CMS\Core\Exception\Page\ -BrokenRootLineException + + + BrokenRootLineException + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page
+

Exception for root line traversal when a page within the root line traversal is missing / can not be resolved.

diff --git a/tests/integration/interface-implicit-namespace/expected/index.html b/tests/integration/interface-implicit-namespace/expected/index.html index fecb154..822ca05 100644 --- a/tests/integration/interface-implicit-namespace/expected/index.html +++ b/tests/integration/interface-implicit-namespace/expected/index.html @@ -4,10 +4,18 @@

PHP Interface with implicit namespace

interface - \TYPO3\CMS\Core\ -TestInterface + + + TestInterface + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/interface-link/expected/index.html b/tests/integration/interface-link/expected/index.html index d559d0d..abe447f 100644 --- a/tests/integration/interface-link/expected/index.html +++ b/tests/integration/interface-link/expected/index.html @@ -4,10 +4,18 @@

PHP Interface with implicit namespace

interface - \TYPO3\CMS\Core\ -TestInterface + + + TestInterface + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/interface-namespace-directive/expected/index.html b/tests/integration/interface-namespace-directive/expected/index.html index f8645ae..da37872 100644 --- a/tests/integration/interface-namespace-directive/expected/index.html +++ b/tests/integration/interface-namespace-directive/expected/index.html @@ -4,10 +4,18 @@

PHP Interface with current namespace from directive

interface - \TYPO3\CMS\Core\ -TestInterface + + + TestInterface + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

@@ -16,10 +24,18 @@

PHP Interface with current namespace from directive

interface - \TYPO3\CMS\Core\ -AnotherInterface + + + AnotherInterface + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor Another!

diff --git a/tests/integration/interface-with-const/expected/index.html b/tests/integration/interface-with-const/expected/index.html index a9651ec..48459c3 100644 --- a/tests/integration/interface-with-const/expected/index.html +++ b/tests/integration/interface-with-const/expected/index.html @@ -4,10 +4,18 @@

PHP Interface with const

interface - \TYPO3\CMS\Core\ -TestInterface + + + TestInterface + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/interface-with-method/expected/index.html b/tests/integration/interface-with-method/expected/index.html index f001520..4415273 100644 --- a/tests/integration/interface-with-method/expected/index.html +++ b/tests/integration/interface-with-method/expected/index.html @@ -4,10 +4,18 @@

PHP Interface with implicit namespace

interface - \TYPO3\CMS\Core\ -TestInterface + + + TestInterface + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\TYPO3\CMS\Core
+

Lorem Ipsum Dolor!

diff --git a/tests/integration/interface-without-namespace/expected/index.html b/tests/integration/interface-without-namespace/expected/index.html index 7cb09ce..08b8cd6 100644 --- a/tests/integration/interface-without-namespace/expected/index.html +++ b/tests/integration/interface-without-namespace/expected/index.html @@ -4,7 +4,11 @@

PHP Interface

interface - TestInterface + + + TestInterface + +
diff --git a/tests/integration/trait-directive/expected/index.html b/tests/integration/trait-directive/expected/index.html index bf5e17e..a80026c 100644 --- a/tests/integration/trait-directive/expected/index.html +++ b/tests/integration/trait-directive/expected/index.html @@ -4,10 +4,18 @@

PHP Trait

trait - \TYPO3\CMS\Core\Context\ -ContextAwareTrait + + + ContextAwareTrait + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\Context\TYPO3\CMS\Core\Context
+
public const diff --git a/tests/integration/trait-with-link/expected/index.html b/tests/integration/trait-with-link/expected/index.html index b92ae0e..35f5b6e 100644 --- a/tests/integration/trait-with-link/expected/index.html +++ b/tests/integration/trait-with-link/expected/index.html @@ -4,10 +4,18 @@

PHP Trait

trait - \TYPO3\CMS\Core\Context\ -ContextAwareTrait + + + ContextAwareTrait + +
+
+
Fully qualified name
+
+ \TYPO3\CMS\Core\Context\TYPO3\CMS\Core\Context
+
public const From eacdddc40b2d36b810492390f48d64b8b6b5e33d Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 15 May 2024 14:09:50 +0200 Subject: [PATCH 3/4] [TASK] Use partial includes for method names and FQNs --- Makefile | 2 +- phpstan-baseline.neon | 2 +- .../body/directive/php/component.html.twig | 5 +++-- .../php/fullyQualifiedName.html.twig | 7 ------- .../html/body/directive/php/method.html.twig | 2 +- .../php/partials/fullyQualifiedName.html.twig | 6 ++++++ .../method}/methodName.html.twig | 10 +++++----- .../GuidesPhpDomainExtension.php | 4 ---- .../class-abstract/expected/index.html | 6 ++---- .../class-duplicate/expected/index.html | 6 ++---- .../class-final-abstract/expected/index.html | 6 ++---- .../class-final/expected/index.html | 6 ++---- .../expected/index.html | 18 ++++++----------- .../class-twice-noindex/expected/index.html | 6 ++---- .../class-twice-noindex/expected/page2.html | 6 ++---- .../class-twice-warning/expected/index.html | 6 ++---- .../class-twice-warning/expected/page2.html | 6 ++---- .../expected/index.html | 6 ++---- .../expected/index.html | 6 ++---- .../class-with-const-link/expected/index.html | 6 ++---- .../class-with-const/expected/index.html | 6 ++---- .../class-with-link/expected/index.html | 10 ++++------ .../expected/index.html | 16 ++++++--------- .../expected/index.html | 10 ++++------ .../class-with-method/expected/index.html | 10 ++++------ .../expected/index.html | 4 +--- .../expected/index.html | 4 +--- .../class-with-property/expected/index.html | 4 +--- .../expected/index.html | 8 +++----- .../expected/index.html | 6 ++---- .../expected/index.html | 4 +--- .../expected/index.html | 4 +--- .../expected/index.html | 12 ++++------- .../enum-with-cases-link/expected/index.html | 4 +--- .../enum-with-cases/expected/index.html | 4 +--- .../enum-with-constant/expected/index.html | 6 ++---- .../enum-with-link/expected/index.html | 12 ++++------- .../enum-with-namespace/expected/index.html | 12 ++++------- .../enum-with-warnings/expected/index.html | 8 ++------ .../expected/index.html | 8 ++------ .../exception-directive/expected/index.html | 6 ++---- .../expected/index.html | 6 ++---- .../exception-with-link/expected/index.html | 6 ++---- .../expected/index.html | 6 ++---- .../interface-link/expected/index.html | 6 ++---- .../expected/index.html | 12 ++++------- .../interface-with-const/expected/index.html | 6 ++---- .../interface-with-method/expected/index.html | 10 ++++------ .../expected/index.html | 4 +--- .../expected/index.html | 10 +++++----- .../expected/index.html | 20 +++++++++---------- .../expected/index.html | 2 +- .../method-returns/expected/index.html | 2 +- .../static-method/expected/index.html | 2 +- .../trait-directive/expected/index.html | 10 ++++------ .../trait-with-link/expected/index.html | 10 ++++------ 56 files changed, 142 insertions(+), 250 deletions(-) delete mode 100644 resources/template/html/body/directive/php/fullyQualifiedName.html.twig create mode 100644 resources/template/html/body/directive/php/partials/fullyQualifiedName.html.twig rename resources/template/html/body/directive/php/{ => partials/method}/methodName.html.twig (57%) diff --git a/Makefile b/Makefile index 4109530..1f303aa 100644 --- a/Makefile +++ b/Makefile @@ -34,4 +34,4 @@ test-unit: ## Runs unit tests with phpunit vendor/bin/phpunit --testsuite=unit .PHONY: test -test: test-integration test-unit ## Runs all test suites with phpunit +test: fix-code-style phpstan test-integration test-unit ## Runs all test suites with phpunit diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 85dad07..e9a00dd 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2,7 +2,7 @@ parameters: ignoreErrors: - message: "#^Function phpDocumentor\\\\Guides\\\\DependencyInjection\\\\template not found\\.$#" - count: 11 + count: 9 path: src/DependencyInjection/GuidesPhpDomainExtension.php - diff --git a/resources/template/html/body/directive/php/component.html.twig b/resources/template/html/body/directive/php/component.html.twig index c9e3ace..2f31079 100644 --- a/resources/template/html/body/directive/php/component.html.twig +++ b/resources/template/html/body/directive/php/component.html.twig @@ -1,3 +1,4 @@ +{%- if node.name.namespaceNode %}{%- set fqn = '\\' ~ node.name.namespaceNode.name ~ '\\' ~ node.name.namespaceNode.name -%}{% endif -%}
@@ -5,7 +6,8 @@ {{- renderNode(modifier) }}{{ ' ' -}} {%- endfor -%} {{ node.type }} - {{ renderNode(node.name) }} {%- if node.type == 'enum' and node.phpType -%} : {{ node.phpType }} {% endif -%} + {% include "body/directive/php/partials/fullyQualifiedName.html.twig" with {'className': node.name, 'fqn': fqn} %} + {%- if node.type == 'enum' and node.phpType -%} : {{ node.phpType }} {% endif -%} {% include "body/directive/php/partials/linkToSnippet.html.twig" %}
@@ -14,7 +16,6 @@ {% if node.name.namespaceNode %}
Fully qualified name
- {% set fqn = '\\' ~ node.name.namespaceNode.name ~ '\\' ~ node.name.namespaceNode.name %} {% include "body/directive/php/partials/codeStyle.html.twig" with {'code': fqn} %}
{% endif -%} diff --git a/resources/template/html/body/directive/php/fullyQualifiedName.html.twig b/resources/template/html/body/directive/php/fullyQualifiedName.html.twig deleted file mode 100644 index a42277c..0000000 --- a/resources/template/html/body/directive/php/fullyQualifiedName.html.twig +++ /dev/null @@ -1,7 +0,0 @@ - - - {{ node.name }} - - diff --git a/resources/template/html/body/directive/php/method.html.twig b/resources/template/html/body/directive/php/method.html.twig index 1001d90..0078b25 100644 --- a/resources/template/html/body/directive/php/method.html.twig +++ b/resources/template/html/body/directive/php/method.html.twig @@ -3,7 +3,7 @@ {%- for modifier in node.modifiers -%} {{- renderNode(modifier) }}{{ ' ' -}} {%- endfor -%} - {{- renderNode(node.methodName) -}} + {% include "body/directive/php/partials/method/methodName.html.twig" with {'methodName': node.methodName} %} {% include "body/directive/php/partials/linkToSnippet.html.twig" %}
diff --git a/resources/template/html/body/directive/php/partials/fullyQualifiedName.html.twig b/resources/template/html/body/directive/php/partials/fullyQualifiedName.html.twig new file mode 100644 index 0000000..e48bd6e --- /dev/null +++ b/resources/template/html/body/directive/php/partials/fullyQualifiedName.html.twig @@ -0,0 +1,6 @@ + + + {{- className.name -}} + + diff --git a/resources/template/html/body/directive/php/methodName.html.twig b/resources/template/html/body/directive/php/partials/method/methodName.html.twig similarity index 57% rename from resources/template/html/body/directive/php/methodName.html.twig rename to resources/template/html/body/directive/php/partials/method/methodName.html.twig index 94be072..73029d0 100644 --- a/resources/template/html/body/directive/php/methodName.html.twig +++ b/resources/template/html/body/directive/php/partials/method/methodName.html.twig @@ -1,15 +1,15 @@ - {%- for modifier in node.modifiers -%} + {%- for modifier in methodName.modifiers -%} {{- renderNode(modifier) }}{{ ' ' -}} {%- endfor -%} - {{ node.name }} + {{ methodName.name }} ( -{% for param in node.params -%} +{% for param in methodName.params -%} {{ param }} {%- if not loop.last %}, {% endif -%} {%- endfor %} ) -{% if node.return %} -: {{ node.return }} +{% if methodName.return %} +: {{ methodName.return }} {% endif %} diff --git a/src/DependencyInjection/GuidesPhpDomainExtension.php b/src/DependencyInjection/GuidesPhpDomainExtension.php index 46a9050..3fa25a6 100644 --- a/src/DependencyInjection/GuidesPhpDomainExtension.php +++ b/src/DependencyInjection/GuidesPhpDomainExtension.php @@ -9,9 +9,7 @@ use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use T3Docs\GuidesPhpDomain\Nodes\FullyQualifiedNameNode; use T3Docs\GuidesPhpDomain\Nodes\MemberNameNode; -use T3Docs\GuidesPhpDomain\Nodes\MethodNameNode; use T3Docs\GuidesPhpDomain\Nodes\PhpCaseNode; use T3Docs\GuidesPhpDomain\Nodes\PhpComponentNode; use T3Docs\GuidesPhpDomain\Nodes\PhpConstNode; @@ -44,7 +42,6 @@ public function prepend(ContainerBuilder $container): void [ 'base_template_paths' => [dirname(__DIR__, 2) . '/resources/template/html'], 'templates' => [ - template(FullyQualifiedNameNode::class, 'body/directive/php/fullyQualifiedName.html.twig'), template(PhpCaseNode::class, 'body/directive/php/case.html.twig'), template(PhpComponentNode::class, 'body/directive/php/component.html.twig'), template(PhpConstNode::class, 'body/directive/php/const.html.twig'), @@ -54,7 +51,6 @@ public function prepend(ContainerBuilder $container): void template(PhpPropertyNode::class, 'body/directive/php/property.html.twig'), template(PhpModifierNode::class, 'body/directive/php/modifier.html.twig'), template(MemberNameNode::class, 'body/directive/php/memberName.html.twig'), - template(MethodNameNode::class, 'body/directive/php/methodName.html.twig'), ], ], ); diff --git a/tests/integration/class-abstract/expected/index.html b/tests/integration/class-abstract/expected/index.html index 41e387d..cb5d276 100644 --- a/tests/integration/class-abstract/expected/index.html +++ b/tests/integration/class-abstract/expected/index.html @@ -5,16 +5,14 @@

abstract class

abstract class - - AbstractTest - + AbstractTest
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-duplicate/expected/index.html b/tests/integration/class-duplicate/expected/index.html index 4ff3d7a..1d9ab34 100644 --- a/tests/integration/class-duplicate/expected/index.html +++ b/tests/integration/class-duplicate/expected/index.html @@ -5,16 +5,14 @@

final class

final class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-final-abstract/expected/index.html b/tests/integration/class-final-abstract/expected/index.html index e429c80..eeb1622 100644 --- a/tests/integration/class-final-abstract/expected/index.html +++ b/tests/integration/class-final-abstract/expected/index.html @@ -5,16 +5,14 @@

abstract final class causes warning

abstract final class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-final/expected/index.html b/tests/integration/class-final/expected/index.html index 4ff3d7a..1d9ab34 100644 --- a/tests/integration/class-final/expected/index.html +++ b/tests/integration/class-final/expected/index.html @@ -5,16 +5,14 @@

final class

final class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-namespace-directive/expected/index.html b/tests/integration/class-namespace-directive/expected/index.html index 349b3f5..e35fea3 100644 --- a/tests/integration/class-namespace-directive/expected/index.html +++ b/tests/integration/class-namespace-directive/expected/index.html @@ -5,16 +5,14 @@

PHP Class with current namespace from directive

class - - TestClass - + TestClass
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -25,16 +23,14 @@

PHP Class with current namespace from directive

class - - AnotherClass - + AnotherClass
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor Another!

@@ -45,16 +41,14 @@

PHP Class with current namespace from directive

class - - AnotherClass - + AnotherClass
Fully qualified name
- \MyVendor\Some\Namespace\MyVendor\Some\Namespace
+ \MyVendor\Some\Namespace\MyVendor\Some\Namespace

Lorem Ipsum Dolor Yet Another!

diff --git a/tests/integration/class-twice-noindex/expected/index.html b/tests/integration/class-twice-noindex/expected/index.html index 1a57479..d179e15 100644 --- a/tests/integration/class-twice-noindex/expected/index.html +++ b/tests/integration/class-twice-noindex/expected/index.html @@ -5,16 +5,14 @@

class listed twice throws warning

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-twice-noindex/expected/page2.html b/tests/integration/class-twice-noindex/expected/page2.html index cae4a38..5e0e498 100644 --- a/tests/integration/class-twice-noindex/expected/page2.html +++ b/tests/integration/class-twice-noindex/expected/page2.html @@ -5,15 +5,13 @@

class listed twice throws warning

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-twice-warning/expected/index.html b/tests/integration/class-twice-warning/expected/index.html index 1a57479..d179e15 100644 --- a/tests/integration/class-twice-warning/expected/index.html +++ b/tests/integration/class-twice-warning/expected/index.html @@ -5,16 +5,14 @@

class listed twice throws warning

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-twice-warning/expected/page2.html b/tests/integration/class-twice-warning/expected/page2.html index b73b3f5..32e5130 100644 --- a/tests/integration/class-twice-warning/expected/page2.html +++ b/tests/integration/class-twice-warning/expected/page2.html @@ -5,16 +5,14 @@

class listed twice throws warning

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html b/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html index 5c7d8f7..c951576 100644 --- a/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html +++ b/tests/integration/class-with-const-illegal-modifier-combinations/expected/index.html @@ -5,16 +5,14 @@

PHP class with constants

class - - FunClass - + FunClass
Fully qualified name
- \ChuckleFactory\ChuckleFactory
+ \ChuckleFactory\ChuckleFactory

Where Fun Knows No Bounds!

diff --git a/tests/integration/class-with-const-link-warning/expected/index.html b/tests/integration/class-with-const-link-warning/expected/index.html index 516e0f4..d3bcba1 100644 --- a/tests/integration/class-with-const-link-warning/expected/index.html +++ b/tests/integration/class-with-const-link-warning/expected/index.html @@ -5,16 +5,14 @@

PHP class with constants

class - - EnigmaticClass - + EnigmaticClass
Fully qualified name
- \SecretSociety\SecretSociety
+ \SecretSociety\SecretSociety

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-with-const-link/expected/index.html b/tests/integration/class-with-const-link/expected/index.html index 977607b..ea64056 100644 --- a/tests/integration/class-with-const-link/expected/index.html +++ b/tests/integration/class-with-const-link/expected/index.html @@ -5,16 +5,14 @@

PHP class with constants

class - - EnigmaticClass - + EnigmaticClass
Fully qualified name
- \SecretSociety\SecretSociety
+ \SecretSociety\SecretSociety

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-with-const/expected/index.html b/tests/integration/class-with-const/expected/index.html index 10368a8..21bc505 100644 --- a/tests/integration/class-with-const/expected/index.html +++ b/tests/integration/class-with-const/expected/index.html @@ -5,16 +5,14 @@

PHP class with constants

class - - EnigmaticClass - + EnigmaticClass
Fully qualified name
- \SecretSociety\SecretSociety
+ \SecretSociety\SecretSociety

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-with-link/expected/index.html b/tests/integration/class-with-link/expected/index.html index 369683f..1b90a65 100644 --- a/tests/integration/class-with-link/expected/index.html +++ b/tests/integration/class-with-link/expected/index.html @@ -5,16 +5,14 @@

PHP Class with explicit namespace

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -23,7 +21,7 @@

PHP Class with explicit namespace

setDate ( int $year, int $month, int $day) - +
@@ -36,7 +34,7 @@

PHP Class with explicit namespace

( ) : int - +
diff --git a/tests/integration/class-with-method-link-warning/expected/index.html b/tests/integration/class-with-method-link-warning/expected/index.html index 21c09bd..fe82a74 100644 --- a/tests/integration/class-with-method-link-warning/expected/index.html +++ b/tests/integration/class-with-method-link-warning/expected/index.html @@ -5,16 +5,14 @@

PHP Class with explicit namespace

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -23,7 +21,7 @@

PHP Class with explicit namespace

setDate ( int $year, int $month, int $day) - +
@@ -36,7 +34,7 @@

PHP Class with explicit namespace

( ) : int - +
@@ -47,9 +45,7 @@

PHP Class with explicit namespace

class - - IllegalSubClass - + IllegalSubClass
@@ -59,7 +55,7 @@

PHP Class with explicit namespace

( ) : int - +
diff --git a/tests/integration/class-with-method-link/expected/index.html b/tests/integration/class-with-method-link/expected/index.html index a4ebf39..c7ff6e7 100644 --- a/tests/integration/class-with-method-link/expected/index.html +++ b/tests/integration/class-with-method-link/expected/index.html @@ -5,16 +5,14 @@

PHP Class with explicit namespace

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -23,7 +21,7 @@

PHP Class with explicit namespace

setDate ( int $year, int $month, int $day) - +
@@ -36,7 +34,7 @@

PHP Class with explicit namespace

( ) : int - +
diff --git a/tests/integration/class-with-method/expected/index.html b/tests/integration/class-with-method/expected/index.html index c5e075d..5c2af5d 100644 --- a/tests/integration/class-with-method/expected/index.html +++ b/tests/integration/class-with-method/expected/index.html @@ -5,16 +5,14 @@

PHP Class with explicit namespace

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -23,7 +21,7 @@

PHP Class with explicit namespace

setDate ( int $year, int $month, int $day) - +
@@ -36,7 +34,7 @@

PHP Class with explicit namespace

( ) : int - +
diff --git a/tests/integration/class-with-property-link/expected/index.html b/tests/integration/class-with-property-link/expected/index.html index c7a14b4..967c6c0 100644 --- a/tests/integration/class-with-property-link/expected/index.html +++ b/tests/integration/class-with-property-link/expected/index.html @@ -5,9 +5,7 @@

PHP class with properties

class - - JollyElf - + JollyElf
diff --git a/tests/integration/class-with-property-warnings/expected/index.html b/tests/integration/class-with-property-warnings/expected/index.html index 791151e..67fd976 100644 --- a/tests/integration/class-with-property-warnings/expected/index.html +++ b/tests/integration/class-with-property-warnings/expected/index.html @@ -5,9 +5,7 @@

PHP class with properties that cause warnings

class - - GrumpyGoblin - + GrumpyGoblin
diff --git a/tests/integration/class-with-property/expected/index.html b/tests/integration/class-with-property/expected/index.html index b3c7695..8ea2eb9 100644 --- a/tests/integration/class-with-property/expected/index.html +++ b/tests/integration/class-with-property/expected/index.html @@ -5,9 +5,7 @@

PHP class with properties

class - - JollyElf - + JollyElf
diff --git a/tests/integration/class-with-staticmethod/expected/index.html b/tests/integration/class-with-staticmethod/expected/index.html index f8d4d60..8374b2d 100644 --- a/tests/integration/class-with-staticmethod/expected/index.html +++ b/tests/integration/class-with-staticmethod/expected/index.html @@ -5,16 +5,14 @@

PHP Class with static method

class - - Test - + Test
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -24,7 +22,7 @@

PHP Class with static method

( string $whatever) : string - +
diff --git a/tests/integration/class-with-typed-const/expected/index.html b/tests/integration/class-with-typed-const/expected/index.html index 3995d7a..b205d7c 100644 --- a/tests/integration/class-with-typed-const/expected/index.html +++ b/tests/integration/class-with-typed-const/expected/index.html @@ -5,16 +5,14 @@

PHP class with constants

class - - EnigmaticClass - + EnigmaticClass
Fully qualified name
- \SecretSociety\SecretSociety
+ \SecretSociety\SecretSociety

Unveiling the mysteries of constants!

diff --git a/tests/integration/class-without-namespace/expected/index.html b/tests/integration/class-without-namespace/expected/index.html index a51747c..2d1dd1c 100644 --- a/tests/integration/class-without-namespace/expected/index.html +++ b/tests/integration/class-without-namespace/expected/index.html @@ -5,9 +5,7 @@

PHP Class

class - - TestClass - + TestClass
diff --git a/tests/integration/enum-backed-with-cases/expected/index.html b/tests/integration/enum-backed-with-cases/expected/index.html index 60996f1..e528ab2 100644 --- a/tests/integration/enum-backed-with-cases/expected/index.html +++ b/tests/integration/enum-backed-with-cases/expected/index.html @@ -5,9 +5,7 @@

PHP Enum, backed, with cases

enum - - RedSuit - + RedSuit : string
diff --git a/tests/integration/enum-namespace-directive/expected/index.html b/tests/integration/enum-namespace-directive/expected/index.html index e5b91af..c4a6e8b 100644 --- a/tests/integration/enum-namespace-directive/expected/index.html +++ b/tests/integration/enum-namespace-directive/expected/index.html @@ -5,16 +5,14 @@

PHP Enum with current namespace from directive

enum - - SomeEnum - + SomeEnum
Fully qualified name
- \MyVendor\MyExtension\MyVendor\MyExtension
+ \MyVendor\MyExtension\MyVendor\MyExtension

some stuff

@@ -25,16 +23,14 @@

PHP Enum with current namespace from directive

enum - - AnotherEnum - + AnotherEnum
Fully qualified name
- \MyVendor\MyExtension\MyVendor\MyExtension
+ \MyVendor\MyExtension\MyVendor\MyExtension

another stuff

diff --git a/tests/integration/enum-with-cases-link/expected/index.html b/tests/integration/enum-with-cases-link/expected/index.html index b0e8a9f..c8b4dc5 100644 --- a/tests/integration/enum-with-cases-link/expected/index.html +++ b/tests/integration/enum-with-cases-link/expected/index.html @@ -5,9 +5,7 @@

PHP Enum with Const

enum - - Suit - + Suit
diff --git a/tests/integration/enum-with-cases/expected/index.html b/tests/integration/enum-with-cases/expected/index.html index c817ebf..591dd94 100644 --- a/tests/integration/enum-with-cases/expected/index.html +++ b/tests/integration/enum-with-cases/expected/index.html @@ -5,9 +5,7 @@

PHP Enum with Const

enum - - Suit - + Suit
diff --git a/tests/integration/enum-with-constant/expected/index.html b/tests/integration/enum-with-constant/expected/index.html index d011e48..f947bbf 100644 --- a/tests/integration/enum-with-constant/expected/index.html +++ b/tests/integration/enum-with-constant/expected/index.html @@ -5,16 +5,14 @@

PHP Enum with Const

enum - - SomeEnum - + SomeEnum
Fully qualified name
- \MyVendor\MyExtension\MyVendor\MyExtension
+ \MyVendor\MyExtension\MyVendor\MyExtension

some stuff

diff --git a/tests/integration/enum-with-link/expected/index.html b/tests/integration/enum-with-link/expected/index.html index 58e21bc..c22d7f8 100644 --- a/tests/integration/enum-with-link/expected/index.html +++ b/tests/integration/enum-with-link/expected/index.html @@ -5,16 +5,14 @@

PHP Enum with current namespace from directive

enum - - SomeEnum - + SomeEnum
Fully qualified name
- \MyVendor\MyExtension\MyVendor\MyExtension
+ \MyVendor\MyExtension\MyVendor\MyExtension

some stuff

@@ -25,16 +23,14 @@

PHP Enum with current namespace from directive

enum - - AnotherEnum - + AnotherEnum
Fully qualified name
- \MyVendor\MyExtension\MyVendor\MyExtension
+ \MyVendor\MyExtension\MyVendor\MyExtension

another stuff

diff --git a/tests/integration/enum-with-namespace/expected/index.html b/tests/integration/enum-with-namespace/expected/index.html index bc822f8..fc2051f 100644 --- a/tests/integration/enum-with-namespace/expected/index.html +++ b/tests/integration/enum-with-namespace/expected/index.html @@ -5,16 +5,14 @@

PHP Enum without namespace from directive

enum - - SomeEnum - + SomeEnum
Fully qualified name
- \MyVendor\MyExtension\MyVendor\MyExtension
+ \MyVendor\MyExtension\MyVendor\MyExtension

some stuff

@@ -25,16 +23,14 @@

PHP Enum without namespace from directive

enum - - AnotherEnum - + AnotherEnum
Fully qualified name
- \MyVendor\MyExtension\MyVendor\MyExtension
+ \MyVendor\MyExtension\MyVendor\MyExtension

another stuff

diff --git a/tests/integration/enum-with-warnings/expected/index.html b/tests/integration/enum-with-warnings/expected/index.html index 06c1a32..9968868 100644 --- a/tests/integration/enum-with-warnings/expected/index.html +++ b/tests/integration/enum-with-warnings/expected/index.html @@ -5,9 +5,7 @@

PHP Enum with Warnings

enum - - RedSuit - + RedSuit : string
@@ -37,9 +35,7 @@

PHP Enum with Warnings

enum - - BlackSuit - + BlackSuit : string
diff --git a/tests/integration/enum-without-namespace/expected/index.html b/tests/integration/enum-without-namespace/expected/index.html index c778c5d..c8635ee 100644 --- a/tests/integration/enum-without-namespace/expected/index.html +++ b/tests/integration/enum-without-namespace/expected/index.html @@ -5,9 +5,7 @@

PHP Enum without namespace from directive

enum - - SomeEnum - + SomeEnum
@@ -20,9 +18,7 @@

PHP Enum without namespace from directive

enum - - AnotherEnum - + AnotherEnum
diff --git a/tests/integration/exception-directive/expected/index.html b/tests/integration/exception-directive/expected/index.html index 858e93b..467d692 100644 --- a/tests/integration/exception-directive/expected/index.html +++ b/tests/integration/exception-directive/expected/index.html @@ -5,16 +5,14 @@

PHP Exception

exception - - BrokenRootLineException - + BrokenRootLineException
Fully qualified name
- \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page
+ \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page

Exception for root line traversal when a page within the root line traversal diff --git a/tests/integration/exception-with-link-deprecated/expected/index.html b/tests/integration/exception-with-link-deprecated/expected/index.html index 35421a8..6bcd8f7 100644 --- a/tests/integration/exception-with-link-deprecated/expected/index.html +++ b/tests/integration/exception-with-link-deprecated/expected/index.html @@ -5,16 +5,14 @@

PHP Exception

exception - - BrokenRootLineException - + BrokenRootLineException
Fully qualified name
- \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page
+ \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page

Exception for root line traversal when a page within the root line traversal diff --git a/tests/integration/exception-with-link/expected/index.html b/tests/integration/exception-with-link/expected/index.html index 35421a8..6bcd8f7 100644 --- a/tests/integration/exception-with-link/expected/index.html +++ b/tests/integration/exception-with-link/expected/index.html @@ -5,16 +5,14 @@

PHP Exception

exception - - BrokenRootLineException - + BrokenRootLineException
Fully qualified name
- \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page
+ \TYPO3\CMS\Core\Exception\Page\TYPO3\CMS\Core\Exception\Page

Exception for root line traversal when a page within the root line traversal diff --git a/tests/integration/interface-implicit-namespace/expected/index.html b/tests/integration/interface-implicit-namespace/expected/index.html index 822ca05..60ca811 100644 --- a/tests/integration/interface-implicit-namespace/expected/index.html +++ b/tests/integration/interface-implicit-namespace/expected/index.html @@ -5,16 +5,14 @@

PHP Interface with implicit namespace

interface - - TestInterface - + TestInterface
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/interface-link/expected/index.html b/tests/integration/interface-link/expected/index.html index abe447f..fd86891 100644 --- a/tests/integration/interface-link/expected/index.html +++ b/tests/integration/interface-link/expected/index.html @@ -5,16 +5,14 @@

PHP Interface with implicit namespace

interface - - TestInterface - + TestInterface
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/interface-namespace-directive/expected/index.html b/tests/integration/interface-namespace-directive/expected/index.html index da37872..55606c5 100644 --- a/tests/integration/interface-namespace-directive/expected/index.html +++ b/tests/integration/interface-namespace-directive/expected/index.html @@ -5,16 +5,14 @@

PHP Interface with current namespace from directive

interface - - TestInterface - + TestInterface
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -25,16 +23,14 @@

PHP Interface with current namespace from directive

interface - - AnotherInterface - + AnotherInterface
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor Another!

diff --git a/tests/integration/interface-with-const/expected/index.html b/tests/integration/interface-with-const/expected/index.html index 48459c3..e221282 100644 --- a/tests/integration/interface-with-const/expected/index.html +++ b/tests/integration/interface-with-const/expected/index.html @@ -5,16 +5,14 @@

PHP Interface with const

interface - - TestInterface - + TestInterface
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

diff --git a/tests/integration/interface-with-method/expected/index.html b/tests/integration/interface-with-method/expected/index.html index 4415273..28ccd85 100644 --- a/tests/integration/interface-with-method/expected/index.html +++ b/tests/integration/interface-with-method/expected/index.html @@ -5,16 +5,14 @@

PHP Interface with implicit namespace

interface - - TestInterface - + TestInterface
Fully qualified name
- \TYPO3\CMS\Core\TYPO3\CMS\Core
+ \TYPO3\CMS\Core\TYPO3\CMS\Core

Lorem Ipsum Dolor!

@@ -23,7 +21,7 @@

PHP Interface with implicit namespace

setDate ( int $year, int $month, int $day) - +
@@ -36,7 +34,7 @@

PHP Interface with implicit namespace

( ) : int - +
diff --git a/tests/integration/interface-without-namespace/expected/index.html b/tests/integration/interface-without-namespace/expected/index.html index 08b8cd6..7b67970 100644 --- a/tests/integration/interface-without-namespace/expected/index.html +++ b/tests/integration/interface-without-namespace/expected/index.html @@ -5,9 +5,7 @@

PHP Interface

interface - - TestInterface - + TestInterface
diff --git a/tests/integration/method-illegal-combinations/expected/index.html b/tests/integration/method-illegal-combinations/expected/index.html index 25342c0..29f92ea 100644 --- a/tests/integration/method-illegal-combinations/expected/index.html +++ b/tests/integration/method-illegal-combinations/expected/index.html @@ -7,7 +7,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -21,7 +21,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -35,7 +35,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -49,7 +49,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -63,7 +63,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
diff --git a/tests/integration/method-legal-combinations/expected/index.html b/tests/integration/method-legal-combinations/expected/index.html index 46daa30..d85a151 100644 --- a/tests/integration/method-legal-combinations/expected/index.html +++ b/tests/integration/method-legal-combinations/expected/index.html @@ -7,7 +7,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -21,7 +21,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -35,7 +35,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -49,7 +49,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -63,7 +63,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -77,7 +77,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -91,7 +91,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -105,7 +105,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -119,7 +119,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
@@ -133,7 +133,7 @@

PHP method with allowed modifier combinations

( string $whatever) : string - +
diff --git a/tests/integration/method-returns-fieldlist/expected/index.html b/tests/integration/method-returns-fieldlist/expected/index.html index 1b180c7..7333270 100644 --- a/tests/integration/method-returns-fieldlist/expected/index.html +++ b/tests/integration/method-returns-fieldlist/expected/index.html @@ -6,7 +6,7 @@

PHP methods with return value

getDate ( ) - +
diff --git a/tests/integration/method-returns/expected/index.html b/tests/integration/method-returns/expected/index.html index 32b418f..c2a6bb4 100644 --- a/tests/integration/method-returns/expected/index.html +++ b/tests/integration/method-returns/expected/index.html @@ -6,7 +6,7 @@

PHP methods with return value

getSomething ( ) - +
diff --git a/tests/integration/static-method/expected/index.html b/tests/integration/static-method/expected/index.html index 066d997..45d48e9 100644 --- a/tests/integration/static-method/expected/index.html +++ b/tests/integration/static-method/expected/index.html @@ -7,7 +7,7 @@

PHP static method

( string $whatever) : string - +
diff --git a/tests/integration/trait-directive/expected/index.html b/tests/integration/trait-directive/expected/index.html index a80026c..59e6435 100644 --- a/tests/integration/trait-directive/expected/index.html +++ b/tests/integration/trait-directive/expected/index.html @@ -5,16 +5,14 @@

PHP Trait

trait - - ContextAwareTrait - + ContextAwareTrait
Fully qualified name
- \TYPO3\CMS\Core\Context\TYPO3\CMS\Core\Context
+ \TYPO3\CMS\Core\Context\TYPO3\CMS\Core\Context
@@ -28,7 +26,7 @@

PHP Trait

setContext ( Context $context) - +
@@ -38,7 +36,7 @@

PHP Trait

getContext ( ) - +
diff --git a/tests/integration/trait-with-link/expected/index.html b/tests/integration/trait-with-link/expected/index.html index 35f5b6e..d5e678a 100644 --- a/tests/integration/trait-with-link/expected/index.html +++ b/tests/integration/trait-with-link/expected/index.html @@ -5,16 +5,14 @@

PHP Trait

trait - - ContextAwareTrait - + ContextAwareTrait
Fully qualified name
- \TYPO3\CMS\Core\Context\TYPO3\CMS\Core\Context
+ \TYPO3\CMS\Core\Context\TYPO3\CMS\Core\Context
@@ -28,7 +26,7 @@

PHP Trait

setContext ( Context $context) - +
@@ -38,7 +36,7 @@

PHP Trait

getContext ( ) - +
From 6286eda4216761d07a4778a506948b9469c78946 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 15 May 2024 17:58:23 +0200 Subject: [PATCH 4/4] [TASK] Use partial includes for method names and FQNs --- .github/workflows/main.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7c5f611..d0381e0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -56,5 +56,3 @@ jobs: run: "make code-style" - name: "Run static code analysis" run: "make phpstan" - - name: "Run rector" - run: "make rector-dry"