Skip to content

Sync some methodsynopses with stubs #3199

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

Merged
merged 3 commits into from
Apr 16, 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
2 changes: 1 addition & 1 deletion reference/dom/domnode/getrootnode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis role="DOMNode">
<modifier>public</modifier> <type>DOMNode</type><methodname>DOMNode::getRootNode</methodname>
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Get root node.
Expand Down
38 changes: 35 additions & 3 deletions reference/errorfunc/functions/trigger-error.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>trigger_error</methodname>
<type>true</type><methodname>trigger_error</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>error_level</parameter><initializer><constant>E_USER_NOTICE</constant></initializer></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -55,11 +55,43 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This function returns &false; if wrong <parameter>error_level</parameter> is
specified, &true; otherwise.
&return.true.always;
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
This function throws a <classname>ValueError</classname> if
<parameter>error_level</parameter> is not one of
<constant>E_USER_ERROR</constant>, <constant>E_USER_WARNING</constant>,
<constant>E_USER_NOTICE</constant>, <constant>E_USER_DEPRECATED</constant>.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
The function now throws a <classname>ValueError</classname> if an invalid
<parameter>error_level</parameter> is specified. Previously, it returned &false;.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down
2 changes: 1 addition & 1 deletion reference/intl/intlcalendar/setdatetime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<methodparam><type>int</type><parameter>dayOfMonth</parameter></methodparam>
<methodparam><type>int</type><parameter>hour</parameter></methodparam>
<methodparam><type>int</type><parameter>minute</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>second</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>second</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Sets a date and time fields to the given value.
Expand Down
2 changes: 1 addition & 1 deletion reference/intl/intlgregoriancalendar/createfromdate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="IntlGregorianCalendar">
<modifier>public</modifier> <type>static</type><methodname>IntlGregorianCalendar::createFromDate</methodname>
<modifier>public</modifier> <modifier>static</modifier> <type>static</type><methodname>IntlGregorianCalendar::createFromDate</methodname>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>dayOfMonth</parameter></methodparam>
Expand Down
4 changes: 2 additions & 2 deletions reference/intl/intlgregoriancalendar/createfromdatetime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="IntlGregorianCalendar">
<modifier>public</modifier> <type>static</type><methodname>IntlGregorianCalendar::createFromDateTime</methodname>
<modifier>public</modifier> <modifier>static</modifier> <type>static</type><methodname>IntlGregorianCalendar::createFromDateTime</methodname>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>dayOfMonth</parameter></methodparam>
<methodparam><type>int</type><parameter>hour</parameter></methodparam>
<methodparam><type>int</type><parameter>minute</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>second</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>second</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Creates a new <classname>IntlGregorianCalendar</classname> instance from date and time.
Expand Down
4 changes: 2 additions & 2 deletions reference/json/functions/json-validate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<methodsynopsis>
<type>bool</type><methodname>json_validate</methodname>
<methodparam><type>string</type><parameter>json</parameter></methodparam>
<methodparam><type>int</type><parameter>depth</parameter><initializer>512</initializer></methodparam>
<methodparam><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>depth</parameter><initializer>512</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Returns whether the given &string; is syntactically valid JSON.
Expand Down
2 changes: 1 addition & 1 deletion reference/ldap/functions/ldap-connect-wallet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>uri</parameter><initializer>&null;</initializer></methodparam>
<methodparam><type>string</type><parameter>wallet</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>auth_mode</parameter><initializer>GSLC_SSL_NO_AUTH</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>auth_mode</parameter><initializer><constant>GSLC_SSL_NO_AUTH</constant></initializer></methodparam>
</methodsynopsis>
<para>

Expand Down
4 changes: 2 additions & 2 deletions reference/network/functions/long2ip.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.long2ip">
<refentry xml:id="function.long2ip" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>long2ip</refname>
<refpurpose>Converts a long integer address into a string in (IPv4) Internet standard dotted format</refpurpose>
Expand All @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>long2ip</methodname>
<type>string</type><methodname>long2ip</methodname>
<methodparam><type>int</type><parameter>ip</parameter></methodparam>
</methodsynopsis>
<para>
Expand Down
2 changes: 1 addition & 1 deletion reference/outcontrol/functions/ob-start.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>ob_start</methodname>
<methodparam choice="opt"><type>callable</type><parameter>callback</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>callable</type><type>null</type></type><parameter>callback</parameter><initializer>&null;</initializer></methodparam>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welp... time to add to my list to refactor this function to use the ZPP callable check...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice :)

<methodparam choice="opt"><type>int</type><parameter>chunk_size</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>PHP_OUTPUT_HANDLER_STDFLAGS</constant></initializer></methodparam>
</methodsynopsis>
Expand Down
2 changes: 1 addition & 1 deletion reference/simplexml/functions/simplexml-import-dom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type class="union"><type>SimpleXMLElement</type><type>null</type></type><methodname>simplexml_import_dom</methodname>
<methodparam><type class="union"><type>SimpleXMLElement</type><type>DOMNode</type></type><parameter>node</parameter></methodparam>
<methodparam><type>object</type><parameter>node</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>class_name</parameter><initializer>SimpleXMLElement::class</initializer></methodparam>
</methodsynopsis>
<para>
Expand Down
2 changes: 1 addition & 1 deletion reference/spl/splfixedarray/jsonserialize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="SplFixedArray">
<modifier>public</modifier> <type>mixed</type><methodname>SplFixedArray::jsonSerialize</methodname>
<modifier>public</modifier> <type>array</type><methodname>SplFixedArray::jsonSerialize</methodname>
<void/>
</methodsynopsis>
<para>
Expand Down
2 changes: 1 addition & 1 deletion reference/stream/functions/stream-context-set-options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>stream_context_set_options</methodname>
<type>true</type><methodname>stream_context_set_options</methodname>
<methodparam><type>resource</type><parameter>context</parameter></methodparam>
<methodparam><type>array</type><parameter>options</parameter></methodparam>
</methodsynopsis>
Expand Down
2 changes: 1 addition & 1 deletion reference/stream/functions/stream-context-set-params.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>stream_context_set_params</methodname>
<type>true</type><methodname>stream_context_set_params</methodname>
<methodparam><type>resource</type><parameter>context</parameter></methodparam>
<methodparam><type>array</type><parameter>params</parameter></methodparam>
</methodsynopsis>
Expand Down
2 changes: 1 addition & 1 deletion reference/zip/ziparchive/getarchiveflag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis role="ZipArchive">
<modifier>public</modifier> <type>int</type><methodname>ZipArchive::getArchiveFlag</methodname>
<methodparam><type>int</type><parameter>flag</parameter><initializer>0</initializer></methodparam>
<methodparam><type>int</type><parameter>flag</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Expand Down