Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Docblock fixes

  • Loading branch information...
commit b992c6f38c1dfdc3e19e780e8e16f4e00820f48d 1 parent 1112aef
@mtdowling mtdowling authored
View
19 src/Guzzle/Common/Collection.php
@@ -160,7 +160,7 @@ public function get($key, $default = null, $match = self::MATCH_EXACT)
*
* @param array|string|int $keys (optional) Pass an array of keys to
* retrieve only a particular subset of kvp.
- * @param int $match (optional) Bitwise key match setting:
+ * @param int $match (optional) Key match setting:
* 0 - Exact match
* 1 - Case insensitive match
* 2 - Regular expression match
@@ -325,7 +325,9 @@ public function merge($data)
/**
* ArrayAccess implementation of offsetExists()
*
- * @see hasKey()
+ * @param string $offset Array key
+ *
+ * @return bool
*/
public function offsetExists($offset)
{
@@ -335,7 +337,9 @@ public function offsetExists($offset)
/**
* ArrayAccess implementation of offsetGet()
*
- * @see get()
+ * @param string $offset Array key
+ *
+ * @return null|mixed
*/
public function offsetGet($offset)
{
@@ -345,21 +349,22 @@ public function offsetGet($offset)
/**
* ArrayAccess implementation of offsetGet()
*
- * @see set()
+ * @param string $offset Array key
+ * @param mixed $value Value to set
*/
public function offsetSet($offset, $value)
{
- return $this->set($offset, $value);
+ $this->set($offset, $value);
}
/**
* ArrayAccess implementation of offsetUnset()
*
- * @see remove()
+ * @param string $offset Array key
*/
public function offsetUnset($offset)
{
- return $this->remove($offset);
+ $this->remove($offset);
}
/**
View
8 src/Guzzle/Service/Client.php
@@ -24,7 +24,7 @@ class Client extends HttpClient implements ClientInterface
* Basic factory method to create a new client. Extend this method in
* subclasses to build more complex clients.
*
- * @param array|Collection $config (optiona) Configuartion data
+ * @param array|Collection $config (optional) Configuartion data
*
* @return Client
*/
@@ -56,7 +56,7 @@ public static function getAllEvents()
* @param array $args (optional) Arguments to pass to the command
*
* @return CommandInterface
- * @throws InvalidArgumentException if no command can be found by name
+ * @throws \InvalidArgumentException if no command can be found by name
*/
public function getCommand($name, array $args = array())
{
@@ -107,7 +107,7 @@ public function getCommand($name, array $args = array())
* @return mixed Returns the result of the executed command's
* {@see CommandInterface::getResult} method if a CommandInterface is
* passed, or the CommandSet itself if a CommandSet is passed
- * @throws InvalidArgumentException if an invalid command is passed
+ * @throws \InvalidArgumentException if an invalid command is passed
* @throws Command\CommandSetException if a set contains commands associated
* with other clients
*/
@@ -144,7 +144,7 @@ public function execute($command)
/**
* Set the service description of the client
*
- * @param ServiceDescription $description Service description that describes
+ * @param ServiceDescription $service Service description that describes
* all of the commands and information of the client
*
* @return Client
View
8 src/Guzzle/Service/ClientInterface.php
@@ -18,7 +18,7 @@
* Basic factory method to create a new client. Extend this method in
* subclasses to build more complex clients.
*
- * @param array|Collection $config (optiona) Configuartion data
+ * @param array|Collection $config (optional) Configuartion data
*
* @return ClientInterface
*/
@@ -35,7 +35,7 @@ static function factory($config);
* @param array $args (optional) Arguments to pass to the command
*
* @return CommandInterface
- * @throws InvalidArgumentException if no command can be found by name
+ * @throws \InvalidArgumentException if no command can be found by name
*/
function getCommand($name, array $args = array());
@@ -47,7 +47,7 @@ function getCommand($name, array $args = array());
* @return mixed Returns the result of the executed command's
* {@see CommandInterface::getResult} method if a CommandInterface is
* passed, or the CommandSet itself if a CommandSet is passed
- * @throws InvalidArgumentException if an invalid command is passed
+ * @throws \InvalidArgumentException if an invalid command is passed
* @throws Command\CommandSetException if a set contains commands associated
* with other clients
*/
@@ -56,7 +56,7 @@ function execute($command);
/**
* Set the service description of the client
*
- * @param ServiceDescription $description Service description that describes
+ * @param ServiceDescription $service Service description that describes
* all of the commands and information of the client
*
* @return ClientInterface
View
17 src/Guzzle/Service/Inspector.php
@@ -32,7 +32,7 @@ class Inspector
const GUZZLE_ANNOTATION = '@guzzle';
/**
- * @var Cached Inspector instance
+ * @var Inspector Cached Inspector instance
*/
private static $instance;
@@ -86,7 +86,7 @@ public function __construct()
/**
* Get an instance of the Inspector
*
- * @return Reflection
+ * @return Inspector
*/
public static function getInstance()
{
@@ -107,7 +107,7 @@ public static function getInstance()
* @param array $required (optional) Required parameter names
*
* @return Collection
- * @throws InvalidArgumentException if a parameter is missing
+ * @throws \InvalidArgumentException if a parameter is missing
*/
public static function prepareConfig(array $config = null, $defaults = null, $required = null)
{
@@ -129,7 +129,7 @@ public static function prepareConfig(array $config = null, $defaults = null, $re
/**
* Set the validator to use with the inspector
*
- * @param Validator $validator
+ * @param Validator $validator Validator to use with the Inspector
*
* @return Inspector
*/
@@ -224,13 +224,12 @@ public function parseDocBlock($doc)
/**
* Validates that a class has all of the required configuration settings
*
- * @param string $class Name of the class to use to retrieve args
+ * @param string $className Name of the class to use to retrieve args
* @param Collection $config Configuration settings
* @param bool $strict (optional) Set to FALSE to allow missing required fields
*
* @return array|bool Returns an array of errors or TRUE on success
- *
- * @throws InvalidArgumentException if any args are missing and $strict is TRUE
+ * @throws \InvalidArgumentException if any args are missing and $strict is TRUE
*/
public function validateClass($className, Collection $config, $strict = true)
{
@@ -254,7 +253,7 @@ public function validateClass($className, Collection $config, $strict = true)
*
* @return array|bool Returns an array of errors or TRUE on success
*
- * @throws InvalidArgumentException if any args are missing and $strict is TRUE
+ * @throws \InvalidArgumentException if any args are missing and $strict is TRUE
*/
public function validateConfig(array $params, Collection $config, $strict = true)
{
@@ -335,7 +334,7 @@ public function validateConfig(array $params, Collection $config, $strict = true
*
* @param string $name Name of the constraint to retrieve
*
- * @return Contraint
+ * @return Constraint
*/
public function getConstraint($name)
{
View
15 src/Guzzle/Service/ResourceIteratorApplyBatched.php
@@ -10,7 +10,7 @@
class ResourceIteratorApplyBatched extends AbstractHasDispatcher
{
/**
- * @var function|array
+ * @var \Closure|array
*/
protected $callback;
@@ -46,7 +46,7 @@ public static function getAllEvents()
* Constructor
*
* @param ResourceIterator $iterator Resource iterator to apply a callback to
- * @param array|function $callback Callback method accepting the resource
+ * @param array|\Closure $callback Callback method accepting the resource
* iterator and an array of the iterator's current resources
*/
public function __construct(ResourceIterator $iterator, $callback)
@@ -59,13 +59,14 @@ public function __construct(ResourceIterator $iterator, $callback)
* Apply the callback to the contents of the resource iterator
*
* Calling this method dispatches four events:
+ * before_apply -- Before adding a resource to a batch. Context is the resource
+ * after_apply -- After adding the resource to a batch. Context is the resource
+ * before_batch -- Before a batch request is sent if one is sent. Context is an array of resources
+ * after_batch -- After a batch request is sent if one is sent. Context is an array of resources
*
- * # before_apply -- Before adding a resource to a batch. Context is the resource
- * # after_apply -- After adding the resource to a batch. Context is the resource
- * # before_batch -- Before a batch request is sent if one is sent. Context is an array of resources
- * # after_batch -- After a batch request is sent if one is sent. Context is an array of resources
+ * @param int $perBatch (optional) The number of records to batch before executing the callback
*
- * @return integer Returns the number of resources iterated
+ * @return int Returns the number of resources iterated
*/
public function apply($perBatch = 20)
{
View
10 src/Guzzle/Service/ServiceBuilder.php
@@ -22,7 +22,7 @@ class ServiceBuilder implements \ArrayAccess
* Create a new ServiceBuilder using configuration data sourced from an
* array, .json|.js file, SimpleXMLElement, or .xml file.
*
- * @param array|string|SimpleXMLElement $data An instantiated
+ * @param array|string|\SimpleXMLElement $data An instantiated
* SimpleXMLElement containing configuration data, the full path to an
* .xml or .js|.json file, or an associative array of data
* @param string $extension (optional) When passing a string of data to load
@@ -31,8 +31,8 @@ class ServiceBuilder implements \ArrayAccess
* js, json)
*
* @return ServiceBuilder
- * @throws RuntimeException if a file cannot be openend
- * @throws LogicException when trying to extend a missing client
+ * @throws \RuntimeException if a file cannot be openend
+ * @throws \LogicException when trying to extend a missing client
*/
public static function factory($data, $extension = null)
{
@@ -114,12 +114,12 @@ public function __sleep()
/**
* Get a client using a registered builder
*
- * @param $name Name of the registered client to retrieve
+ * @param string $name Name of the registered client to retrieve
* @param bool $throwAway (optional) Set to TRUE to not store the client
* for later retrieval from the ServiceBuilder
*
* @return ClientInterface
- * @throws InvalidArgumentException when a client cannot be found by name
+ * @throws \InvalidArgumentException when a client cannot be found by name
*/
public function get($name, $throwAway = false)
{
Please sign in to comment.
Something went wrong with that request. Please try again.