From 6a1f0c29159901e5a17756dbba3617e175fa1045 Mon Sep 17 00:00:00 2001 From: PJ Dietz Date: Thu, 4 Jun 2015 19:18:11 -0400 Subject: [PATCH] Spellcheck --- src/Message/HeaderCollection.php | 8 ++++---- src/Message/Message.php | 6 +++--- src/Message/NullStream.php | 4 ++-- src/Message/ServerRequest.php | 4 ++-- src/Message/UploadedFile.php | 2 +- src/Message/Uri.php | 2 +- src/Routing/MethodMap.php | 2 +- src/Routing/MethodMapInterface.php | 2 +- src/Routing/Route/RouteFactory.php | 4 ++-- src/Routing/Route/RouteFactoryInterface.php | 2 +- src/Routing/Route/RouteInterface.php | 4 ++-- src/Routing/Router.php | 4 ++-- src/Routing/RouterInterface.php | 2 +- src/Server.php | 6 +++--- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Message/HeaderCollection.php b/src/Message/HeaderCollection.php index 51a8f03..97c3c99 100644 --- a/src/Message/HeaderCollection.php +++ b/src/Message/HeaderCollection.php @@ -6,13 +6,13 @@ use ArrayAccess; 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 * direct use by consumers. * * 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 * 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[] * - * List arrary of lowercase header names. + * List array of lowercase header names. */ private $keys; @@ -104,7 +104,7 @@ class HeaderCollection implements ArrayAccess, Iterator $normalized = strtolower($offset); unset($this->fields[$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) { unset($this->keys[$key]); $this->keys = array_values($this->keys); diff --git a/src/Message/Message.php b/src/Message/Message.php index fde3e24..6ff1fc8 100644 --- a/src/Message/Message.php +++ b/src/Message/Message.php @@ -15,7 +15,7 @@ abstract class Message implements MessageInterface /** @var StreamInterface */ protected $body; /** @var string */ - protected $protcolVersion = "1.1"; + protected $protocolVersion = "1.1"; /** * Create a new Message, optionally with headers and a body. @@ -67,7 +67,7 @@ abstract class Message implements MessageInterface */ public function getProtocolVersion() { - return $this->protcolVersion; + return $this->protocolVersion; } /** @@ -82,7 +82,7 @@ abstract class Message implements MessageInterface public function withProtocolVersion($version) { $message = clone $this; - $message->protcolVersion = $version; + $message->protocolVersion = $version; return $message; } diff --git a/src/Message/NullStream.php b/src/Message/NullStream.php index 5b2c5a1..5a82075 100644 --- a/src/Message/NullStream.php +++ b/src/Message/NullStream.php @@ -5,7 +5,7 @@ namespace WellRESTed\Message; 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. */ @@ -105,7 +105,7 @@ class NullStream implements StreamInterface */ public function rewind() { - throw new \RuntimeException("Unable to rewind srream."); + throw new \RuntimeException("Unable to rewind stream."); } /** diff --git a/src/Message/ServerRequest.php b/src/Message/ServerRequest.php index f7e6e62..8454882 100644 --- a/src/Message/ServerRequest.php +++ b/src/Message/ServerRequest.php @@ -55,7 +55,7 @@ class ServerRequest extends Request implements ServerRequestInterface * Creates a new, empty representation of a server-side HTTP request. * * 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 * * @see ServerRequest::getServerRequest @@ -349,7 +349,7 @@ class ServerRequest extends Request implements ServerRequestInterface } if (isset($_SERVER["SERVER_PROTOCOL"]) && $_SERVER["SERVER_PROTOCOL"] === "HTTP/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"])) { $this->method = $_SERVER["REQUEST_METHOD"]; diff --git a/src/Message/UploadedFile.php b/src/Message/UploadedFile.php index 3be05dc..d5cfc9b 100644 --- a/src/Message/UploadedFile.php +++ b/src/Message/UploadedFile.php @@ -23,7 +23,7 @@ class UploadedFile implements UploadedFileInterface * provided by $_FILES. For example, given this structure for $_FILES: * * array( - * 'avatar' => arrary( + * 'avatar' => array( * 'name' => 'my-avatar.png', * 'type' => 'image/png', * 'size' => 90996, diff --git a/src/Message/Uri.php b/src/Message/Uri.php index 8387c2b..729a7fd 100644 --- a/src/Message/Uri.php +++ b/src/Message/Uri.php @@ -521,7 +521,7 @@ class Uri implements UriInterface * Return a percent-encoded string. * * 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) * - A "reserved character" per RFC 3986 (see below) * diff --git a/src/Routing/MethodMap.php b/src/Routing/MethodMap.php index 03ea9ac..b6b9547 100644 --- a/src/Routing/MethodMap.php +++ b/src/Routing/MethodMap.php @@ -35,7 +35,7 @@ class MethodMap implements MethodMapInterface * - A string containing the fully qualified class name of a class * implementing MiddlewareInterface * - 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 * * $middleware may also be null, in which case any previously set diff --git a/src/Routing/MethodMapInterface.php b/src/Routing/MethodMapInterface.php index df92364..0027a76 100644 --- a/src/Routing/MethodMapInterface.php +++ b/src/Routing/MethodMapInterface.php @@ -37,7 +37,7 @@ interface MethodMapInterface extends MiddlewareInterface * - A string containing the fully qualified class name of a class * implementing MiddlewareInterface * - 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 * * @param string $method diff --git a/src/Routing/Route/RouteFactory.php b/src/Routing/Route/RouteFactory.php index 1448fe8..ca16c59 100644 --- a/src/Routing/Route/RouteFactory.php +++ b/src/Routing/Route/RouteFactory.php @@ -23,7 +23,7 @@ class RouteFactory implements RouteFactoryInterface * - Target with no special characters will create StaticRoutes * - Target ending with * will create PrefixRoutes * - 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 * @return RouteInterface @@ -39,7 +39,7 @@ class RouteFactory implements RouteFactoryInterface return new PrefixRoute($target, new MethodMap($this->dispatcher)); } - // TempalateRoutes contain {variable} + // TemplateRoutes contain {variable} if (preg_match(TemplateRoute::URI_TEMPLATE_EXPRESSION_RE, $target)) { return new TemplateRoute($target, new MethodMap($this->dispatcher)); } diff --git a/src/Routing/Route/RouteFactoryInterface.php b/src/Routing/Route/RouteFactoryInterface.php index 9abe5a6..829b806 100644 --- a/src/Routing/Route/RouteFactoryInterface.php +++ b/src/Routing/Route/RouteFactoryInterface.php @@ -10,7 +10,7 @@ interface RouteFactoryInterface * - Targets with no special characters will create StaticRoutes * - Targets ending with * will create PrefixRoutes * - 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 * @return RouteInterface diff --git a/src/Routing/Route/RouteInterface.php b/src/Routing/Route/RouteInterface.php index ad8a917..d3ff8f7 100644 --- a/src/Routing/Route/RouteInterface.php +++ b/src/Routing/Route/RouteInterface.php @@ -20,7 +20,7 @@ interface RouteInterface extends MiddlewareInterface 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 * exact match to the route's target. This route type SHOULD NOT @@ -60,7 +60,7 @@ interface RouteInterface extends MiddlewareInterface * * @param string $requestTarget * @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 */ public function matchesRequestTarget($requestTarget); diff --git a/src/Routing/Router.php b/src/Routing/Router.php index 8e93688..8ec4bf2 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -29,7 +29,7 @@ class Router implements RouterInterface /** * 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 * ServerRequestInterface. * @@ -108,7 +108,7 @@ class Router implements RouterInterface * - A string containing the fully qualified class name of a class * implementing MiddlewareInterface * - 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 * * @param string $target Request target or pattern to match diff --git a/src/Routing/RouterInterface.php b/src/Routing/RouterInterface.php index 018045e..c37331c 100644 --- a/src/Routing/RouterInterface.php +++ b/src/Routing/RouterInterface.php @@ -44,7 +44,7 @@ interface RouterInterface extends MiddlewareInterface * - A string containing the fully qualified class name of a class * implementing MiddlewareInterface * - 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 * * @param string $target Request target or pattern to match diff --git a/src/Server.php b/src/Server.php index fa0d162..aa3ba22 100644 --- a/src/Server.php +++ b/src/Server.php @@ -29,7 +29,7 @@ class 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 * ServerRequestInterface. * @@ -128,8 +128,8 @@ class Server * * @param ServerRequestInterface $request Request provided by the client * @param ResponseInterface $response Initial starting place response to - * propogate to middleware. - * @param TransmitterInterface $transmitter Instance to outputing the + * propagate to middleware. + * @param TransmitterInterface $transmitter Instance to outputting the * final response to the client. */ public function respond(