@@ -424,3 +424,51 @@ Test Case - Test subpackage links
424424:php:class: `LibraryName\\ SubPackage\\ SubpackageInterface `
425425
426426:php:exc: `LibraryName\\ SubPackage\\ NestedNamespaceException `
427+
428+ Return Types
429+ ============
430+
431+ .. php :namespace :: OtherLibrary
432+
433+ .. php :class :: ReturningClass
434+
435+ A class to do some returning.
436+
437+ .. php :method :: returnClassFromSameNamespace()
438+
439+ :returns: An object instance of a class from the same namespace.
440+ :returntype: OtherLibrary\\ ReturnedClass
441+
442+ .. php :method :: returnClassFromOtherNamespace()
443+
444+ :returns: An object instance of a class from another namespace.
445+ :returntype: LibraryName\\ SubPackage\\ SubpackageInterface
446+
447+ .. php :method :: returnClassConstant()
448+
449+ :returns: The value of a specific class constant.
450+ :returntype: LibraryName\\ NamespaceClass::NAMESPACE_CONST
451+
452+ .. php :method :: returnGlobalConstant()
453+
454+ :returns: The value of a specific global constant.
455+ :returntype: SOME_CONSTANT
456+
457+ .. php :method :: returnExceptionInstance()
458+
459+ :returns: An instance of an exception.
460+ :returntype: InvalidArgumentException
461+
462+ .. php :method :: returnScalarType()
463+
464+ :returns: A scalar string type.
465+ :returntype: string
466+
467+ .. php :method :: returnUnionType()
468+
469+ :returns: Any of a whole bunch of things specified with a PHP 8 union type.
470+ :returntype: int|string|OtherLibrary\\ ReturnedClass|LibraryName\\ SubPackage\\ SubpackageInterface|null
471+
472+ .. php :class :: ReturnedClass
473+
474+ A class to return.
0 commit comments