Spellcheck

This commit is contained in:
PJ Dietz 2015-06-04 19:18:11 -04:00
parent 6f33eab90b
commit 6a1f0c2915
14 changed files with 26 additions and 26 deletions

View File

@ -6,13 +6,13 @@ use ArrayAccess;
use Iterator; use Iterator;
/** /**
* HeaderCollection provides case-insenstive access to lists of header values. * HeaderCollection provides case-insensitive access to lists of header values.
* *
* This class is an internal class used by Message and is not intended for * This class is an internal class used by Message and is not intended for
* direct use by consumers. * direct use by consumers.
* *
* HeaderCollection preserves the cases of keys as they are set, but treats key * HeaderCollection preserves the cases of keys as they are set, but treats key
* access case insesitively. * access case insensitively.
* *
* Any values added to HeaderCollection are added to list arrays. Subsequent * Any values added to HeaderCollection are added to list arrays. Subsequent
* calls to add a value for a given key will append the new value to the list * calls to add a value for a given key will append the new value to the list
@ -37,7 +37,7 @@ class HeaderCollection implements ArrayAccess, Iterator
/** /**
* @var string[] * @var string[]
* *
* List arrary of lowercase header names. * List array of lowercase header names.
*/ */
private $keys; private $keys;
@ -104,7 +104,7 @@ class HeaderCollection implements ArrayAccess, Iterator
$normalized = strtolower($offset); $normalized = strtolower($offset);
unset($this->fields[$normalized]); unset($this->fields[$normalized]);
unset($this->values[$normalized]); unset($this->values[$normalized]);
// Remove and renormalize the list of keys. // Remove and normalize the list of keys.
if (($key = array_search($normalized, $this->keys)) !== false) { if (($key = array_search($normalized, $this->keys)) !== false) {
unset($this->keys[$key]); unset($this->keys[$key]);
$this->keys = array_values($this->keys); $this->keys = array_values($this->keys);

View File

@ -15,7 +15,7 @@ abstract class Message implements MessageInterface
/** @var StreamInterface */ /** @var StreamInterface */
protected $body; protected $body;
/** @var string */ /** @var string */
protected $protcolVersion = "1.1"; protected $protocolVersion = "1.1";
/** /**
* Create a new Message, optionally with headers and a body. * Create a new Message, optionally with headers and a body.
@ -67,7 +67,7 @@ abstract class Message implements MessageInterface
*/ */
public function getProtocolVersion() public function getProtocolVersion()
{ {
return $this->protcolVersion; return $this->protocolVersion;
} }
/** /**
@ -82,7 +82,7 @@ abstract class Message implements MessageInterface
public function withProtocolVersion($version) public function withProtocolVersion($version)
{ {
$message = clone $this; $message = clone $this;
$message->protcolVersion = $version; $message->protocolVersion = $version;
return $message; return $message;
} }

View File

@ -5,7 +5,7 @@ namespace WellRESTed\Message;
use Psr\Http\Message\StreamInterface; use Psr\Http\Message\StreamInterface;
/** /**
* NullStream is a minimal, always-empty, non-writeable stream. * NullStream is a minimal, always-empty, non-writable stream.
* *
* Use this for messages with no body. * Use this for messages with no body.
*/ */
@ -105,7 +105,7 @@ class NullStream implements StreamInterface
*/ */
public function rewind() public function rewind()
{ {
throw new \RuntimeException("Unable to rewind srream."); throw new \RuntimeException("Unable to rewind stream.");
} }
/** /**

View File

@ -55,7 +55,7 @@ class ServerRequest extends Request implements ServerRequestInterface
* Creates a new, empty representation of a server-side HTTP request. * Creates a new, empty representation of a server-side HTTP request.
* *
* To obtain a ServerRequest representing the request sent to the server * To obtain a ServerRequest representing the request sent to the server
* instantiaing the request, use the factory method * instantiating the request, use the factory method
* ServerRequest::getServerRequest * ServerRequest::getServerRequest
* *
* @see ServerRequest::getServerRequest * @see ServerRequest::getServerRequest
@ -349,7 +349,7 @@ class ServerRequest extends Request implements ServerRequestInterface
} }
if (isset($_SERVER["SERVER_PROTOCOL"]) && $_SERVER["SERVER_PROTOCOL"] === "HTTP/1.0") { if (isset($_SERVER["SERVER_PROTOCOL"]) && $_SERVER["SERVER_PROTOCOL"] === "HTTP/1.0") {
// The default is 1.1, so only update if 1.0 // The default is 1.1, so only update if 1.0
$this->protcolVersion = "1.0"; $this->protocolVersion = "1.0";
} }
if (isset($_SERVER["REQUEST_METHOD"])) { if (isset($_SERVER["REQUEST_METHOD"])) {
$this->method = $_SERVER["REQUEST_METHOD"]; $this->method = $_SERVER["REQUEST_METHOD"];

View File

@ -23,7 +23,7 @@ class UploadedFile implements UploadedFileInterface
* provided by $_FILES. For example, given this structure for $_FILES: * provided by $_FILES. For example, given this structure for $_FILES:
* *
* array( * array(
* 'avatar' => arrary( * 'avatar' => array(
* 'name' => 'my-avatar.png', * 'name' => 'my-avatar.png',
* 'type' => 'image/png', * 'type' => 'image/png',
* 'size' => 90996, * 'size' => 90996,

View File

@ -521,7 +521,7 @@ class Uri implements UriInterface
* Return a percent-encoded string. * Return a percent-encoded string.
* *
* This method encode each character that is not: * This method encode each character that is not:
* - A precent sign ("%") that is followed by a hex character (0-9, a-f, A-F) * - A percent sign ("%") that is followed by a hex character (0-9, a-f, A-F)
* - An "unreserved character" per RFC 3986 (see below) * - An "unreserved character" per RFC 3986 (see below)
* - A "reserved character" per RFC 3986 (see below) * - A "reserved character" per RFC 3986 (see below)
* *

View File

@ -35,7 +35,7 @@ class MethodMap implements MethodMapInterface
* - A string containing the fully qualified class name of a class * - A string containing the fully qualified class name of a class
* implementing MiddlewareInterface * implementing MiddlewareInterface
* - A callable that returns an instance implementing MiddleInterface * - A callable that returns an instance implementing MiddleInterface
* - A callable maching the signature of MiddlewareInteraface::dispatch * - A callable matching the signature of MiddlewareInterface::dispatch
* @see DispatchedInterface::dispatch * @see DispatchedInterface::dispatch
* *
* $middleware may also be null, in which case any previously set * $middleware may also be null, in which case any previously set

View File

@ -37,7 +37,7 @@ interface MethodMapInterface extends MiddlewareInterface
* - A string containing the fully qualified class name of a class * - A string containing the fully qualified class name of a class
* implementing MiddlewareInterface * implementing MiddlewareInterface
* - A callable that returns an instance implementing MiddleInterface * - A callable that returns an instance implementing MiddleInterface
* - A callable maching the signature of MiddlewareInteraface::dispatch * - A callable matching the signature of MiddlewareInterface::dispatch
* @see DispatcherInterface::dispatch * @see DispatcherInterface::dispatch
* *
* @param string $method * @param string $method

View File

@ -23,7 +23,7 @@ class RouteFactory implements RouteFactoryInterface
* - Target with no special characters will create StaticRoutes * - Target with no special characters will create StaticRoutes
* - Target ending with * will create PrefixRoutes * - Target ending with * will create PrefixRoutes
* - Target containing URI variables (e.g., {id}) will create TemplateRoutes * - Target containing URI variables (e.g., {id}) will create TemplateRoutes
* - Regular exressions will create RegexRoutes * - Regular expressions will create RegexRoutes
* *
* @param string $target Route target or target pattern * @param string $target Route target or target pattern
* @return RouteInterface * @return RouteInterface
@ -39,7 +39,7 @@ class RouteFactory implements RouteFactoryInterface
return new PrefixRoute($target, new MethodMap($this->dispatcher)); return new PrefixRoute($target, new MethodMap($this->dispatcher));
} }
// TempalateRoutes contain {variable} // TemplateRoutes contain {variable}
if (preg_match(TemplateRoute::URI_TEMPLATE_EXPRESSION_RE, $target)) { if (preg_match(TemplateRoute::URI_TEMPLATE_EXPRESSION_RE, $target)) {
return new TemplateRoute($target, new MethodMap($this->dispatcher)); return new TemplateRoute($target, new MethodMap($this->dispatcher));
} }

View File

@ -10,7 +10,7 @@ interface RouteFactoryInterface
* - Targets with no special characters will create StaticRoutes * - Targets with no special characters will create StaticRoutes
* - Targets ending with * will create PrefixRoutes * - Targets ending with * will create PrefixRoutes
* - Targets containing URI variables (e.g., {id}) will create TemplateRoutes * - Targets containing URI variables (e.g., {id}) will create TemplateRoutes
* - Regular exressions will create RegexRoutes * - Regular expressions will create RegexRoutes
* *
* @param string $target Route target or target pattern * @param string $target Route target or target pattern
* @return RouteInterface * @return RouteInterface

View File

@ -20,7 +20,7 @@ interface RouteInterface extends MiddlewareInterface
public function getTarget(); public function getTarget();
/** /**
* Return the RouteInterface::TYPE_ contants that identifies the type. * Return the RouteInterface::TYPE_ constants that identifies the type.
* *
* TYPE_STATIC indicates the route MUST match only when the path is an * TYPE_STATIC indicates the route MUST match only when the path is an
* exact match to the route's target. This route type SHOULD NOT * exact match to the route's target. This route type SHOULD NOT
@ -60,7 +60,7 @@ interface RouteInterface extends MiddlewareInterface
* *
* @param string $requestTarget * @param string $requestTarget
* @return boolean * @return boolean
* @throw \RuntimeException Error occured testing the target such as an * @throw \RuntimeException Error occurred testing the target such as an
* invalid regular expression * invalid regular expression
*/ */
public function matchesRequestTarget($requestTarget); public function matchesRequestTarget($requestTarget);

View File

@ -29,7 +29,7 @@ class Router implements RouterInterface
/** /**
* Create a new Router. * Create a new Router.
* *
* By default, when a route containg path variables matches, the path * By default, when a route containing path variables matches, the path
* variables are stored individually as attributes on the * variables are stored individually as attributes on the
* ServerRequestInterface. * ServerRequestInterface.
* *
@ -108,7 +108,7 @@ class Router implements RouterInterface
* - A string containing the fully qualified class name of a class * - A string containing the fully qualified class name of a class
* implementing MiddlewareInterface * implementing MiddlewareInterface
* - A callable that returns an instance implementing MiddleInterface * - A callable that returns an instance implementing MiddleInterface
* - A callable maching the signature of MiddlewareInteraface::dispatch * - A callable matching the signature of MiddlewareInterface::dispatch
* @see DispatchedInterface::dispatch * @see DispatchedInterface::dispatch
* *
* @param string $target Request target or pattern to match * @param string $target Request target or pattern to match

View File

@ -44,7 +44,7 @@ interface RouterInterface extends MiddlewareInterface
* - A string containing the fully qualified class name of a class * - A string containing the fully qualified class name of a class
* implementing MiddlewareInterface * implementing MiddlewareInterface
* - A callable that returns an instance implementing MiddleInterface * - A callable that returns an instance implementing MiddleInterface
* - A callable maching the signature of MiddlewareInteraface::dispatch * - A callable matching the signature of MiddlewareInterface::dispatch
* @see DispatchedInterface::dispatch * @see DispatchedInterface::dispatch
* *
* @param string $target Request target or pattern to match * @param string $target Request target or pattern to match

View File

@ -29,7 +29,7 @@ class Server
/** /**
* Create a new server. * Create a new server.
* *
* By default, when a route containg path variables matches, the path * By default, when a route containing path variables matches, the path
* variables are stored individually as attributes on the * variables are stored individually as attributes on the
* ServerRequestInterface. * ServerRequestInterface.
* *
@ -128,8 +128,8 @@ class Server
* *
* @param ServerRequestInterface $request Request provided by the client * @param ServerRequestInterface $request Request provided by the client
* @param ResponseInterface $response Initial starting place response to * @param ResponseInterface $response Initial starting place response to
* propogate to middleware. * propagate to middleware.
* @param TransmitterInterface $transmitter Instance to outputing the * @param TransmitterInterface $transmitter Instance to outputting the
* final response to the client. * final response to the client.
*/ */
public function respond( public function respond(