diff --git a/doc/reference.rst b/doc/reference.rst index 35f04a8..2a64bab 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -145,11 +145,6 @@ Each directive populates the index, and or the namespace index. This is an instance method. -.. rst:directive:: .. php:staticmethod:: ClassName::methodName(signature) - - Describe a static method, its arguments, return value and exceptions, - see :rst:dir:`php:method` for options. - .. rst:directive:: .. php:property:: name Describe a property on a class. @@ -193,11 +188,9 @@ matching directive is found: .. rst:role:: php:method - Reference a method of a class/interface/trait. This role supports - both kinds of methods:: + Reference a method of a class/interface/trait:: :php:method:`DateTime::setDate` - :php:method:`Classname::staticMethod` .. rst:role:: php:property diff --git a/sphinxcontrib/phpdomain.py b/sphinxcontrib/phpdomain.py index 12a8749..8b7e629 100644 --- a/sphinxcontrib/phpdomain.py +++ b/sphinxcontrib/phpdomain.py @@ -673,7 +673,7 @@ class PhpDomain(Domain): 'const': PhpNamespacelevel, 'class': PhpClasslike, 'method': PhpClassmember, - 'staticmethod': PhpClassmember, + 'staticmethod': PhpClassmember, # deprecated, use "method" with "static" visibility, methods in PHP are exclusively static or non-static 'property': PhpClassmember, 'attr': PhpClassmember, # deprecated, use "property" 'case': PhpClassmember, diff --git a/test/log.txt b/test/log.txt index 61449fa..27a1cde 100644 --- a/test/log.txt +++ b/test/log.txt @@ -1,6 +1,6 @@ test/ns.md:48: [phpdomain.info] Target A2::simplify not found test/ns.md:53: [phpdomain.info] Target Bar2\A::simplify not found -test/rst_doc.md:502: [phpdomain.info] Target OtherLibrary\ReturningClass\int|string|OtherLibrary\ReturnedClass|LibraryName\SubPackage\SubpackageInterface|null not found +test/rst_doc.md:478: [phpdomain.info] Target OtherLibrary\ReturningClass\int|string|OtherLibrary\ReturnedClass|LibraryName\SubPackage\SubpackageInterface|null not found test/rst_doc2.md:11: [phpdomain.info] Target Imagine\Image\ImageInterface::draw not found test/rst_doc2.md:17: [phpdomain.info] Target Imagine\Image\PointInterface not found test/rst_doc2.md:17: [phpdomain.info] Target Imagine\Image\BoxInterface not found diff --git a/test/rst_doc.html b/test/rst_doc.html index 8356f2e..80b071b 100644 --- a/test/rst_doc.html +++ b/test/rst_doc.html @@ -244,21 +244,25 @@
A static method.
+A method without explicitly declared class block.
- OtherClass::staticMethod
+ OtherClass2::update
@@ -710,23 +714,6 @@ A static method in a namespace
-A static method here.
+A method without explicitly declared class block in a namespace
- LibraryClass::staticMethod()
-
-
-
@@ -1034,6 +1011,13 @@
Test Case - not including namespace
+
+ NamespaceClass2::update()
+
+
+