Skip to content

Commit

Permalink
Sync some methodsynopses with stubs (php#3356)
Browse files Browse the repository at this point in the history
Co-authored-by: Gina Peter Banyard <girgias@php.net>
  • Loading branch information
kocsismate and Girgias authored Apr 28, 2024
1 parent d4b0e5e commit db22a7c
Show file tree
Hide file tree
Showing 17 changed files with 66 additions and 29 deletions.
4 changes: 2 additions & 2 deletions reference/fileinfo/functions/finfo-set-flags.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
&reftitle.description;
<para>&style.procedural;</para>
<methodsynopsis>
<type>bool</type><methodname>finfo_set_flags</methodname>
<type>true</type><methodname>finfo_set_flags</methodname>
<methodparam><type>finfo</type><parameter>finfo</parameter></methodparam>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -52,7 +52,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
&return.true.always;
</para>
</refsect1>

Expand Down
3 changes: 2 additions & 1 deletion reference/hash/functions/hash-file.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
An array of options for the various hashing algorithms. Currently, only the "seed" parameter is
An array of options for the various hashing algorithms.
Currently, only the <literal>"seed"</literal> parameter is
supported by the MurmurHash variants.
</para>
</listitem>
Expand Down
3 changes: 2 additions & 1 deletion reference/hash/functions/hash-init.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
An array of options for the various hashing algorithms. Currently, only the "seed" parameter is
An array of options for the various hashing algorithms.
Currently, only the <literal>"seed"</literal> parameter is
supported by the MurmurHash variants.
</para>
</listitem>
Expand Down
13 changes: 12 additions & 1 deletion reference/hash/functions/hash-pbkdf2.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" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.hash-pbkdf2">
<refentry xml:id="function.hash-pbkdf2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>hash_pbkdf2</refname>
<refpurpose>Generate a PBKDF2 key derivation of a supplied password</refpurpose>
Expand All @@ -16,6 +16,7 @@
<methodparam><type>int</type><parameter>iterations</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
</methodsynopsis>
</refsect1>

Expand Down Expand Up @@ -82,6 +83,16 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
An array of options for the various hashing algorithms.
Currently, only the <literal>"seed"</literal> key is
supported by the MurmurHash variants.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
Expand Down
5 changes: 2 additions & 3 deletions reference/hash/functions/hash-update.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>hash_update</methodname>
<type>true</type><methodname>hash_update</methodname>
<methodparam><type>HashContext</type><parameter>context</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -41,7 +41,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true;.
&return.true.always;
</para>
</refsect1>

Expand Down Expand Up @@ -82,7 +82,6 @@
</refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
3 changes: 2 additions & 1 deletion reference/hash/functions/hash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
<term><parameter>options</parameter></term>
<listitem>
<para>
An array of options for the various hashing algorithms. Currently, only the "seed" parameter is
An array of options for the various hashing algorithms.
Currently, only the <literal>"seed"</literal> parameter is
supported by the MurmurHash variants.
</para>
</listitem>
Expand Down
4 changes: 2 additions & 2 deletions reference/ldap/functions/ldap-exop-sync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<type class="union"><type>LDAP\Result</type><type>bool</type></type><methodname>ldap_exop_sync</methodname>
<methodparam><type>LDAP\Connection</type><parameter>ldap</parameter></methodparam>
<methodparam><type>string</type><parameter>request_oid</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>request_data</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>array</type><parameter>controls</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>request_data</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>controls</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">response_data</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">response_oid</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
Expand Down
2 changes: 1 addition & 1 deletion reference/mbstring/functions/mb-get-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>array</type><type>string</type><type>int</type><type>false</type></type><methodname>mb_get_info</methodname>
<type class="union"><type>array</type><type>string</type><type>int</type><type>false</type><type>null</type></type><methodname>mb_get_info</methodname>
<methodparam choice="opt"><type>string</type><parameter>type</parameter><initializer>"all"</initializer></methodparam>
</methodsynopsis>
<simpara>
Expand Down
26 changes: 24 additions & 2 deletions reference/network/functions/openlog.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>openlog</methodname>
<type>true</type><methodname>openlog</methodname>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
<methodparam><type>int</type><parameter>facility</parameter></methodparam>
Expand Down Expand Up @@ -181,10 +181,32 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
&return.true.always;
</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.2.0</entry>
<entry>
The function now always returns &true;. Previously it returned &false; on failure.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
3 changes: 2 additions & 1 deletion reference/reflection/reflectionfiber/getexecutingfile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="ReflectionFiber">
<modifier>public</modifier> <type>string</type><methodname>ReflectionFiber::getExecutingFile</methodname>
<modifier>public</modifier> <type class="union"><type>string</type><type>null</type></type><methodname>ReflectionFiber::getExecutingFile</methodname>
<void/>
</methodsynopsis>
<para>
Expand All @@ -26,6 +26,7 @@
&reftitle.returnvalues;
<para>
The full path and file name of the reflected fiber.
If the reflected fiber is used outside a user-defined function, &null; is returned.
</para>
</refsect1>

Expand Down
7 changes: 4 additions & 3 deletions reference/reflection/reflectionfiber/getexecutingline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="ReflectionFiber">
<modifier>public</modifier> <type>int</type><methodname>ReflectionFiber::getExecutingLine</methodname>
<modifier>public</modifier> <type class="union"><type>int</type><type>null</type></type><methodname>ReflectionFiber::getExecutingLine</methodname>
<void/>
</methodsynopsis>
<para>
Returns the line number of the current execution point in the reflected <classname>Fiber</classname>. If the fiber
has not been started or has terminated, an <classname>Error</classname> is thrown.
Returns the line number of the current execution point in the reflected <classname>Fiber</classname>.
If the reflected fiber is used outside a user-defined function, &null; is returned.
If the fiber has not been started or has terminated, an <classname>Error</classname> is thrown.
</para>
</refsect1>

Expand Down
2 changes: 1 addition & 1 deletion reference/sockets/functions/socket-create-listen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<methodsynopsis>
<type class="union"><type>Socket</type><type>false</type></type><methodname>socket_create_listen</methodname>
<methodparam><type>int</type><parameter>port</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer>128</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer><constant>SOMAXCONN</constant></initializer></methodparam>
</methodsynopsis>
<para>
<function>socket_create_listen</function> creates a new <classname>Socket</classname> instance of
Expand Down
6 changes: 3 additions & 3 deletions reference/uodbc/functions/odbc-autocommit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<methodsynopsis>
<type class="union"><type>int</type><type>bool</type></type><methodname>odbc_autocommit</methodname>
<methodparam><type>resource</type><parameter>odbc</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>enable</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>bool</type><type>null</type></type><parameter>enable</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Toggles autocommit behaviour.
Expand Down Expand Up @@ -47,13 +47,13 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Without the <parameter>enable</parameter> parameter, this function returns
With a &null; <parameter>enable</parameter> parameter, this function returns
auto-commit status for <parameter>odbc</parameter>. Non-zero is
returned if auto-commit is on, 0 if it is off, or &false; if an error
occurs.
</para>
<para>
If <parameter>enable</parameter> is set, this function returns &true; on
If <parameter>enable</parameter> is non-null, this function returns &true; on
success and &false; on failure.
</para>
</refsect1>
Expand Down
4 changes: 2 additions & 2 deletions reference/uodbc/functions/odbc-binmode.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>odbc_binmode</methodname>
<type>true</type><methodname>odbc_binmode</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -137,7 +137,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
&return.true.always;
</para>
</refsect1>
</refentry>
Expand Down
2 changes: 1 addition & 1 deletion reference/uodbc/functions/odbc-data-source.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>array</type><type>false</type></type><methodname>odbc_data_source</methodname>
<type class="union"><type>array</type><type>null</type><type>false</type></type><methodname>odbc_data_source</methodname>
<methodparam><type>resource</type><parameter>odbc</parameter></methodparam>
<methodparam><type>int</type><parameter>fetch_type</parameter></methodparam>
</methodsynopsis>
Expand Down
4 changes: 2 additions & 2 deletions reference/uodbc/functions/odbc-free-result.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>odbc_free_result</methodname>
<type>true</type><methodname>odbc_free_result</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
</methodsynopsis>
<para>
Expand Down Expand Up @@ -38,7 +38,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Always returns &true;.
&return.true.always;
</para>
</refsect1>
<refsect1 role="notes">
Expand Down
4 changes: 2 additions & 2 deletions reference/uodbc/functions/odbc-longreadlen.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>odbc_longreadlen</methodname>
<type>true</type><methodname>odbc_longreadlen</methodname>
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
<methodparam><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -46,7 +46,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
&return.true.always;
</para>
</refsect1>
<refsect1 role="notes">
Expand Down

0 comments on commit db22a7c

Please sign in to comment.