1
0
mirror of https://github.com/php/phd.git synced 2026-04-27 17:03:19 +02:00
Commit Graph

83 Commits

Author SHA1 Message Date
haszi 27e3bc3e4a Move whitespace formatting to generic XHTML format (#95)
Co-authored-by: haszi <haszika80@gmail.com>
2024-02-13 22:04:40 +00:00
haszi bdbd0e68ad Declare dynamic properties and removenonexistent variable (#93)
Declare all previously dynamic properties as far up the class hierarchy as needed and remove all declarations further down the inheritance tree.
Remove one nonexistent variable.

Co-authored-by: haszi <haszika80@gmail.com>
2024-02-09 21:41:14 +00:00
haszi e5b8bf35a9 Remove file ending comment blocks (#92)
Co-authored-by: haszi <haszika80@gmail.com>
2024-02-08 12:46:21 +00:00
haszi e4a363fde2 Fix tests (#91)
Co-authored-by: haszi <haszika80@gmail.com>
2024-02-07 18:48:35 +00:00
haszi 10ee0e4bb2 Add table formatting for constant lists (#90)
* Add table formatting for constant lists
* Add description and constants autogen text to .ini files
* Add language specific header to constant list table

---------

Co-authored-by: haszi <haszika80@gmail.com>
2024-02-05 15:17:25 +00:00
alfsb c4d5d5f4bb Detect and render <emphasis role="strong|bold"> usage in manual (#81)
Co-authored-by: André L F S Bacci <ae@php.net>
2023-08-12 13:52:46 +01:00
George Peter Banyard ac72a948cb Add support for rendering more logical classsynopsis markup (#77)
* Add support for rendering more logical classsynopsis markup while allowing the old markup to render
2023-07-26 14:10:08 +01:00
Dan 5708881e23 Adjust styles to match better 2023-06-29 19:12:57 -04:00
Dan Pock d624550c71 Add rendering logic for interfaces
- Adds cchunk variable for tracking if a classsynopsis is actually an interface
- Render extends instead of implements for interfaces
- Render interface instead of class
2023-06-29 12:45:55 -04:00
George Peter Banyard fd31ae5f37 Crude support for keycap and keycombo DocBook tags (#74)
Co-authored-by: Peter Cowburn <salathe@php.net>
2023-04-01 03:59:40 +01:00
Derick Rethans 862833e266 Fixed PHP 8.2 dynamic property generation warning 2023-03-23 15:50:13 +00:00
Máté Kocsis 38a6b1b6e6 Do not render the strong tag unnecessarily 2021-08-01 17:07:07 +02:00
Máté Kocsis 29cf25195a Add support for displaying class/interface on class synopsis pages 2021-07-30 16:50:10 +02:00
Máté Kocsis bc10e61b9d Improve the display of union and intersection types
Simple nullable types are now displayed via using "?", while support for intersection types are reintroduced.
2021-07-25 23:37:16 +02:00
Máté Kocsis 805a1a024f Fix formatting of the implements keyword 2021-07-25 16:54:44 +02:00
Nilgün Belma Bugüner ff4a1c50b1 added id for variablelist 2021-07-23 15:41:25 +03:00
Máté Kocsis a13d8b1edc Reformat methodsynopsis whitespaces (#38) 2021-06-16 11:02:00 +02:00
Christoph M. Becker e1c32b30be Revert "Do not render unnecessary whitespace in methodsynopses"
This reverts commit 6a531f98e3, which has
been pushed inadvertently.
2021-01-17 13:10:05 +01:00
Christoph M. Becker c1dbe7b009 Mark up implicit intializers a span.initializer
This matches the mark up of explicit initializers.
2021-01-17 12:30:14 +01:00
Máté Kocsis 6a531f98e3 Do not render unnecessary whitespace in methodsynopses 2021-01-16 00:02:12 +01:00
Christoph M. Becker 785fec0bd5 Don't render optional parameters in brackets
In PHP, parameters with a default value are optional, so there is no
need to enclose these in brackets.  For methodparams which do not have
an initializer, we use a question mark instead.

Closes GH-37.
2021-01-04 12:48:44 +01:00
Christoph M. Becker d59932c151 Support variadic parameters – take 2
So far, PhD does not support variadic parameters.  Instead the manual
follows the convention to use `...` as parameter name, which is then
rendered as `$...` in the docs.  However, as of PHP 5.6.0 variadic
parameters are supported using the syntax `...$args`; therefore, we are
going to support this notation for PhD.

While DocBook supports a `<varargs>` element, this cannot be used in
combination with named parameters.  Therefore, we use the `rep`
attribute of the `<methodparam>` element to designate variadic
parameters.
2020-11-02 12:09:38 +01:00
Christoph M. Becker 5405e79b75 Don't render "void" in empty parameter lists
This is more confusing than helpful, and is not even explained in the
"How to read a function definition (prototype)" appendix.
2020-11-02 11:24:07 +01:00
Christoph M. Becker 4d91cb2e05 Properly support union types
This is the cleaner alternative to PR #25, which supports nested
`<type>` elements, and renders them as union types in PHP 8 syntax.

We also drop special support for array|object.
2020-10-29 17:05:47 +01:00
Peter Cowburn 0cd33b053e (xhtml) render literals using code rather than em tags 2020-09-01 23:08:25 +01:00
Peter Cowburn ba8df931cc remove trailing newline from format_option() HTML 2019-09-24 12:46:33 +01:00
Peter Cowburn 50576cfd1e Merge branch 'pull-request/17' 2018-11-12 19:06:39 +00:00
Peter Kokot 3564283891 Sync final newlines
This patch adds some missing newlines and trims multiple redundant
newlines into a single newline.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-02 06:23:33 +02:00
Peter Cowburn 126b9bea13 render return type in PHP 7 style
This change moves the return type name to the right-hand side of the
function/method prototypes, along the same lines as PHP 7 code.

Before:
    int time ( void )

After:
    time ( void ) : int

While this is a step towards PHP 7 style, there are still some
departures. Notably:
- No conversion to valid scalar type names is done (e.g. converting
"<type>boolean</type>" to " : bool")
- Pseudo-types and other invalid type names are used (e.g. resource,
mixed)
2017-11-15 00:48:06 +00:00
Sobak aecae4e2c3 Eliminate $ comments 2015-03-09 06:20:39 +01:00
Adam Harvey 6fc8c88f49 simplesect elements should use the same formatting as sect[2-5]. 2015-02-19 15:46:58 -08:00
Hannes Magnusson 90c210b9b5 Use html5 q for quoting 2015-02-06 13:58:47 -08:00
Simion Onea f813dc9f20 Modified the XHTML representation of the "envar" tag. 2014-09-22 17:53:11 +03:00
Adam Harvey da4aa173df Render segmentedlist elements as tables when using XHTML.
For the two places we actually use segmentedlists in php-doc, this takes the
output from being basically unreadable to actually useful.
2014-03-18 14:37:37 -07:00
Levi Morrison 8367a3ebf9 Removed <em> wrapper around parameters. 2014-03-06 12:36:03 -07:00
Peter Cowburn 58725e5f96 move generating dt tags from varlistentry to term 2013-12-29 20:13:31 +00:00
Hannes Magnusson b5b9341088 Fix invalid IDs on multiple unknown refsect roles 2012-04-06 07:31:29 -07:00
Alexey Borzov dce97c2736 * Get rid of redundant align and valign attributes on table-related tags, make non-redundant ones output as inline styles
* Make some of the tests pass (they probably didn't even before my changes)
* Changed <refsection> rendering in Package_PEAR_XHTML, format_refsect() has unfortunate side effects
2012-02-07 06:30:24 +00:00
Alexey Borzov f809759cc9 getting rid of presentational tags (b, i, tt) 2012-02-06 14:02:59 +00:00
Alexey Borzov c68b828959 whitespace fixes 2012-02-06 09:57:12 +00:00
Alexey Borzov 33e491830a Make refsections linkable in Package_PEAR_XHTML, fix obviously wrong namespace in Package_Generic_XHTML 2012-02-05 07:47:43 +00:00
Jakub Vrana a312f43a3a Allow link to methodsynopsis 2012-01-12 14:37:51 +00:00
Jakub Vrana e0198acd9e Display class name in detail but not in overview 2012-01-10 10:50:08 +00:00
Hannes Magnusson ec6f605c48 Added support for authorinitials, printhistory, revhistory, revision and revremark (Hannes) 2011-08-31 14:42:56 +00:00
Moacir de Oliveira Miranda Júnior 4e9974f931 Rendering all descriptions as html
* Maybe we should make this optional, render as text or html
* CDATA is used in the XML format
* Now is possible to render all IDE formats at once \o/
2011-07-02 23:25:55 +00:00
Nikola Smolenski 3945fc0f05 - NBSP after » for external links
- NBSP after бр. in Serbian autogenerated text
2011-04-28 06:06:59 +00:00
Hannes Magnusson a55569ec29 Properly restore the default chunk data when creating "container chunks"
fixes bug#52664
2011-04-18 14:01:04 +00:00
Richard Quadling 03def3cb58 Allow output directories to be a nested directory. 2011-04-01 16:00:11 +00:00
Hannes Magnusson c5675e598e Generate IDs for example, and store their descriptions
# Useful for linking to specific examples via irc/email for example
# And will make it possible to create an example listing like we have always wanted
2010-12-31 09:28:38 +00:00
Hannes Magnusson ac5a0d0cdb Generate IDs for refsect1s 2010-12-28 08:10:16 +00:00