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: [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#1-1-parameters-that-are-arrays PHP Documentation Standards: Parameters That Are Arrays].

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

Props jrf.
See #59651.

git-svn-id: https://develop.svn.wordpress.org/trunk@57099 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2023-11-09 09:49:41 +00:00
parent 2bf4a27d5a
commit 7287ff5263
4 changed files with 22 additions and 22 deletions

View File

@ -119,8 +119,8 @@ class Tests_Ajax_wpCustomizeNavMenus extends WP_Ajax_UnitTestCase {
*
* @return array {
* @type array {
* @string string $role The role that will test caps for.
* @array array $expected_results The expected results from the Ajax call.
* @type string $role The role that will test caps for.
* @type array $expected_results The expected results from the Ajax call.
* }
* }
*/
@ -191,8 +191,8 @@ class Tests_Ajax_wpCustomizeNavMenus extends WP_Ajax_UnitTestCase {
*
* @return array {
* @type array {
* @array array $post_args The arguments that will merged with the $_POST array.
* @array array $expected_results The expected results from the Ajax call.
* @type array $post_args The arguments that will merged with the $_POST array.
* @type array $expected_results The expected results from the Ajax call.
* }
* }
*/
@ -515,8 +515,8 @@ class Tests_Ajax_wpCustomizeNavMenus extends WP_Ajax_UnitTestCase {
*
* @return array {
* @type array {
* @string string $role The role that will test caps for.
* @array array $expected_results The expected results from the Ajax call.
* @type string $role The role that will test caps for.
* @type array $expected_results The expected results from the Ajax call.
* }
* }
*/
@ -610,8 +610,8 @@ class Tests_Ajax_wpCustomizeNavMenus extends WP_Ajax_UnitTestCase {
*
* @return array {
* @type array {
* @string string $post_args The args that will be passed to Ajax.
* @array array $expected_results The expected results from the Ajax call.
* @type string $post_args The args that will be passed to Ajax.
* @type array $expected_results The expected results from the Ajax call.
* }
* }
*/

View File

@ -41,8 +41,8 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase {
*
* @return array {
* @type array {
* @string string $raw_ip Raw IP address.
* @string string $expected_result Expected result.
* @type string $raw_ip Raw IP address.
* @type string $expected_result Expected result.
* }
* }
*/
@ -195,8 +195,8 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase {
*
* @return array {
* @type array {
* @string string $raw_ip Raw IP address.
* @string string $expected_result Expected result.
* @type string $raw_ip Raw IP address.
* @type string $expected_result Expected result.
* }
* }
*/

View File

@ -952,8 +952,8 @@ EOF;
*
* @return array {
* @type array {
* @string string $css A string of CSS rules.
* @string string $expected Expected string of CSS rules.
* @type string $css A string of CSS rules.
* @type string $expected Expected string of CSS rules.
* }
* }
*/
@ -1614,8 +1614,8 @@ EOF;
*
* @return array {
* @type array {
* @string string $css A string of CSS rules.
* @string string $expected Expected string of CSS rules.
* @type string $css A string of CSS rules.
* @type string $expected Expected string of CSS rules.
* }
* }
*/

View File

@ -626,12 +626,12 @@ class Tests_Privacy_wpPrivacyProcessPersonalDataExportPage extends WP_UnitTestCa
*
* @return array {
* @type array {
* @string string $expected_status The expected post status after calling the function.
* @string string $response_page The exporter page to pass. Options are 'first' and 'last'. Default 'first'.
* @string string $exporter_index The exporter index to pass. Options are 'first' and 'last'. Default 'first'.
* @string string $page_index The page index to pass. Options are 'first' and 'last'. Default 'first'.
* @bool bool $send_as_email If the response should be sent as an email.
* @string string $exporter_key The slug (key) of the exporter to pass.
* @type string $expected_status The expected post status after calling the function.
* @type string $response_page The exporter page to pass. Options are 'first' and 'last'. Default 'first'.
* @type string $exporter_index The exporter index to pass. Options are 'first' and 'last'. Default 'first'.
* @type string $page_index The page index to pass. Options are 'first' and 'last'. Default 'first'.
* @type bool $send_as_email If the response should be sent as an email.
* @type string $exporter_key The slug (key) of the exporter to pass.
* }
* }
*/