From 095bfabfa9c226871befb2f99d9063b40f648dcc Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 1 Dec 2014 02:16:36 +0000 Subject: [PATCH] Improve various `@param` docs. See #30224. git-svn-id: https://develop.svn.wordpress.org/trunk@30682 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-filesystem-direct.php | 2 +- src/wp-admin/includes/class-wp-filesystem-ftpext.php | 2 +- src/wp-admin/includes/class-wp-filesystem-ssh2.php | 10 +++++----- src/wp-includes/general-template.php | 2 +- src/wp-includes/query.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-direct.php b/src/wp-admin/includes/class-wp-filesystem-direct.php index 7e23b46b0e..389325442c 100644 --- a/src/wp-admin/includes/class-wp-filesystem-direct.php +++ b/src/wp-admin/includes/class-wp-filesystem-direct.php @@ -202,7 +202,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { /** * @param string $file - * @return string + * @return string|false */ public function group($file) { $gid = @filegroup($file); diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php index a3a5ef6a3f..90e3de0274 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -123,7 +123,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { /** * @param string $file * @param string $contents - * @param bool|string $mode + * @param bool|int $mode * @return bool */ public function put_contents($file, $contents, $mode = false ) { diff --git a/src/wp-admin/includes/class-wp-filesystem-ssh2.php b/src/wp-admin/includes/class-wp-filesystem-ssh2.php index 85b71343e4..dbfe707132 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/src/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -169,7 +169,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { /** * @param string $file * @param string $contents - * @param int $mode + * @param bool|int $mode * @return bool */ public function put_contents($file, $contents, $mode = false ) { @@ -200,7 +200,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { /** * @param string $file - * @param bool $group + * @param string $group * @param bool $recursive */ public function chgrp($file, $group, $recursive = false ) { @@ -240,9 +240,9 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { * * @since Unknown * - * @param string $file Path to the file. - * @param bool $owner A user name or number. - * @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False. + * @param string $file Path to the file. + * @param string|int $owner A user name or number. + * @param bool $recursive Optional. If set True changes file owner recursivly. Defaults to False. * @return bool|string Returns true on success or false on failure. */ public function chown( $file, $owner, $recursive = false ) { diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 034135d09a..e789013c48 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -2014,7 +2014,7 @@ function get_the_time( $d = '', $post = null ) { * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. * @param int|WP_Post $post WP_Post object or ID. Default is global $post object. * @param bool $translate Whether to translate the time string. Default false. - * @return false|string Formatted date string or Unix timestamp. False on failure. + * @return false|string|int Formatted date string or Unix timestamp. False on failure. */ function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) { $post = get_post($post); diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index 1279471259..bd2ebc11f6 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -176,7 +176,7 @@ function is_post_type_archive( $post_types = '' ) { * @since 2.0.0 * @uses $wp_query * - * @param int|string|array $attachment Attachment ID, title, slug, or array of such. + * @param int|string|array|object $attachment Attachment ID, title, slug, or array of such. * @return bool */ function is_attachment( $attachment = '' ) {