Make WordPress Core

Changeset 57099


Ignore:
Timestamp:
11/09/2023 09:49:41 AM (6 months ago)
Author:
SergeyBiryukov
Message:

Docs: Fix various incorrect WP-flavored array specifications.

Tags like @string or @array do not exist and are not supported. The way these were used here, also meant duplicate information being documented.

Fixed now by using the @type tag as per the WP flavor of array documentation.

Includes some fixes to the documentation formatting.

Reference: PHP Documentation Standards: Parameters That Are Arrays.

Follow-up to [33322], [42880], [42971], [44786].

Props jrf.
See #59651.

Location:
trunk/tests/phpunit/tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/wpCustomizeNavMenus.php

    r56548 r57099  
    120120     * @return array {
    121121     *     @type array {
    122      *         @string string $role             The role that will test caps for.
    123      *         @array array  $expected_results The expected results from the Ajax call.
     122     *         @type string $role             The role that will test caps for.
     123     *         @type array  $expected_results The expected results from the Ajax call.
    124124     *     }
    125125     * }
     
    192192     * @return array {
    193193     *     @type array {
    194      * @array array $post_args        The arguments that will merged with the $_POST array.
    195      * @array array $expected_results The expected results from the Ajax call.
     194     *         @type array $post_args        The arguments that will merged with the $_POST array.
     195     *         @type array $expected_results The expected results from the Ajax call.
    196196     *     }
    197197     * }
     
    516516     * @return array {
    517517     *     @type array {
    518      * @string string $role             The role that will test caps for.
    519      * @array array  $expected_results The expected results from the Ajax call.
     518     *         @type string $role             The role that will test caps for.
     519     *         @type array  $expected_results The expected results from the Ajax call.
    520520     *     }
    521521     * }
     
    611611     * @return array {
    612612     *     @type array {
    613      * @string string $post_args        The args that will be passed to Ajax.
    614      * @array array  $expected_results The expected results from the Ajax call.
     613     *         @type string $post_args        The args that will be passed to Ajax.
     614     *         @type array  $expected_results The expected results from the Ajax call.
    615615     *     }
    616616     * }
  • trunk/tests/phpunit/tests/functions/anonymization.php

    r56971 r57099  
    4242     * @return array {
    4343     *     @type array {
    44      *         @string string $raw_ip          Raw IP address.
    45      *         @string string $expected_result Expected result.
     44     *         @type string $raw_ip          Raw IP address.
     45     *         @type string $expected_result Expected result.
    4646     *     }
    4747     * }
     
    196196     * @return array {
    197197     *     @type array {
    198      *         @string string $raw_ip          Raw IP address.
    199      *         @string string $expected_result Expected result.
     198     *         @type string $raw_ip          Raw IP address.
     199     *         @type string $expected_result Expected result.
    200200     *     }
    201201     * }
  • trunk/tests/phpunit/tests/kses.php

    r56617 r57099  
    953953     * @return array {
    954954     *     @type array {
    955      *         @string string $css      A string of CSS rules.
    956      *         @string string $expected Expected string of CSS rules.
     955     *         @type string $css      A string of CSS rules.
     956     *         @type string $expected Expected string of CSS rules.
    957957     *     }
    958958     * }
     
    16151615     * @return array {
    16161616     *     @type array {
    1617      *         @string string $css      A string of CSS rules.
    1618      *         @string string $expected Expected string of CSS rules.
     1617     *         @type string $css      A string of CSS rules.
     1618     *         @type string $expected Expected string of CSS rules.
    16191619     *     }
    16201620     * }
  • trunk/tests/phpunit/tests/privacy/wpPrivacyProcessPersonalDataExportPage.php

    r55337 r57099  
    627627     * @return array {
    628628     *     @type array {
    629      *         @string string $expected_status The expected post status after calling the function.
    630      *         @string string $response_page   The exporter page to pass. Options are 'first' and 'last'. Default 'first'.
    631      *         @string string $exporter_index  The exporter index to pass. Options are 'first' and 'last'. Default 'first'.
    632      *         @string string $page_index      The page index to pass. Options are 'first' and 'last'. Default 'first'.
    633      *         @bool  bool   $send_as_email   If the response should be sent as an email.
    634      *         @string string $exporter_key    The slug (key) of the exporter to pass.
     629     *         @type string $expected_status The expected post status after calling the function.
     630     *         @type string $response_page   The exporter page to pass. Options are 'first' and 'last'. Default 'first'.
     631     *         @type string $exporter_index  The exporter index to pass. Options are 'first' and 'last'. Default 'first'.
     632     *         @type string $page_index      The page index to pass. Options are 'first' and 'last'. Default 'first'.
     633     *         @type bool   $send_as_email   If the response should be sent as an email.
     634     *         @type string $exporter_key    The slug (key) of the exporter to pass.
    635635     *     }
    636636     * }
Note: See TracChangeset for help on using the changeset viewer.