Docs: Remove @access notations from method DocBlocks in wp-includes/* classes.

Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.


git-svn-id: https://develop.svn.wordpress.org/trunk@41162 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes
2017-07-27 00:40:27 +00:00
parent 829139ba1a
commit b4d81bd654
135 changed files with 2 additions and 1906 deletions
@@ -32,7 +32,6 @@ class WP_REST_Request implements ArrayAccess {
* HTTP method.
*
* @since 4.4.0
* @access protected
* @var string
*/
protected $method = '';
@@ -44,7 +43,6 @@ class WP_REST_Request implements ArrayAccess {
* superglobals when being created from the global scope.
*
* @since 4.4.0
* @access protected
* @var array Contains GET, POST and FILES keys mapping to arrays of data.
*/
protected $params;
@@ -53,7 +51,6 @@ class WP_REST_Request implements ArrayAccess {
* HTTP headers for the request.
*
* @since 4.4.0
* @access protected
* @var array Map of key to value. Key is always lowercase, as per HTTP specification.
*/
protected $headers = array();
@@ -62,7 +59,6 @@ class WP_REST_Request implements ArrayAccess {
* Body data.
*
* @since 4.4.0
* @access protected
* @var string Binary data from the request.
*/
protected $body = null;
@@ -71,7 +67,6 @@ class WP_REST_Request implements ArrayAccess {
* Route matched for the request.
*
* @since 4.4.0
* @access protected
* @var string
*/
protected $route;
@@ -83,7 +78,6 @@ class WP_REST_Request implements ArrayAccess {
* containing the callback as well as the valid methods for the route.
*
* @since 4.4.0
* @access protected
* @var array Attributes for the request.
*/
protected $attributes = array();
@@ -94,7 +88,6 @@ class WP_REST_Request implements ArrayAccess {
* Allows lazy-parsing of JSON data where possible.
*
* @since 4.4.0
* @access protected
* @var bool
*/
protected $parsed_json = false;
@@ -103,7 +96,6 @@ class WP_REST_Request implements ArrayAccess {
* Used to determine if the body data has been parsed yet.
*
* @since 4.4.0
* @access protected
* @var bool
*/
protected $parsed_body = false;
@@ -112,7 +104,6 @@ class WP_REST_Request implements ArrayAccess {
* Constructor.
*
* @since 4.4.0
* @access public
*
* @param string $method Optional. Request method. Default empty.
* @param string $route Optional. Request route. Default empty.
@@ -140,7 +131,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves the HTTP method for the request.
*
* @since 4.4.0
* @access public
*
* @return string HTTP method.
*/
@@ -152,7 +142,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets HTTP method for the request.
*
* @since 4.4.0
* @access public
*
* @param string $method HTTP method.
*/
@@ -164,7 +153,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves all headers from the request.
*
* @since 4.4.0
* @access public
*
* @return array Map of key to value. Key is always lowercase, as per HTTP specification.
*/
@@ -186,7 +174,6 @@ class WP_REST_Request implements ArrayAccess {
* @link https://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers
*
* @since 4.4.0
* @access public
* @static
*
* @param string $key Header name.
@@ -207,7 +194,6 @@ class WP_REST_Request implements ArrayAccess {
* (notably cookie headers) cannot be joined this way.
*
* @since 4.4.0
* @access public
*
* @param string $key Header name, will be canonicalized to lowercase.
* @return string|null String value if set, null otherwise.
@@ -226,7 +212,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves header values from the request.
*
* @since 4.4.0
* @access public
*
* @param string $key Header name, will be canonicalized to lowercase.
* @return array|null List of string values if set, null otherwise.
@@ -245,7 +230,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets the header on request.
*
* @since 4.4.0
* @access public
*
* @param string $key Header name.
* @param string $value Header value, or list of values.
@@ -261,7 +245,6 @@ class WP_REST_Request implements ArrayAccess {
* Appends a header value for the given header.
*
* @since 4.4.0
* @access public
*
* @param string $key Header name.
* @param string $value Header value, or list of values.
@@ -281,7 +264,6 @@ class WP_REST_Request implements ArrayAccess {
* Removes all values for a header.
*
* @since 4.4.0
* @access public
*
* @param string $key Header name.
*/
@@ -294,7 +276,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets headers on the request.
*
* @since 4.4.0
* @access public
*
* @param array $headers Map of header name to value.
* @param bool $override If true, replace the request's headers. Otherwise, merge with existing.
@@ -313,7 +294,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves the content-type of the request.
*
* @since 4.4.0
* @access public
*
* @return array Map containing 'value' and 'parameters' keys.
*/
@@ -348,7 +328,6 @@ class WP_REST_Request implements ArrayAccess {
* Used when checking parameters in get_param().
*
* @since 4.4.0
* @access protected
*
* @return array List of types to check, in order of priority.
*/
@@ -400,7 +379,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves a parameter from the request.
*
* @since 4.4.0
* @access public
*
* @param string $key Parameter name.
* @return mixed|null Value if set, null otherwise.
@@ -422,7 +400,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets a parameter on the request.
*
* @since 4.4.0
* @access public
*
* @param string $key Parameter name.
* @param mixed $value Parameter value.
@@ -439,7 +416,6 @@ class WP_REST_Request implements ArrayAccess {
* Handles merging all the available values into a single array.
*
* @since 4.4.0
* @access public
*
* @return array Map of key to value.
*/
@@ -465,7 +441,6 @@ class WP_REST_Request implements ArrayAccess {
* These are parsed from the URL using the regex.
*
* @since 4.4.0
* @access public
*
* @return array Parameter map of key to value.
*/
@@ -479,7 +454,6 @@ class WP_REST_Request implements ArrayAccess {
* Typically, this is set after parsing the URL.
*
* @since 4.4.0
* @access public
*
* @param array $params Parameter map of key to value.
*/
@@ -493,7 +467,6 @@ class WP_REST_Request implements ArrayAccess {
* These are the parameters you'd typically find in `$_GET`.
*
* @since 4.4.0
* @access public
*
* @return array Parameter map of key to value
*/
@@ -507,7 +480,6 @@ class WP_REST_Request implements ArrayAccess {
* Typically, this is set from `$_GET`.
*
* @since 4.4.0
* @access public
*
* @param array $params Parameter map of key to value.
*/
@@ -521,7 +493,6 @@ class WP_REST_Request implements ArrayAccess {
* These are the parameters you'd typically find in `$_POST`.
*
* @since 4.4.0
* @access public
*
* @return array Parameter map of key to value.
*/
@@ -535,7 +506,6 @@ class WP_REST_Request implements ArrayAccess {
* Typically, this is set from `$_POST`.
*
* @since 4.4.0
* @access public
*
* @param array $params Parameter map of key to value.
*/
@@ -549,7 +519,6 @@ class WP_REST_Request implements ArrayAccess {
* These are the parameters you'd typically find in `$_FILES`.
*
* @since 4.4.0
* @access public
*
* @return array Parameter map of key to value
*/
@@ -563,7 +532,6 @@ class WP_REST_Request implements ArrayAccess {
* Typically, this is set from `$_FILES`.
*
* @since 4.4.0
* @access public
*
* @param array $params Parameter map of key to value.
*/
@@ -577,7 +545,6 @@ class WP_REST_Request implements ArrayAccess {
* These are the parameters set in the route registration.
*
* @since 4.4.0
* @access public
*
* @return array Parameter map of key to value
*/
@@ -591,7 +558,6 @@ class WP_REST_Request implements ArrayAccess {
* These are the parameters set in the route registration.
*
* @since 4.4.0
* @access public
*
* @param array $params Parameter map of key to value.
*/
@@ -603,7 +569,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves the request body content.
*
* @since 4.4.0
* @access public
*
* @return string Binary data from the request body.
*/
@@ -615,7 +580,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets body content.
*
* @since 4.4.0
* @access public
*
* @param string $data Binary data from the request body.
*/
@@ -632,7 +596,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves the parameters from a JSON-formatted body.
*
* @since 4.4.0
* @access public
*
* @return array Parameter map of key to value.
*/
@@ -650,7 +613,6 @@ class WP_REST_Request implements ArrayAccess {
*
* @since 4.4.0
* @since 4.7.0 Returns error instance if value cannot be decoded.
* @access protected
* @return true|WP_Error True if the JSON data was passed or no JSON data was provided, WP_Error if invalid JSON was passed.
*/
protected function parse_json_params() {
@@ -706,7 +668,6 @@ class WP_REST_Request implements ArrayAccess {
* natively by PHP. In PHP 5.x, only POST has these parsed automatically.
*
* @since 4.4.0
* @access protected
*/
protected function parse_body_params() {
if ( $this->parsed_body ) {
@@ -747,7 +708,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves the route that matched the request.
*
* @since 4.4.0
* @access public
*
* @return string Route matching regex.
*/
@@ -759,7 +719,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets the route that matched the request.
*
* @since 4.4.0
* @access public
*
* @param string $route Route matching regex.
*/
@@ -773,7 +732,6 @@ class WP_REST_Request implements ArrayAccess {
* These are the options for the route that was matched.
*
* @since 4.4.0
* @access public
*
* @return array Attributes for the request.
*/
@@ -785,7 +743,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets the attributes for the request.
*
* @since 4.4.0
* @access public
*
* @param array $attributes Attributes for the request.
*/
@@ -800,7 +757,6 @@ class WP_REST_Request implements ArrayAccess {
* argument.
*
* @since 4.4.0
* @access public
*
* @return true|WP_Error True if parameters were sanitized, WP_Error if an error occurred during sanitization.
*/
@@ -856,7 +812,6 @@ class WP_REST_Request implements ArrayAccess {
* Checks whether this request is valid according to its attributes.
*
* @since 4.4.0
* @access public
*
* @return bool|WP_Error True if there are no parameters to validate or if all pass validation,
* WP_Error if required parameters are missing.
@@ -924,7 +879,6 @@ class WP_REST_Request implements ArrayAccess {
* Checks if a parameter is set.
*
* @since 4.4.0
* @access public
*
* @param string $offset Parameter name.
* @return bool Whether the parameter is set.
@@ -945,7 +899,6 @@ class WP_REST_Request implements ArrayAccess {
* Retrieves a parameter from the request.
*
* @since 4.4.0
* @access public
*
* @param string $offset Parameter name.
* @return mixed|null Value if set, null otherwise.
@@ -958,7 +911,6 @@ class WP_REST_Request implements ArrayAccess {
* Sets a parameter on the request.
*
* @since 4.4.0
* @access public
*
* @param string $offset Parameter name.
* @param mixed $value Parameter value.
@@ -971,7 +923,6 @@ class WP_REST_Request implements ArrayAccess {
* Removes a parameter from the request.
*
* @since 4.4.0
* @access public
*
* @param string $offset Parameter name.
*/
@@ -989,7 +940,6 @@ class WP_REST_Request implements ArrayAccess {
*
* @static
* @since 4.5.0
* @access public
*
* @param string $url URL with protocol, domain, path and query args.
* @return WP_REST_Request|false WP_REST_Request object on success, false on failure.