$methods Hash of method name to a closure
+ *
+ * @return FnStream
+ */
+ public static function decorate(StreamInterface $stream, array $methods)
+ {
+ // If any of the required methods were not provided, then simply
+ // proxy to the decorated stream.
+ foreach (array_diff(self::SLOTS, array_keys($methods)) as $diff) {
+ /** @var callable $callable */
+ $callable = [$stream, $diff];
+ $methods[$diff] = $callable;
+ }
+
+ return new self($methods);
+ }
+
+ public function __toString(): string
+ {
+ try {
+ /** @var string */
+ return ($this->_fn___toString)();
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function close(): void
+ {
+ ($this->_fn_close)();
+ }
+
+ public function detach()
+ {
+ return ($this->_fn_detach)();
+ }
+
+ public function getSize(): ?int
+ {
+ return ($this->_fn_getSize)();
+ }
+
+ public function tell(): int
+ {
+ return ($this->_fn_tell)();
+ }
+
+ public function eof(): bool
+ {
+ return ($this->_fn_eof)();
+ }
+
+ public function isSeekable(): bool
+ {
+ return ($this->_fn_isSeekable)();
+ }
+
+ public function rewind(): void
+ {
+ ($this->_fn_rewind)();
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ ($this->_fn_seek)($offset, $whence);
+ }
+
+ public function isWritable(): bool
+ {
+ return ($this->_fn_isWritable)();
+ }
+
+ public function write($string): int
+ {
+ return ($this->_fn_write)($string);
+ }
+
+ public function isReadable(): bool
+ {
+ return ($this->_fn_isReadable)();
+ }
+
+ public function read($length): string
+ {
+ return ($this->_fn_read)($length);
+ }
+
+ public function getContents(): string
+ {
+ return ($this->_fn_getContents)();
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ return ($this->_fn_getMetadata)($key);
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Header.php b/vendor/guzzlehttp/psr7/src/Header.php
new file mode 100644
index 0000000..bbce8b0
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Header.php
@@ -0,0 +1,134 @@
+]+>|[^=]+/', $kvp, $matches)) {
+ $m = $matches[0];
+ if (isset($m[1])) {
+ $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
+ } else {
+ $part[] = trim($m[0], $trimmed);
+ }
+ }
+ }
+ if ($part) {
+ $params[] = $part;
+ }
+ }
+ }
+
+ return $params;
+ }
+
+ /**
+ * Converts an array of header values that may contain comma separated
+ * headers into an array of headers with no comma separated values.
+ *
+ * @param string|array $header Header to normalize.
+ *
+ * @deprecated Use self::splitList() instead.
+ */
+ public static function normalize($header): array
+ {
+ $result = [];
+ foreach ((array) $header as $value) {
+ foreach (self::splitList($value) as $parsed) {
+ $result[] = $parsed;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Splits a HTTP header defined to contain a comma-separated list into
+ * each individual value. Empty values will be removed.
+ *
+ * Example headers include 'accept', 'cache-control' and 'if-none-match'.
+ *
+ * This method must not be used to parse headers that are not defined as
+ * a list, such as 'user-agent' or 'set-cookie'.
+ *
+ * @param string|string[] $values Header value as returned by MessageInterface::getHeader()
+ *
+ * @return string[]
+ */
+ public static function splitList($values): array
+ {
+ if (!\is_array($values)) {
+ $values = [$values];
+ }
+
+ $result = [];
+ foreach ($values as $value) {
+ if (!\is_string($value)) {
+ throw new \TypeError('$header must either be a string or an array containing strings.');
+ }
+
+ $v = '';
+ $isQuoted = false;
+ $isEscaped = false;
+ for ($i = 0, $max = \strlen($value); $i < $max; ++$i) {
+ if ($isEscaped) {
+ $v .= $value[$i];
+ $isEscaped = false;
+
+ continue;
+ }
+
+ if (!$isQuoted && $value[$i] === ',') {
+ $v = \trim($v);
+ if ($v !== '') {
+ $result[] = $v;
+ }
+
+ $v = '';
+ continue;
+ }
+
+ if ($isQuoted && $value[$i] === '\\') {
+ $isEscaped = true;
+ $v .= $value[$i];
+
+ continue;
+ }
+ if ($value[$i] === '"') {
+ $isQuoted = !$isQuoted;
+ $v .= $value[$i];
+
+ continue;
+ }
+
+ $v .= $value[$i];
+ }
+
+ $v = \trim($v);
+ if ($v !== '') {
+ $result[] = $v;
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/HttpFactory.php b/vendor/guzzlehttp/psr7/src/HttpFactory.php
new file mode 100644
index 0000000..73d17e3
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/HttpFactory.php
@@ -0,0 +1,94 @@
+getSize();
+ }
+
+ return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
+ }
+
+ public function createStream(string $content = ''): StreamInterface
+ {
+ return Utils::streamFor($content);
+ }
+
+ public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface
+ {
+ try {
+ $resource = Utils::tryFopen($file, $mode);
+ } catch (\RuntimeException $e) {
+ if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) {
+ throw new \InvalidArgumentException(sprintf('Invalid file opening mode "%s"', $mode), 0, $e);
+ }
+
+ throw $e;
+ }
+
+ return Utils::streamFor($resource);
+ }
+
+ public function createStreamFromResource($resource): StreamInterface
+ {
+ return Utils::streamFor($resource);
+ }
+
+ public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
+ {
+ if (empty($method)) {
+ if (!empty($serverParams['REQUEST_METHOD'])) {
+ $method = $serverParams['REQUEST_METHOD'];
+ } else {
+ throw new \InvalidArgumentException('Cannot determine HTTP method');
+ }
+ }
+
+ return new ServerRequest($method, $uri, [], null, '1.1', $serverParams);
+ }
+
+ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
+ {
+ return new Response($code, [], null, '1.1', $reasonPhrase);
+ }
+
+ public function createRequest(string $method, $uri): RequestInterface
+ {
+ return new Request($method, $uri);
+ }
+
+ public function createUri(string $uri = ''): UriInterface
+ {
+ return new Uri($uri);
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php
new file mode 100644
index 0000000..e674c9a
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/InflateStream.php
@@ -0,0 +1,37 @@
+ 15 + 32]);
+ $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
new file mode 100644
index 0000000..f6c8490
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
@@ -0,0 +1,49 @@
+filename = $filename;
+ $this->mode = $mode;
+
+ // unsetting the property forces the first access to go through
+ // __get().
+ unset($this->stream);
+ }
+
+ /**
+ * Creates the underlying stream lazily when required.
+ */
+ protected function createStream(): StreamInterface
+ {
+ return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php
new file mode 100644
index 0000000..fb22325
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/LimitStream.php
@@ -0,0 +1,157 @@
+stream = $stream;
+ $this->setLimit($limit);
+ $this->setOffset($offset);
+ }
+
+ public function eof(): bool
+ {
+ // Always return true if the underlying stream is EOF
+ if ($this->stream->eof()) {
+ return true;
+ }
+
+ // No limit and the underlying stream is not at EOF
+ if ($this->limit === -1) {
+ return false;
+ }
+
+ return $this->stream->tell() >= $this->offset + $this->limit;
+ }
+
+ /**
+ * Returns the size of the limited subset of data
+ */
+ public function getSize(): ?int
+ {
+ if (null === ($length = $this->stream->getSize())) {
+ return null;
+ } elseif ($this->limit === -1) {
+ return $length - $this->offset;
+ } else {
+ return min($this->limit, $length - $this->offset);
+ }
+ }
+
+ /**
+ * Allow for a bounded seek on the read limited stream
+ */
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ if ($whence !== SEEK_SET || $offset < 0) {
+ throw new \RuntimeException(sprintf(
+ 'Cannot seek to offset %s with whence %s',
+ $offset,
+ $whence
+ ));
+ }
+
+ $offset += $this->offset;
+
+ if ($this->limit !== -1) {
+ if ($offset > $this->offset + $this->limit) {
+ $offset = $this->offset + $this->limit;
+ }
+ }
+
+ $this->stream->seek($offset);
+ }
+
+ /**
+ * Give a relative tell()
+ */
+ public function tell(): int
+ {
+ return $this->stream->tell() - $this->offset;
+ }
+
+ /**
+ * Set the offset to start limiting from
+ *
+ * @param int $offset Offset to seek to and begin byte limiting from
+ *
+ * @throws \RuntimeException if the stream cannot be seeked.
+ */
+ public function setOffset(int $offset): void
+ {
+ $current = $this->stream->tell();
+
+ if ($current !== $offset) {
+ // If the stream cannot seek to the offset position, then read to it
+ if ($this->stream->isSeekable()) {
+ $this->stream->seek($offset);
+ } elseif ($current > $offset) {
+ throw new \RuntimeException("Could not seek to stream offset $offset");
+ } else {
+ $this->stream->read($offset - $current);
+ }
+ }
+
+ $this->offset = $offset;
+ }
+
+ /**
+ * Set the limit of bytes that the decorator allows to be read from the
+ * stream.
+ *
+ * @param int $limit Number of bytes to allow to be read from the stream.
+ * Use -1 for no limit.
+ */
+ public function setLimit(int $limit): void
+ {
+ $this->limit = $limit;
+ }
+
+ public function read($length): string
+ {
+ if ($this->limit === -1) {
+ return $this->stream->read($length);
+ }
+
+ // Check if the current position is less than the total allowed
+ // bytes + original offset
+ $remaining = ($this->offset + $this->limit) - $this->stream->tell();
+ if ($remaining > 0) {
+ // Only return the amount of requested data, ensuring that the byte
+ // limit is not exceeded
+ return $this->stream->read(min($remaining, $length));
+ }
+
+ return '';
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Message.php b/vendor/guzzlehttp/psr7/src/Message.php
new file mode 100644
index 0000000..5561a51
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Message.php
@@ -0,0 +1,246 @@
+getMethod().' '
+ .$message->getRequestTarget())
+ .' HTTP/'.$message->getProtocolVersion();
+ if (!$message->hasHeader('host')) {
+ $msg .= "\r\nHost: ".$message->getUri()->getHost();
+ }
+ } elseif ($message instanceof ResponseInterface) {
+ $msg = 'HTTP/'.$message->getProtocolVersion().' '
+ .$message->getStatusCode().' '
+ .$message->getReasonPhrase();
+ } else {
+ throw new \InvalidArgumentException('Unknown message type');
+ }
+
+ foreach ($message->getHeaders() as $name => $values) {
+ if (is_string($name) && strtolower($name) === 'set-cookie') {
+ foreach ($values as $value) {
+ $msg .= "\r\n{$name}: ".$value;
+ }
+ } else {
+ $msg .= "\r\n{$name}: ".implode(', ', $values);
+ }
+ }
+
+ return "{$msg}\r\n\r\n".$message->getBody();
+ }
+
+ /**
+ * Get a short summary of the message body.
+ *
+ * Will return `null` if the response is not printable.
+ *
+ * @param MessageInterface $message The message to get the body summary
+ * @param int $truncateAt The maximum allowed size of the summary
+ */
+ public static function bodySummary(MessageInterface $message, int $truncateAt = 120): ?string
+ {
+ $body = $message->getBody();
+
+ if (!$body->isSeekable() || !$body->isReadable()) {
+ return null;
+ }
+
+ $size = $body->getSize();
+
+ if ($size === 0) {
+ return null;
+ }
+
+ $body->rewind();
+ $summary = $body->read($truncateAt);
+ $body->rewind();
+
+ if ($size > $truncateAt) {
+ $summary .= ' (truncated...)';
+ }
+
+ // Matches any printable character, including unicode characters:
+ // letters, marks, numbers, punctuation, spacing, and separators.
+ if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) {
+ return null;
+ }
+
+ return $summary;
+ }
+
+ /**
+ * Attempts to rewind a message body and throws an exception on failure.
+ *
+ * The body of the message will only be rewound if a call to `tell()`
+ * returns a value other than `0`.
+ *
+ * @param MessageInterface $message Message to rewind
+ *
+ * @throws \RuntimeException
+ */
+ public static function rewindBody(MessageInterface $message): void
+ {
+ $body = $message->getBody();
+
+ if ($body->tell()) {
+ $body->rewind();
+ }
+ }
+
+ /**
+ * Parses an HTTP message into an associative array.
+ *
+ * The array contains the "start-line" key containing the start line of
+ * the message, "headers" key containing an associative array of header
+ * array values, and a "body" key containing the body of the message.
+ *
+ * @param string $message HTTP request or response to parse.
+ */
+ public static function parseMessage(string $message): array
+ {
+ if (!$message) {
+ throw new \InvalidArgumentException('Invalid message');
+ }
+
+ $message = ltrim($message, "\r\n");
+
+ $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
+
+ if ($messageParts === false || count($messageParts) !== 2) {
+ throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
+ }
+
+ [$rawHeaders, $body] = $messageParts;
+ $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
+ $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
+
+ if ($headerParts === false || count($headerParts) !== 2) {
+ throw new \InvalidArgumentException('Invalid message: Missing status line');
+ }
+
+ [$startLine, $rawHeaders] = $headerParts;
+
+ if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
+ // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
+ $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
+ }
+
+ /** @var array[] $headerLines */
+ $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
+
+ // If these aren't the same, then one line didn't match and there's an invalid header.
+ if ($count !== substr_count($rawHeaders, "\n")) {
+ // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
+ if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
+ throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
+ }
+
+ throw new \InvalidArgumentException('Invalid header syntax');
+ }
+
+ $headers = [];
+
+ foreach ($headerLines as $headerLine) {
+ $headers[$headerLine[1]][] = $headerLine[2];
+ }
+
+ return [
+ 'start-line' => $startLine,
+ 'headers' => $headers,
+ 'body' => $body,
+ ];
+ }
+
+ /**
+ * Constructs a URI for an HTTP request message.
+ *
+ * @param string $path Path from the start-line
+ * @param array $headers Array of headers (each value an array).
+ */
+ public static function parseRequestUri(string $path, array $headers): string
+ {
+ $hostKey = array_filter(array_keys($headers), function ($k) {
+ // Numeric array keys are converted to int by PHP.
+ $k = (string) $k;
+
+ return strtolower($k) === 'host';
+ });
+
+ // If no host is found, then a full URI cannot be constructed.
+ if (!$hostKey) {
+ return $path;
+ }
+
+ $host = $headers[reset($hostKey)][0];
+ $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
+
+ return $scheme.'://'.$host.'/'.ltrim($path, '/');
+ }
+
+ /**
+ * Parses a request message string into a request object.
+ *
+ * @param string $message Request message string.
+ */
+ public static function parseRequest(string $message): RequestInterface
+ {
+ $data = self::parseMessage($message);
+ $matches = [];
+ if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
+ throw new \InvalidArgumentException('Invalid request string');
+ }
+ $parts = explode(' ', $data['start-line'], 3);
+ $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
+
+ $request = new Request(
+ $parts[0],
+ $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1],
+ $data['headers'],
+ $data['body'],
+ $version
+ );
+
+ return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
+ }
+
+ /**
+ * Parses a response message string into a response object.
+ *
+ * @param string $message Response message string.
+ */
+ public static function parseResponse(string $message): ResponseInterface
+ {
+ $data = self::parseMessage($message);
+ // According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2
+ // the space between status-code and reason-phrase is required. But
+ // browsers accept responses without space and reason as well.
+ if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
+ throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']);
+ }
+ $parts = explode(' ', $data['start-line'], 3);
+
+ return new Response(
+ (int) $parts[1],
+ $data['headers'],
+ $data['body'],
+ explode('/', $parts[0])[1],
+ $parts[2] ?? null
+ );
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php
new file mode 100644
index 0000000..65dbc4b
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php
@@ -0,0 +1,265 @@
+ array of values */
+ private $headers = [];
+
+ /** @var string[] Map of lowercase header name => original name at registration */
+ private $headerNames = [];
+
+ /** @var string */
+ private $protocol = '1.1';
+
+ /** @var StreamInterface|null */
+ private $stream;
+
+ public function getProtocolVersion(): string
+ {
+ return $this->protocol;
+ }
+
+ public function withProtocolVersion($version): MessageInterface
+ {
+ if ($this->protocol === $version) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->protocol = $version;
+
+ return $new;
+ }
+
+ public function getHeaders(): array
+ {
+ return $this->headers;
+ }
+
+ public function hasHeader($header): bool
+ {
+ return isset($this->headerNames[strtolower($header)]);
+ }
+
+ public function getHeader($header): array
+ {
+ $header = strtolower($header);
+
+ if (!isset($this->headerNames[$header])) {
+ return [];
+ }
+
+ $header = $this->headerNames[$header];
+
+ return $this->headers[$header];
+ }
+
+ public function getHeaderLine($header): string
+ {
+ return implode(', ', $this->getHeader($header));
+ }
+
+ public function withHeader($header, $value): MessageInterface
+ {
+ $this->assertHeader($header);
+ $value = $this->normalizeHeaderValue($value);
+ $normalized = strtolower($header);
+
+ $new = clone $this;
+ if (isset($new->headerNames[$normalized])) {
+ unset($new->headers[$new->headerNames[$normalized]]);
+ }
+ $new->headerNames[$normalized] = $header;
+ $new->headers[$header] = $value;
+
+ return $new;
+ }
+
+ public function withAddedHeader($header, $value): MessageInterface
+ {
+ $this->assertHeader($header);
+ $value = $this->normalizeHeaderValue($value);
+ $normalized = strtolower($header);
+
+ $new = clone $this;
+ if (isset($new->headerNames[$normalized])) {
+ $header = $this->headerNames[$normalized];
+ $new->headers[$header] = array_merge($this->headers[$header], $value);
+ } else {
+ $new->headerNames[$normalized] = $header;
+ $new->headers[$header] = $value;
+ }
+
+ return $new;
+ }
+
+ public function withoutHeader($header): MessageInterface
+ {
+ $normalized = strtolower($header);
+
+ if (!isset($this->headerNames[$normalized])) {
+ return $this;
+ }
+
+ $header = $this->headerNames[$normalized];
+
+ $new = clone $this;
+ unset($new->headers[$header], $new->headerNames[$normalized]);
+
+ return $new;
+ }
+
+ public function getBody(): StreamInterface
+ {
+ if (!$this->stream) {
+ $this->stream = Utils::streamFor('');
+ }
+
+ return $this->stream;
+ }
+
+ public function withBody(StreamInterface $body): MessageInterface
+ {
+ if ($body === $this->stream) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->stream = $body;
+
+ return $new;
+ }
+
+ /**
+ * @param (string|string[])[] $headers
+ */
+ private function setHeaders(array $headers): void
+ {
+ $this->headerNames = $this->headers = [];
+ foreach ($headers as $header => $value) {
+ // Numeric array keys are converted to int by PHP.
+ $header = (string) $header;
+
+ $this->assertHeader($header);
+ $value = $this->normalizeHeaderValue($value);
+ $normalized = strtolower($header);
+ if (isset($this->headerNames[$normalized])) {
+ $header = $this->headerNames[$normalized];
+ $this->headers[$header] = array_merge($this->headers[$header], $value);
+ } else {
+ $this->headerNames[$normalized] = $header;
+ $this->headers[$header] = $value;
+ }
+ }
+ }
+
+ /**
+ * @param mixed $value
+ *
+ * @return string[]
+ */
+ private function normalizeHeaderValue($value): array
+ {
+ if (!is_array($value)) {
+ return $this->trimAndValidateHeaderValues([$value]);
+ }
+
+ if (count($value) === 0) {
+ throw new \InvalidArgumentException('Header value can not be an empty array.');
+ }
+
+ return $this->trimAndValidateHeaderValues($value);
+ }
+
+ /**
+ * Trims whitespace from the header values.
+ *
+ * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field.
+ *
+ * header-field = field-name ":" OWS field-value OWS
+ * OWS = *( SP / HTAB )
+ *
+ * @param mixed[] $values Header values
+ *
+ * @return string[] Trimmed header values
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
+ */
+ private function trimAndValidateHeaderValues(array $values): array
+ {
+ return array_map(function ($value) {
+ if (!is_scalar($value) && null !== $value) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Header value must be scalar or null but %s provided.',
+ is_object($value) ? get_class($value) : gettype($value)
+ ));
+ }
+
+ $trimmed = trim((string) $value, " \t");
+ $this->assertValue($trimmed);
+
+ return $trimmed;
+ }, array_values($values));
+ }
+
+ /**
+ * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
+ *
+ * @param mixed $header
+ */
+ private function assertHeader($header): void
+ {
+ if (!is_string($header)) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Header name must be a string but %s provided.',
+ is_object($header) ? get_class($header) : gettype($header)
+ ));
+ }
+
+ if (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
+ throw new \InvalidArgumentException(
+ sprintf('"%s" is not valid header name.', $header)
+ );
+ }
+ }
+
+ /**
+ * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
+ *
+ * field-value = *( field-content / obs-fold )
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+ * field-vchar = VCHAR / obs-text
+ * VCHAR = %x21-7E
+ * obs-text = %x80-FF
+ * obs-fold = CRLF 1*( SP / HTAB )
+ */
+ private function assertValue(string $value): void
+ {
+ // The regular expression intentionally does not support the obs-fold production, because as
+ // per RFC 7230#3.2.4:
+ //
+ // A sender MUST NOT generate a message that includes
+ // line folding (i.e., that has any field-value that contains a match to
+ // the obs-fold rule) unless the message is intended for packaging
+ // within the message/http media type.
+ //
+ // Clients must not send a request with line folding and a server sending folded headers is
+ // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
+ // folding is not likely to break any legitimate use case.
+ if (!preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
+ throw new \InvalidArgumentException(
+ sprintf('"%s" is not valid header value.', $value)
+ );
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/MimeType.php b/vendor/guzzlehttp/psr7/src/MimeType.php
new file mode 100644
index 0000000..b131bdb
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/MimeType.php
@@ -0,0 +1,1259 @@
+ 'application/vnd.1000minds.decision-model+xml',
+ '3dml' => 'text/vnd.in3d.3dml',
+ '3ds' => 'image/x-3ds',
+ '3g2' => 'video/3gpp2',
+ '3gp' => 'video/3gp',
+ '3gpp' => 'video/3gpp',
+ '3mf' => 'model/3mf',
+ '7z' => 'application/x-7z-compressed',
+ '7zip' => 'application/x-7z-compressed',
+ '123' => 'application/vnd.lotus-1-2-3',
+ 'aab' => 'application/x-authorware-bin',
+ 'aac' => 'audio/aac',
+ 'aam' => 'application/x-authorware-map',
+ 'aas' => 'application/x-authorware-seg',
+ 'abw' => 'application/x-abiword',
+ 'ac' => 'application/vnd.nokia.n-gage.ac+xml',
+ 'ac3' => 'audio/ac3',
+ 'acc' => 'application/vnd.americandynamics.acc',
+ 'ace' => 'application/x-ace-compressed',
+ 'acu' => 'application/vnd.acucobol',
+ 'acutc' => 'application/vnd.acucorp',
+ 'adp' => 'audio/adpcm',
+ 'adts' => 'audio/aac',
+ 'aep' => 'application/vnd.audiograph',
+ 'afm' => 'application/x-font-type1',
+ 'afp' => 'application/vnd.ibm.modcap',
+ 'age' => 'application/vnd.age',
+ 'ahead' => 'application/vnd.ahead.space',
+ 'ai' => 'application/pdf',
+ 'aif' => 'audio/x-aiff',
+ 'aifc' => 'audio/x-aiff',
+ 'aiff' => 'audio/x-aiff',
+ 'air' => 'application/vnd.adobe.air-application-installer-package+zip',
+ 'ait' => 'application/vnd.dvb.ait',
+ 'ami' => 'application/vnd.amiga.ami',
+ 'aml' => 'application/automationml-aml+xml',
+ 'amlx' => 'application/automationml-amlx+zip',
+ 'amr' => 'audio/amr',
+ 'apk' => 'application/vnd.android.package-archive',
+ 'apng' => 'image/apng',
+ 'appcache' => 'text/cache-manifest',
+ 'appinstaller' => 'application/appinstaller',
+ 'application' => 'application/x-ms-application',
+ 'appx' => 'application/appx',
+ 'appxbundle' => 'application/appxbundle',
+ 'apr' => 'application/vnd.lotus-approach',
+ 'arc' => 'application/x-freearc',
+ 'arj' => 'application/x-arj',
+ 'asc' => 'application/pgp-signature',
+ 'asf' => 'video/x-ms-asf',
+ 'asm' => 'text/x-asm',
+ 'aso' => 'application/vnd.accpac.simply.aso',
+ 'asx' => 'video/x-ms-asf',
+ 'atc' => 'application/vnd.acucorp',
+ 'atom' => 'application/atom+xml',
+ 'atomcat' => 'application/atomcat+xml',
+ 'atomdeleted' => 'application/atomdeleted+xml',
+ 'atomsvc' => 'application/atomsvc+xml',
+ 'atx' => 'application/vnd.antix.game-component',
+ 'au' => 'audio/x-au',
+ 'avci' => 'image/avci',
+ 'avcs' => 'image/avcs',
+ 'avi' => 'video/x-msvideo',
+ 'avif' => 'image/avif',
+ 'aw' => 'application/applixware',
+ 'azf' => 'application/vnd.airzip.filesecure.azf',
+ 'azs' => 'application/vnd.airzip.filesecure.azs',
+ 'azv' => 'image/vnd.airzip.accelerator.azv',
+ 'azw' => 'application/vnd.amazon.ebook',
+ 'b16' => 'image/vnd.pco.b16',
+ 'bat' => 'application/x-msdownload',
+ 'bcpio' => 'application/x-bcpio',
+ 'bdf' => 'application/x-font-bdf',
+ 'bdm' => 'application/vnd.syncml.dm+wbxml',
+ 'bdoc' => 'application/x-bdoc',
+ 'bed' => 'application/vnd.realvnc.bed',
+ 'bh2' => 'application/vnd.fujitsu.oasysprs',
+ 'bin' => 'application/octet-stream',
+ 'blb' => 'application/x-blorb',
+ 'blorb' => 'application/x-blorb',
+ 'bmi' => 'application/vnd.bmi',
+ 'bmml' => 'application/vnd.balsamiq.bmml+xml',
+ 'bmp' => 'image/bmp',
+ 'book' => 'application/vnd.framemaker',
+ 'box' => 'application/vnd.previewsystems.box',
+ 'boz' => 'application/x-bzip2',
+ 'bpk' => 'application/octet-stream',
+ 'bpmn' => 'application/octet-stream',
+ 'bsp' => 'model/vnd.valve.source.compiled-map',
+ 'btf' => 'image/prs.btif',
+ 'btif' => 'image/prs.btif',
+ 'buffer' => 'application/octet-stream',
+ 'bz' => 'application/x-bzip',
+ 'bz2' => 'application/x-bzip2',
+ 'c' => 'text/x-c',
+ 'c4d' => 'application/vnd.clonk.c4group',
+ 'c4f' => 'application/vnd.clonk.c4group',
+ 'c4g' => 'application/vnd.clonk.c4group',
+ 'c4p' => 'application/vnd.clonk.c4group',
+ 'c4u' => 'application/vnd.clonk.c4group',
+ 'c11amc' => 'application/vnd.cluetrust.cartomobile-config',
+ 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg',
+ 'cab' => 'application/vnd.ms-cab-compressed',
+ 'caf' => 'audio/x-caf',
+ 'cap' => 'application/vnd.tcpdump.pcap',
+ 'car' => 'application/vnd.curl.car',
+ 'cat' => 'application/vnd.ms-pki.seccat',
+ 'cb7' => 'application/x-cbr',
+ 'cba' => 'application/x-cbr',
+ 'cbr' => 'application/x-cbr',
+ 'cbt' => 'application/x-cbr',
+ 'cbz' => 'application/x-cbr',
+ 'cc' => 'text/x-c',
+ 'cco' => 'application/x-cocoa',
+ 'cct' => 'application/x-director',
+ 'ccxml' => 'application/ccxml+xml',
+ 'cdbcmsg' => 'application/vnd.contact.cmsg',
+ 'cdf' => 'application/x-netcdf',
+ 'cdfx' => 'application/cdfx+xml',
+ 'cdkey' => 'application/vnd.mediastation.cdkey',
+ 'cdmia' => 'application/cdmi-capability',
+ 'cdmic' => 'application/cdmi-container',
+ 'cdmid' => 'application/cdmi-domain',
+ 'cdmio' => 'application/cdmi-object',
+ 'cdmiq' => 'application/cdmi-queue',
+ 'cdr' => 'application/cdr',
+ 'cdx' => 'chemical/x-cdx',
+ 'cdxml' => 'application/vnd.chemdraw+xml',
+ 'cdy' => 'application/vnd.cinderella',
+ 'cer' => 'application/pkix-cert',
+ 'cfs' => 'application/x-cfs-compressed',
+ 'cgm' => 'image/cgm',
+ 'chat' => 'application/x-chat',
+ 'chm' => 'application/vnd.ms-htmlhelp',
+ 'chrt' => 'application/vnd.kde.kchart',
+ 'cif' => 'chemical/x-cif',
+ 'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
+ 'cil' => 'application/vnd.ms-artgalry',
+ 'cjs' => 'application/node',
+ 'cla' => 'application/vnd.claymore',
+ 'class' => 'application/octet-stream',
+ 'cld' => 'model/vnd.cld',
+ 'clkk' => 'application/vnd.crick.clicker.keyboard',
+ 'clkp' => 'application/vnd.crick.clicker.palette',
+ 'clkt' => 'application/vnd.crick.clicker.template',
+ 'clkw' => 'application/vnd.crick.clicker.wordbank',
+ 'clkx' => 'application/vnd.crick.clicker',
+ 'clp' => 'application/x-msclip',
+ 'cmc' => 'application/vnd.cosmocaller',
+ 'cmdf' => 'chemical/x-cmdf',
+ 'cml' => 'chemical/x-cml',
+ 'cmp' => 'application/vnd.yellowriver-custom-menu',
+ 'cmx' => 'image/x-cmx',
+ 'cod' => 'application/vnd.rim.cod',
+ 'coffee' => 'text/coffeescript',
+ 'com' => 'application/x-msdownload',
+ 'conf' => 'text/plain',
+ 'cpio' => 'application/x-cpio',
+ 'cpl' => 'application/cpl+xml',
+ 'cpp' => 'text/x-c',
+ 'cpt' => 'application/mac-compactpro',
+ 'crd' => 'application/x-mscardfile',
+ 'crl' => 'application/pkix-crl',
+ 'crt' => 'application/x-x509-ca-cert',
+ 'crx' => 'application/x-chrome-extension',
+ 'cryptonote' => 'application/vnd.rig.cryptonote',
+ 'csh' => 'application/x-csh',
+ 'csl' => 'application/vnd.citationstyles.style+xml',
+ 'csml' => 'chemical/x-csml',
+ 'csp' => 'application/vnd.commonspace',
+ 'csr' => 'application/octet-stream',
+ 'css' => 'text/css',
+ 'cst' => 'application/x-director',
+ 'csv' => 'text/csv',
+ 'cu' => 'application/cu-seeme',
+ 'curl' => 'text/vnd.curl',
+ 'cwl' => 'application/cwl',
+ 'cww' => 'application/prs.cww',
+ 'cxt' => 'application/x-director',
+ 'cxx' => 'text/x-c',
+ 'dae' => 'model/vnd.collada+xml',
+ 'daf' => 'application/vnd.mobius.daf',
+ 'dart' => 'application/vnd.dart',
+ 'dataless' => 'application/vnd.fdsn.seed',
+ 'davmount' => 'application/davmount+xml',
+ 'dbf' => 'application/vnd.dbf',
+ 'dbk' => 'application/docbook+xml',
+ 'dcr' => 'application/x-director',
+ 'dcurl' => 'text/vnd.curl.dcurl',
+ 'dd2' => 'application/vnd.oma.dd2+xml',
+ 'ddd' => 'application/vnd.fujixerox.ddd',
+ 'ddf' => 'application/vnd.syncml.dmddf+xml',
+ 'dds' => 'image/vnd.ms-dds',
+ 'deb' => 'application/x-debian-package',
+ 'def' => 'text/plain',
+ 'deploy' => 'application/octet-stream',
+ 'der' => 'application/x-x509-ca-cert',
+ 'dfac' => 'application/vnd.dreamfactory',
+ 'dgc' => 'application/x-dgc-compressed',
+ 'dib' => 'image/bmp',
+ 'dic' => 'text/x-c',
+ 'dir' => 'application/x-director',
+ 'dis' => 'application/vnd.mobius.dis',
+ 'disposition-notification' => 'message/disposition-notification',
+ 'dist' => 'application/octet-stream',
+ 'distz' => 'application/octet-stream',
+ 'djv' => 'image/vnd.djvu',
+ 'djvu' => 'image/vnd.djvu',
+ 'dll' => 'application/octet-stream',
+ 'dmg' => 'application/x-apple-diskimage',
+ 'dmn' => 'application/octet-stream',
+ 'dmp' => 'application/vnd.tcpdump.pcap',
+ 'dms' => 'application/octet-stream',
+ 'dna' => 'application/vnd.dna',
+ 'doc' => 'application/msword',
+ 'docm' => 'application/vnd.ms-word.template.macroEnabled.12',
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'dot' => 'application/msword',
+ 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
+ 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
+ 'dp' => 'application/vnd.osgi.dp',
+ 'dpg' => 'application/vnd.dpgraph',
+ 'dpx' => 'image/dpx',
+ 'dra' => 'audio/vnd.dra',
+ 'drle' => 'image/dicom-rle',
+ 'dsc' => 'text/prs.lines.tag',
+ 'dssc' => 'application/dssc+der',
+ 'dtb' => 'application/x-dtbook+xml',
+ 'dtd' => 'application/xml-dtd',
+ 'dts' => 'audio/vnd.dts',
+ 'dtshd' => 'audio/vnd.dts.hd',
+ 'dump' => 'application/octet-stream',
+ 'dvb' => 'video/vnd.dvb.file',
+ 'dvi' => 'application/x-dvi',
+ 'dwd' => 'application/atsc-dwd+xml',
+ 'dwf' => 'model/vnd.dwf',
+ 'dwg' => 'image/vnd.dwg',
+ 'dxf' => 'image/vnd.dxf',
+ 'dxp' => 'application/vnd.spotfire.dxp',
+ 'dxr' => 'application/x-director',
+ 'ear' => 'application/java-archive',
+ 'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
+ 'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
+ 'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
+ 'ecma' => 'application/ecmascript',
+ 'edm' => 'application/vnd.novadigm.edm',
+ 'edx' => 'application/vnd.novadigm.edx',
+ 'efif' => 'application/vnd.picsel',
+ 'ei6' => 'application/vnd.pg.osasli',
+ 'elc' => 'application/octet-stream',
+ 'emf' => 'image/emf',
+ 'eml' => 'message/rfc822',
+ 'emma' => 'application/emma+xml',
+ 'emotionml' => 'application/emotionml+xml',
+ 'emz' => 'application/x-msmetafile',
+ 'eol' => 'audio/vnd.digital-winds',
+ 'eot' => 'application/vnd.ms-fontobject',
+ 'eps' => 'application/postscript',
+ 'epub' => 'application/epub+zip',
+ 'es3' => 'application/vnd.eszigno3+xml',
+ 'esa' => 'application/vnd.osgi.subsystem',
+ 'esf' => 'application/vnd.epson.esf',
+ 'et3' => 'application/vnd.eszigno3+xml',
+ 'etx' => 'text/x-setext',
+ 'eva' => 'application/x-eva',
+ 'evy' => 'application/x-envoy',
+ 'exe' => 'application/octet-stream',
+ 'exi' => 'application/exi',
+ 'exp' => 'application/express',
+ 'exr' => 'image/aces',
+ 'ext' => 'application/vnd.novadigm.ext',
+ 'ez' => 'application/andrew-inset',
+ 'ez2' => 'application/vnd.ezpix-album',
+ 'ez3' => 'application/vnd.ezpix-package',
+ 'f' => 'text/x-fortran',
+ 'f4v' => 'video/mp4',
+ 'f77' => 'text/x-fortran',
+ 'f90' => 'text/x-fortran',
+ 'fbs' => 'image/vnd.fastbidsheet',
+ 'fcdt' => 'application/vnd.adobe.formscentral.fcdt',
+ 'fcs' => 'application/vnd.isac.fcs',
+ 'fdf' => 'application/vnd.fdf',
+ 'fdt' => 'application/fdt+xml',
+ 'fe_launch' => 'application/vnd.denovo.fcselayout-link',
+ 'fg5' => 'application/vnd.fujitsu.oasysgp',
+ 'fgd' => 'application/x-director',
+ 'fh' => 'image/x-freehand',
+ 'fh4' => 'image/x-freehand',
+ 'fh5' => 'image/x-freehand',
+ 'fh7' => 'image/x-freehand',
+ 'fhc' => 'image/x-freehand',
+ 'fig' => 'application/x-xfig',
+ 'fits' => 'image/fits',
+ 'flac' => 'audio/x-flac',
+ 'fli' => 'video/x-fli',
+ 'flo' => 'application/vnd.micrografx.flo',
+ 'flv' => 'video/x-flv',
+ 'flw' => 'application/vnd.kde.kivio',
+ 'flx' => 'text/vnd.fmi.flexstor',
+ 'fly' => 'text/vnd.fly',
+ 'fm' => 'application/vnd.framemaker',
+ 'fnc' => 'application/vnd.frogans.fnc',
+ 'fo' => 'application/vnd.software602.filler.form+xml',
+ 'for' => 'text/x-fortran',
+ 'fpx' => 'image/vnd.fpx',
+ 'frame' => 'application/vnd.framemaker',
+ 'fsc' => 'application/vnd.fsc.weblaunch',
+ 'fst' => 'image/vnd.fst',
+ 'ftc' => 'application/vnd.fluxtime.clip',
+ 'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
+ 'fvt' => 'video/vnd.fvt',
+ 'fxp' => 'application/vnd.adobe.fxp',
+ 'fxpl' => 'application/vnd.adobe.fxp',
+ 'fzs' => 'application/vnd.fuzzysheet',
+ 'g2w' => 'application/vnd.geoplan',
+ 'g3' => 'image/g3fax',
+ 'g3w' => 'application/vnd.geospace',
+ 'gac' => 'application/vnd.groove-account',
+ 'gam' => 'application/x-tads',
+ 'gbr' => 'application/rpki-ghostbusters',
+ 'gca' => 'application/x-gca-compressed',
+ 'gdl' => 'model/vnd.gdl',
+ 'gdoc' => 'application/vnd.google-apps.document',
+ 'ged' => 'text/vnd.familysearch.gedcom',
+ 'geo' => 'application/vnd.dynageo',
+ 'geojson' => 'application/geo+json',
+ 'gex' => 'application/vnd.geometry-explorer',
+ 'ggb' => 'application/vnd.geogebra.file',
+ 'ggt' => 'application/vnd.geogebra.tool',
+ 'ghf' => 'application/vnd.groove-help',
+ 'gif' => 'image/gif',
+ 'gim' => 'application/vnd.groove-identity-message',
+ 'glb' => 'model/gltf-binary',
+ 'gltf' => 'model/gltf+json',
+ 'gml' => 'application/gml+xml',
+ 'gmx' => 'application/vnd.gmx',
+ 'gnumeric' => 'application/x-gnumeric',
+ 'gpg' => 'application/gpg-keys',
+ 'gph' => 'application/vnd.flographit',
+ 'gpx' => 'application/gpx+xml',
+ 'gqf' => 'application/vnd.grafeq',
+ 'gqs' => 'application/vnd.grafeq',
+ 'gram' => 'application/srgs',
+ 'gramps' => 'application/x-gramps-xml',
+ 'gre' => 'application/vnd.geometry-explorer',
+ 'grv' => 'application/vnd.groove-injector',
+ 'grxml' => 'application/srgs+xml',
+ 'gsf' => 'application/x-font-ghostscript',
+ 'gsheet' => 'application/vnd.google-apps.spreadsheet',
+ 'gslides' => 'application/vnd.google-apps.presentation',
+ 'gtar' => 'application/x-gtar',
+ 'gtm' => 'application/vnd.groove-tool-message',
+ 'gtw' => 'model/vnd.gtw',
+ 'gv' => 'text/vnd.graphviz',
+ 'gxf' => 'application/gxf',
+ 'gxt' => 'application/vnd.geonext',
+ 'gz' => 'application/gzip',
+ 'gzip' => 'application/gzip',
+ 'h' => 'text/x-c',
+ 'h261' => 'video/h261',
+ 'h263' => 'video/h263',
+ 'h264' => 'video/h264',
+ 'hal' => 'application/vnd.hal+xml',
+ 'hbci' => 'application/vnd.hbci',
+ 'hbs' => 'text/x-handlebars-template',
+ 'hdd' => 'application/x-virtualbox-hdd',
+ 'hdf' => 'application/x-hdf',
+ 'heic' => 'image/heic',
+ 'heics' => 'image/heic-sequence',
+ 'heif' => 'image/heif',
+ 'heifs' => 'image/heif-sequence',
+ 'hej2' => 'image/hej2k',
+ 'held' => 'application/atsc-held+xml',
+ 'hh' => 'text/x-c',
+ 'hjson' => 'application/hjson',
+ 'hlp' => 'application/winhlp',
+ 'hpgl' => 'application/vnd.hp-hpgl',
+ 'hpid' => 'application/vnd.hp-hpid',
+ 'hps' => 'application/vnd.hp-hps',
+ 'hqx' => 'application/mac-binhex40',
+ 'hsj2' => 'image/hsj2',
+ 'htc' => 'text/x-component',
+ 'htke' => 'application/vnd.kenameaapp',
+ 'htm' => 'text/html',
+ 'html' => 'text/html',
+ 'hvd' => 'application/vnd.yamaha.hv-dic',
+ 'hvp' => 'application/vnd.yamaha.hv-voice',
+ 'hvs' => 'application/vnd.yamaha.hv-script',
+ 'i2g' => 'application/vnd.intergeo',
+ 'icc' => 'application/vnd.iccprofile',
+ 'ice' => 'x-conference/x-cooltalk',
+ 'icm' => 'application/vnd.iccprofile',
+ 'ico' => 'image/x-icon',
+ 'ics' => 'text/calendar',
+ 'ief' => 'image/ief',
+ 'ifb' => 'text/calendar',
+ 'ifm' => 'application/vnd.shana.informed.formdata',
+ 'iges' => 'model/iges',
+ 'igl' => 'application/vnd.igloader',
+ 'igm' => 'application/vnd.insors.igm',
+ 'igs' => 'model/iges',
+ 'igx' => 'application/vnd.micrografx.igx',
+ 'iif' => 'application/vnd.shana.informed.interchange',
+ 'img' => 'application/octet-stream',
+ 'imp' => 'application/vnd.accpac.simply.imp',
+ 'ims' => 'application/vnd.ms-ims',
+ 'in' => 'text/plain',
+ 'ini' => 'text/plain',
+ 'ink' => 'application/inkml+xml',
+ 'inkml' => 'application/inkml+xml',
+ 'install' => 'application/x-install-instructions',
+ 'iota' => 'application/vnd.astraea-software.iota',
+ 'ipfix' => 'application/ipfix',
+ 'ipk' => 'application/vnd.shana.informed.package',
+ 'irm' => 'application/vnd.ibm.rights-management',
+ 'irp' => 'application/vnd.irepository.package+xml',
+ 'iso' => 'application/x-iso9660-image',
+ 'itp' => 'application/vnd.shana.informed.formtemplate',
+ 'its' => 'application/its+xml',
+ 'ivp' => 'application/vnd.immervision-ivp',
+ 'ivu' => 'application/vnd.immervision-ivu',
+ 'jad' => 'text/vnd.sun.j2me.app-descriptor',
+ 'jade' => 'text/jade',
+ 'jam' => 'application/vnd.jam',
+ 'jar' => 'application/java-archive',
+ 'jardiff' => 'application/x-java-archive-diff',
+ 'java' => 'text/x-java-source',
+ 'jhc' => 'image/jphc',
+ 'jisp' => 'application/vnd.jisp',
+ 'jls' => 'image/jls',
+ 'jlt' => 'application/vnd.hp-jlyt',
+ 'jng' => 'image/x-jng',
+ 'jnlp' => 'application/x-java-jnlp-file',
+ 'joda' => 'application/vnd.joost.joda-archive',
+ 'jp2' => 'image/jp2',
+ 'jpe' => 'image/jpeg',
+ 'jpeg' => 'image/jpeg',
+ 'jpf' => 'image/jpx',
+ 'jpg' => 'image/jpeg',
+ 'jpg2' => 'image/jp2',
+ 'jpgm' => 'video/jpm',
+ 'jpgv' => 'video/jpeg',
+ 'jph' => 'image/jph',
+ 'jpm' => 'video/jpm',
+ 'jpx' => 'image/jpx',
+ 'js' => 'application/javascript',
+ 'json' => 'application/json',
+ 'json5' => 'application/json5',
+ 'jsonld' => 'application/ld+json',
+ 'jsonml' => 'application/jsonml+json',
+ 'jsx' => 'text/jsx',
+ 'jt' => 'model/jt',
+ 'jxr' => 'image/jxr',
+ 'jxra' => 'image/jxra',
+ 'jxrs' => 'image/jxrs',
+ 'jxs' => 'image/jxs',
+ 'jxsc' => 'image/jxsc',
+ 'jxsi' => 'image/jxsi',
+ 'jxss' => 'image/jxss',
+ 'kar' => 'audio/midi',
+ 'karbon' => 'application/vnd.kde.karbon',
+ 'kdb' => 'application/octet-stream',
+ 'kdbx' => 'application/x-keepass2',
+ 'key' => 'application/x-iwork-keynote-sffkey',
+ 'kfo' => 'application/vnd.kde.kformula',
+ 'kia' => 'application/vnd.kidspiration',
+ 'kml' => 'application/vnd.google-earth.kml+xml',
+ 'kmz' => 'application/vnd.google-earth.kmz',
+ 'kne' => 'application/vnd.kinar',
+ 'knp' => 'application/vnd.kinar',
+ 'kon' => 'application/vnd.kde.kontour',
+ 'kpr' => 'application/vnd.kde.kpresenter',
+ 'kpt' => 'application/vnd.kde.kpresenter',
+ 'kpxx' => 'application/vnd.ds-keypoint',
+ 'ksp' => 'application/vnd.kde.kspread',
+ 'ktr' => 'application/vnd.kahootz',
+ 'ktx' => 'image/ktx',
+ 'ktx2' => 'image/ktx2',
+ 'ktz' => 'application/vnd.kahootz',
+ 'kwd' => 'application/vnd.kde.kword',
+ 'kwt' => 'application/vnd.kde.kword',
+ 'lasxml' => 'application/vnd.las.las+xml',
+ 'latex' => 'application/x-latex',
+ 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
+ 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
+ 'les' => 'application/vnd.hhe.lesson-player',
+ 'less' => 'text/less',
+ 'lgr' => 'application/lgr+xml',
+ 'lha' => 'application/octet-stream',
+ 'link66' => 'application/vnd.route66.link66+xml',
+ 'list' => 'text/plain',
+ 'list3820' => 'application/vnd.ibm.modcap',
+ 'listafp' => 'application/vnd.ibm.modcap',
+ 'litcoffee' => 'text/coffeescript',
+ 'lnk' => 'application/x-ms-shortcut',
+ 'log' => 'text/plain',
+ 'lostxml' => 'application/lost+xml',
+ 'lrf' => 'application/octet-stream',
+ 'lrm' => 'application/vnd.ms-lrm',
+ 'ltf' => 'application/vnd.frogans.ltf',
+ 'lua' => 'text/x-lua',
+ 'luac' => 'application/x-lua-bytecode',
+ 'lvp' => 'audio/vnd.lucent.voice',
+ 'lwp' => 'application/vnd.lotus-wordpro',
+ 'lzh' => 'application/octet-stream',
+ 'm1v' => 'video/mpeg',
+ 'm2a' => 'audio/mpeg',
+ 'm2v' => 'video/mpeg',
+ 'm3a' => 'audio/mpeg',
+ 'm3u' => 'text/plain',
+ 'm3u8' => 'application/vnd.apple.mpegurl',
+ 'm4a' => 'audio/x-m4a',
+ 'm4p' => 'application/mp4',
+ 'm4s' => 'video/iso.segment',
+ 'm4u' => 'application/vnd.mpegurl',
+ 'm4v' => 'video/x-m4v',
+ 'm13' => 'application/x-msmediaview',
+ 'm14' => 'application/x-msmediaview',
+ 'm21' => 'application/mp21',
+ 'ma' => 'application/mathematica',
+ 'mads' => 'application/mads+xml',
+ 'maei' => 'application/mmt-aei+xml',
+ 'mag' => 'application/vnd.ecowin.chart',
+ 'maker' => 'application/vnd.framemaker',
+ 'man' => 'text/troff',
+ 'manifest' => 'text/cache-manifest',
+ 'map' => 'application/json',
+ 'mar' => 'application/octet-stream',
+ 'markdown' => 'text/markdown',
+ 'mathml' => 'application/mathml+xml',
+ 'mb' => 'application/mathematica',
+ 'mbk' => 'application/vnd.mobius.mbk',
+ 'mbox' => 'application/mbox',
+ 'mc1' => 'application/vnd.medcalcdata',
+ 'mcd' => 'application/vnd.mcd',
+ 'mcurl' => 'text/vnd.curl.mcurl',
+ 'md' => 'text/markdown',
+ 'mdb' => 'application/x-msaccess',
+ 'mdi' => 'image/vnd.ms-modi',
+ 'mdx' => 'text/mdx',
+ 'me' => 'text/troff',
+ 'mesh' => 'model/mesh',
+ 'meta4' => 'application/metalink4+xml',
+ 'metalink' => 'application/metalink+xml',
+ 'mets' => 'application/mets+xml',
+ 'mfm' => 'application/vnd.mfmp',
+ 'mft' => 'application/rpki-manifest',
+ 'mgp' => 'application/vnd.osgeo.mapguide.package',
+ 'mgz' => 'application/vnd.proteus.magazine',
+ 'mid' => 'audio/midi',
+ 'midi' => 'audio/midi',
+ 'mie' => 'application/x-mie',
+ 'mif' => 'application/vnd.mif',
+ 'mime' => 'message/rfc822',
+ 'mj2' => 'video/mj2',
+ 'mjp2' => 'video/mj2',
+ 'mjs' => 'text/javascript',
+ 'mk3d' => 'video/x-matroska',
+ 'mka' => 'audio/x-matroska',
+ 'mkd' => 'text/x-markdown',
+ 'mks' => 'video/x-matroska',
+ 'mkv' => 'video/x-matroska',
+ 'mlp' => 'application/vnd.dolby.mlp',
+ 'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
+ 'mmf' => 'application/vnd.smaf',
+ 'mml' => 'text/mathml',
+ 'mmr' => 'image/vnd.fujixerox.edmics-mmr',
+ 'mng' => 'video/x-mng',
+ 'mny' => 'application/x-msmoney',
+ 'mobi' => 'application/x-mobipocket-ebook',
+ 'mods' => 'application/mods+xml',
+ 'mov' => 'video/quicktime',
+ 'movie' => 'video/x-sgi-movie',
+ 'mp2' => 'audio/mpeg',
+ 'mp2a' => 'audio/mpeg',
+ 'mp3' => 'audio/mpeg',
+ 'mp4' => 'video/mp4',
+ 'mp4a' => 'audio/mp4',
+ 'mp4s' => 'application/mp4',
+ 'mp4v' => 'video/mp4',
+ 'mp21' => 'application/mp21',
+ 'mpc' => 'application/vnd.mophun.certificate',
+ 'mpd' => 'application/dash+xml',
+ 'mpe' => 'video/mpeg',
+ 'mpeg' => 'video/mpeg',
+ 'mpf' => 'application/media-policy-dataset+xml',
+ 'mpg' => 'video/mpeg',
+ 'mpg4' => 'video/mp4',
+ 'mpga' => 'audio/mpeg',
+ 'mpkg' => 'application/vnd.apple.installer+xml',
+ 'mpm' => 'application/vnd.blueice.multipass',
+ 'mpn' => 'application/vnd.mophun.application',
+ 'mpp' => 'application/vnd.ms-project',
+ 'mpt' => 'application/vnd.ms-project',
+ 'mpy' => 'application/vnd.ibm.minipay',
+ 'mqy' => 'application/vnd.mobius.mqy',
+ 'mrc' => 'application/marc',
+ 'mrcx' => 'application/marcxml+xml',
+ 'ms' => 'text/troff',
+ 'mscml' => 'application/mediaservercontrol+xml',
+ 'mseed' => 'application/vnd.fdsn.mseed',
+ 'mseq' => 'application/vnd.mseq',
+ 'msf' => 'application/vnd.epson.msf',
+ 'msg' => 'application/vnd.ms-outlook',
+ 'msh' => 'model/mesh',
+ 'msi' => 'application/x-msdownload',
+ 'msix' => 'application/msix',
+ 'msixbundle' => 'application/msixbundle',
+ 'msl' => 'application/vnd.mobius.msl',
+ 'msm' => 'application/octet-stream',
+ 'msp' => 'application/octet-stream',
+ 'msty' => 'application/vnd.muvee.style',
+ 'mtl' => 'model/mtl',
+ 'mts' => 'model/vnd.mts',
+ 'mus' => 'application/vnd.musician',
+ 'musd' => 'application/mmt-usd+xml',
+ 'musicxml' => 'application/vnd.recordare.musicxml+xml',
+ 'mvb' => 'application/x-msmediaview',
+ 'mvt' => 'application/vnd.mapbox-vector-tile',
+ 'mwf' => 'application/vnd.mfer',
+ 'mxf' => 'application/mxf',
+ 'mxl' => 'application/vnd.recordare.musicxml',
+ 'mxmf' => 'audio/mobile-xmf',
+ 'mxml' => 'application/xv+xml',
+ 'mxs' => 'application/vnd.triscape.mxs',
+ 'mxu' => 'video/vnd.mpegurl',
+ 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
+ 'n3' => 'text/n3',
+ 'nb' => 'application/mathematica',
+ 'nbp' => 'application/vnd.wolfram.player',
+ 'nc' => 'application/x-netcdf',
+ 'ncx' => 'application/x-dtbncx+xml',
+ 'nfo' => 'text/x-nfo',
+ 'ngdat' => 'application/vnd.nokia.n-gage.data',
+ 'nitf' => 'application/vnd.nitf',
+ 'nlu' => 'application/vnd.neurolanguage.nlu',
+ 'nml' => 'application/vnd.enliven',
+ 'nnd' => 'application/vnd.noblenet-directory',
+ 'nns' => 'application/vnd.noblenet-sealer',
+ 'nnw' => 'application/vnd.noblenet-web',
+ 'npx' => 'image/vnd.net-fpx',
+ 'nq' => 'application/n-quads',
+ 'nsc' => 'application/x-conference',
+ 'nsf' => 'application/vnd.lotus-notes',
+ 'nt' => 'application/n-triples',
+ 'ntf' => 'application/vnd.nitf',
+ 'numbers' => 'application/x-iwork-numbers-sffnumbers',
+ 'nzb' => 'application/x-nzb',
+ 'oa2' => 'application/vnd.fujitsu.oasys2',
+ 'oa3' => 'application/vnd.fujitsu.oasys3',
+ 'oas' => 'application/vnd.fujitsu.oasys',
+ 'obd' => 'application/x-msbinder',
+ 'obgx' => 'application/vnd.openblox.game+xml',
+ 'obj' => 'model/obj',
+ 'oda' => 'application/oda',
+ 'odb' => 'application/vnd.oasis.opendocument.database',
+ 'odc' => 'application/vnd.oasis.opendocument.chart',
+ 'odf' => 'application/vnd.oasis.opendocument.formula',
+ 'odft' => 'application/vnd.oasis.opendocument.formula-template',
+ 'odg' => 'application/vnd.oasis.opendocument.graphics',
+ 'odi' => 'application/vnd.oasis.opendocument.image',
+ 'odm' => 'application/vnd.oasis.opendocument.text-master',
+ 'odp' => 'application/vnd.oasis.opendocument.presentation',
+ 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
+ 'odt' => 'application/vnd.oasis.opendocument.text',
+ 'oga' => 'audio/ogg',
+ 'ogex' => 'model/vnd.opengex',
+ 'ogg' => 'audio/ogg',
+ 'ogv' => 'video/ogg',
+ 'ogx' => 'application/ogg',
+ 'omdoc' => 'application/omdoc+xml',
+ 'onepkg' => 'application/onenote',
+ 'onetmp' => 'application/onenote',
+ 'onetoc' => 'application/onenote',
+ 'onetoc2' => 'application/onenote',
+ 'opf' => 'application/oebps-package+xml',
+ 'opml' => 'text/x-opml',
+ 'oprc' => 'application/vnd.palm',
+ 'opus' => 'audio/ogg',
+ 'org' => 'text/x-org',
+ 'osf' => 'application/vnd.yamaha.openscoreformat',
+ 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
+ 'osm' => 'application/vnd.openstreetmap.data+xml',
+ 'otc' => 'application/vnd.oasis.opendocument.chart-template',
+ 'otf' => 'font/otf',
+ 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
+ 'oth' => 'application/vnd.oasis.opendocument.text-web',
+ 'oti' => 'application/vnd.oasis.opendocument.image-template',
+ 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
+ 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
+ 'ott' => 'application/vnd.oasis.opendocument.text-template',
+ 'ova' => 'application/x-virtualbox-ova',
+ 'ovf' => 'application/x-virtualbox-ovf',
+ 'owl' => 'application/rdf+xml',
+ 'oxps' => 'application/oxps',
+ 'oxt' => 'application/vnd.openofficeorg.extension',
+ 'p' => 'text/x-pascal',
+ 'p7a' => 'application/x-pkcs7-signature',
+ 'p7b' => 'application/x-pkcs7-certificates',
+ 'p7c' => 'application/pkcs7-mime',
+ 'p7m' => 'application/pkcs7-mime',
+ 'p7r' => 'application/x-pkcs7-certreqresp',
+ 'p7s' => 'application/pkcs7-signature',
+ 'p8' => 'application/pkcs8',
+ 'p10' => 'application/x-pkcs10',
+ 'p12' => 'application/x-pkcs12',
+ 'pac' => 'application/x-ns-proxy-autoconfig',
+ 'pages' => 'application/x-iwork-pages-sffpages',
+ 'pas' => 'text/x-pascal',
+ 'paw' => 'application/vnd.pawaafile',
+ 'pbd' => 'application/vnd.powerbuilder6',
+ 'pbm' => 'image/x-portable-bitmap',
+ 'pcap' => 'application/vnd.tcpdump.pcap',
+ 'pcf' => 'application/x-font-pcf',
+ 'pcl' => 'application/vnd.hp-pcl',
+ 'pclxl' => 'application/vnd.hp-pclxl',
+ 'pct' => 'image/x-pict',
+ 'pcurl' => 'application/vnd.curl.pcurl',
+ 'pcx' => 'image/x-pcx',
+ 'pdb' => 'application/x-pilot',
+ 'pde' => 'text/x-processing',
+ 'pdf' => 'application/pdf',
+ 'pem' => 'application/x-x509-user-cert',
+ 'pfa' => 'application/x-font-type1',
+ 'pfb' => 'application/x-font-type1',
+ 'pfm' => 'application/x-font-type1',
+ 'pfr' => 'application/font-tdpfr',
+ 'pfx' => 'application/x-pkcs12',
+ 'pgm' => 'image/x-portable-graymap',
+ 'pgn' => 'application/x-chess-pgn',
+ 'pgp' => 'application/pgp',
+ 'phar' => 'application/octet-stream',
+ 'php' => 'application/x-httpd-php',
+ 'php3' => 'application/x-httpd-php',
+ 'php4' => 'application/x-httpd-php',
+ 'phps' => 'application/x-httpd-php-source',
+ 'phtml' => 'application/x-httpd-php',
+ 'pic' => 'image/x-pict',
+ 'pkg' => 'application/octet-stream',
+ 'pki' => 'application/pkixcmp',
+ 'pkipath' => 'application/pkix-pkipath',
+ 'pkpass' => 'application/vnd.apple.pkpass',
+ 'pl' => 'application/x-perl',
+ 'plb' => 'application/vnd.3gpp.pic-bw-large',
+ 'plc' => 'application/vnd.mobius.plc',
+ 'plf' => 'application/vnd.pocketlearn',
+ 'pls' => 'application/pls+xml',
+ 'pm' => 'application/x-perl',
+ 'pml' => 'application/vnd.ctc-posml',
+ 'png' => 'image/png',
+ 'pnm' => 'image/x-portable-anymap',
+ 'portpkg' => 'application/vnd.macports.portpkg',
+ 'pot' => 'application/vnd.ms-powerpoint',
+ 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
+ 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
+ 'ppa' => 'application/vnd.ms-powerpoint',
+ 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
+ 'ppd' => 'application/vnd.cups-ppd',
+ 'ppm' => 'image/x-portable-pixmap',
+ 'pps' => 'application/vnd.ms-powerpoint',
+ 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
+ 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
+ 'ppt' => 'application/powerpoint',
+ 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'pqa' => 'application/vnd.palm',
+ 'prc' => 'model/prc',
+ 'pre' => 'application/vnd.lotus-freelance',
+ 'prf' => 'application/pics-rules',
+ 'provx' => 'application/provenance+xml',
+ 'ps' => 'application/postscript',
+ 'psb' => 'application/vnd.3gpp.pic-bw-small',
+ 'psd' => 'application/x-photoshop',
+ 'psf' => 'application/x-font-linux-psf',
+ 'pskcxml' => 'application/pskc+xml',
+ 'pti' => 'image/prs.pti',
+ 'ptid' => 'application/vnd.pvi.ptid1',
+ 'pub' => 'application/x-mspublisher',
+ 'pvb' => 'application/vnd.3gpp.pic-bw-var',
+ 'pwn' => 'application/vnd.3m.post-it-notes',
+ 'pya' => 'audio/vnd.ms-playready.media.pya',
+ 'pyo' => 'model/vnd.pytha.pyox',
+ 'pyox' => 'model/vnd.pytha.pyox',
+ 'pyv' => 'video/vnd.ms-playready.media.pyv',
+ 'qam' => 'application/vnd.epson.quickanime',
+ 'qbo' => 'application/vnd.intu.qbo',
+ 'qfx' => 'application/vnd.intu.qfx',
+ 'qps' => 'application/vnd.publishare-delta-tree',
+ 'qt' => 'video/quicktime',
+ 'qwd' => 'application/vnd.quark.quarkxpress',
+ 'qwt' => 'application/vnd.quark.quarkxpress',
+ 'qxb' => 'application/vnd.quark.quarkxpress',
+ 'qxd' => 'application/vnd.quark.quarkxpress',
+ 'qxl' => 'application/vnd.quark.quarkxpress',
+ 'qxt' => 'application/vnd.quark.quarkxpress',
+ 'ra' => 'audio/x-realaudio',
+ 'ram' => 'audio/x-pn-realaudio',
+ 'raml' => 'application/raml+yaml',
+ 'rapd' => 'application/route-apd+xml',
+ 'rar' => 'application/x-rar',
+ 'ras' => 'image/x-cmu-raster',
+ 'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
+ 'rdf' => 'application/rdf+xml',
+ 'rdz' => 'application/vnd.data-vision.rdz',
+ 'relo' => 'application/p2p-overlay+xml',
+ 'rep' => 'application/vnd.businessobjects',
+ 'res' => 'application/x-dtbresource+xml',
+ 'rgb' => 'image/x-rgb',
+ 'rif' => 'application/reginfo+xml',
+ 'rip' => 'audio/vnd.rip',
+ 'ris' => 'application/x-research-info-systems',
+ 'rl' => 'application/resource-lists+xml',
+ 'rlc' => 'image/vnd.fujixerox.edmics-rlc',
+ 'rld' => 'application/resource-lists-diff+xml',
+ 'rm' => 'audio/x-pn-realaudio',
+ 'rmi' => 'audio/midi',
+ 'rmp' => 'audio/x-pn-realaudio-plugin',
+ 'rms' => 'application/vnd.jcp.javame.midlet-rms',
+ 'rmvb' => 'application/vnd.rn-realmedia-vbr',
+ 'rnc' => 'application/relax-ng-compact-syntax',
+ 'rng' => 'application/xml',
+ 'roa' => 'application/rpki-roa',
+ 'roff' => 'text/troff',
+ 'rp9' => 'application/vnd.cloanto.rp9',
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
+ 'rpss' => 'application/vnd.nokia.radio-presets',
+ 'rpst' => 'application/vnd.nokia.radio-preset',
+ 'rq' => 'application/sparql-query',
+ 'rs' => 'application/rls-services+xml',
+ 'rsa' => 'application/x-pkcs7',
+ 'rsat' => 'application/atsc-rsat+xml',
+ 'rsd' => 'application/rsd+xml',
+ 'rsheet' => 'application/urc-ressheet+xml',
+ 'rss' => 'application/rss+xml',
+ 'rtf' => 'text/rtf',
+ 'rtx' => 'text/richtext',
+ 'run' => 'application/x-makeself',
+ 'rusd' => 'application/route-usd+xml',
+ 'rv' => 'video/vnd.rn-realvideo',
+ 's' => 'text/x-asm',
+ 's3m' => 'audio/s3m',
+ 'saf' => 'application/vnd.yamaha.smaf-audio',
+ 'sass' => 'text/x-sass',
+ 'sbml' => 'application/sbml+xml',
+ 'sc' => 'application/vnd.ibm.secure-container',
+ 'scd' => 'application/x-msschedule',
+ 'scm' => 'application/vnd.lotus-screencam',
+ 'scq' => 'application/scvp-cv-request',
+ 'scs' => 'application/scvp-cv-response',
+ 'scss' => 'text/x-scss',
+ 'scurl' => 'text/vnd.curl.scurl',
+ 'sda' => 'application/vnd.stardivision.draw',
+ 'sdc' => 'application/vnd.stardivision.calc',
+ 'sdd' => 'application/vnd.stardivision.impress',
+ 'sdkd' => 'application/vnd.solent.sdkm+xml',
+ 'sdkm' => 'application/vnd.solent.sdkm+xml',
+ 'sdp' => 'application/sdp',
+ 'sdw' => 'application/vnd.stardivision.writer',
+ 'sea' => 'application/octet-stream',
+ 'see' => 'application/vnd.seemail',
+ 'seed' => 'application/vnd.fdsn.seed',
+ 'sema' => 'application/vnd.sema',
+ 'semd' => 'application/vnd.semd',
+ 'semf' => 'application/vnd.semf',
+ 'senmlx' => 'application/senml+xml',
+ 'sensmlx' => 'application/sensml+xml',
+ 'ser' => 'application/java-serialized-object',
+ 'setpay' => 'application/set-payment-initiation',
+ 'setreg' => 'application/set-registration-initiation',
+ 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
+ 'sfs' => 'application/vnd.spotfire.sfs',
+ 'sfv' => 'text/x-sfv',
+ 'sgi' => 'image/sgi',
+ 'sgl' => 'application/vnd.stardivision.writer-global',
+ 'sgm' => 'text/sgml',
+ 'sgml' => 'text/sgml',
+ 'sh' => 'application/x-sh',
+ 'shar' => 'application/x-shar',
+ 'shex' => 'text/shex',
+ 'shf' => 'application/shf+xml',
+ 'shtml' => 'text/html',
+ 'sid' => 'image/x-mrsid-image',
+ 'sieve' => 'application/sieve',
+ 'sig' => 'application/pgp-signature',
+ 'sil' => 'audio/silk',
+ 'silo' => 'model/mesh',
+ 'sis' => 'application/vnd.symbian.install',
+ 'sisx' => 'application/vnd.symbian.install',
+ 'sit' => 'application/x-stuffit',
+ 'sitx' => 'application/x-stuffitx',
+ 'siv' => 'application/sieve',
+ 'skd' => 'application/vnd.koan',
+ 'skm' => 'application/vnd.koan',
+ 'skp' => 'application/vnd.koan',
+ 'skt' => 'application/vnd.koan',
+ 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
+ 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
+ 'slim' => 'text/slim',
+ 'slm' => 'text/slim',
+ 'sls' => 'application/route-s-tsid+xml',
+ 'slt' => 'application/vnd.epson.salt',
+ 'sm' => 'application/vnd.stepmania.stepchart',
+ 'smf' => 'application/vnd.stardivision.math',
+ 'smi' => 'application/smil',
+ 'smil' => 'application/smil',
+ 'smv' => 'video/x-smv',
+ 'smzip' => 'application/vnd.stepmania.package',
+ 'snd' => 'audio/basic',
+ 'snf' => 'application/x-font-snf',
+ 'so' => 'application/octet-stream',
+ 'spc' => 'application/x-pkcs7-certificates',
+ 'spdx' => 'text/spdx',
+ 'spf' => 'application/vnd.yamaha.smaf-phrase',
+ 'spl' => 'application/x-futuresplash',
+ 'spot' => 'text/vnd.in3d.spot',
+ 'spp' => 'application/scvp-vp-response',
+ 'spq' => 'application/scvp-vp-request',
+ 'spx' => 'audio/ogg',
+ 'sql' => 'application/x-sql',
+ 'src' => 'application/x-wais-source',
+ 'srt' => 'application/x-subrip',
+ 'sru' => 'application/sru+xml',
+ 'srx' => 'application/sparql-results+xml',
+ 'ssdl' => 'application/ssdl+xml',
+ 'sse' => 'application/vnd.kodak-descriptor',
+ 'ssf' => 'application/vnd.epson.ssf',
+ 'ssml' => 'application/ssml+xml',
+ 'sst' => 'application/octet-stream',
+ 'st' => 'application/vnd.sailingtracker.track',
+ 'stc' => 'application/vnd.sun.xml.calc.template',
+ 'std' => 'application/vnd.sun.xml.draw.template',
+ 'step' => 'application/STEP',
+ 'stf' => 'application/vnd.wt.stf',
+ 'sti' => 'application/vnd.sun.xml.impress.template',
+ 'stk' => 'application/hyperstudio',
+ 'stl' => 'model/stl',
+ 'stp' => 'application/STEP',
+ 'stpx' => 'model/step+xml',
+ 'stpxz' => 'model/step-xml+zip',
+ 'stpz' => 'model/step+zip',
+ 'str' => 'application/vnd.pg.format',
+ 'stw' => 'application/vnd.sun.xml.writer.template',
+ 'styl' => 'text/stylus',
+ 'stylus' => 'text/stylus',
+ 'sub' => 'text/vnd.dvb.subtitle',
+ 'sus' => 'application/vnd.sus-calendar',
+ 'susp' => 'application/vnd.sus-calendar',
+ 'sv4cpio' => 'application/x-sv4cpio',
+ 'sv4crc' => 'application/x-sv4crc',
+ 'svc' => 'application/vnd.dvb.service',
+ 'svd' => 'application/vnd.svd',
+ 'svg' => 'image/svg+xml',
+ 'svgz' => 'image/svg+xml',
+ 'swa' => 'application/x-director',
+ 'swf' => 'application/x-shockwave-flash',
+ 'swi' => 'application/vnd.aristanetworks.swi',
+ 'swidtag' => 'application/swid+xml',
+ 'sxc' => 'application/vnd.sun.xml.calc',
+ 'sxd' => 'application/vnd.sun.xml.draw',
+ 'sxg' => 'application/vnd.sun.xml.writer.global',
+ 'sxi' => 'application/vnd.sun.xml.impress',
+ 'sxm' => 'application/vnd.sun.xml.math',
+ 'sxw' => 'application/vnd.sun.xml.writer',
+ 't' => 'text/troff',
+ 't3' => 'application/x-t3vm-image',
+ 't38' => 'image/t38',
+ 'taglet' => 'application/vnd.mynfc',
+ 'tao' => 'application/vnd.tao.intent-module-archive',
+ 'tap' => 'image/vnd.tencent.tap',
+ 'tar' => 'application/x-tar',
+ 'tcap' => 'application/vnd.3gpp2.tcap',
+ 'tcl' => 'application/x-tcl',
+ 'td' => 'application/urc-targetdesc+xml',
+ 'teacher' => 'application/vnd.smart.teacher',
+ 'tei' => 'application/tei+xml',
+ 'teicorpus' => 'application/tei+xml',
+ 'tex' => 'application/x-tex',
+ 'texi' => 'application/x-texinfo',
+ 'texinfo' => 'application/x-texinfo',
+ 'text' => 'text/plain',
+ 'tfi' => 'application/thraud+xml',
+ 'tfm' => 'application/x-tex-tfm',
+ 'tfx' => 'image/tiff-fx',
+ 'tga' => 'image/x-tga',
+ 'tgz' => 'application/x-tar',
+ 'thmx' => 'application/vnd.ms-officetheme',
+ 'tif' => 'image/tiff',
+ 'tiff' => 'image/tiff',
+ 'tk' => 'application/x-tcl',
+ 'tmo' => 'application/vnd.tmobile-livetv',
+ 'toml' => 'application/toml',
+ 'torrent' => 'application/x-bittorrent',
+ 'tpl' => 'application/vnd.groove-tool-template',
+ 'tpt' => 'application/vnd.trid.tpt',
+ 'tr' => 'text/troff',
+ 'tra' => 'application/vnd.trueapp',
+ 'trig' => 'application/trig',
+ 'trm' => 'application/x-msterminal',
+ 'ts' => 'video/mp2t',
+ 'tsd' => 'application/timestamped-data',
+ 'tsv' => 'text/tab-separated-values',
+ 'ttc' => 'font/collection',
+ 'ttf' => 'font/ttf',
+ 'ttl' => 'text/turtle',
+ 'ttml' => 'application/ttml+xml',
+ 'twd' => 'application/vnd.simtech-mindmapper',
+ 'twds' => 'application/vnd.simtech-mindmapper',
+ 'txd' => 'application/vnd.genomatix.tuxedo',
+ 'txf' => 'application/vnd.mobius.txf',
+ 'txt' => 'text/plain',
+ 'u3d' => 'model/u3d',
+ 'u8dsn' => 'message/global-delivery-status',
+ 'u8hdr' => 'message/global-headers',
+ 'u8mdn' => 'message/global-disposition-notification',
+ 'u8msg' => 'message/global',
+ 'u32' => 'application/x-authorware-bin',
+ 'ubj' => 'application/ubjson',
+ 'udeb' => 'application/x-debian-package',
+ 'ufd' => 'application/vnd.ufdl',
+ 'ufdl' => 'application/vnd.ufdl',
+ 'ulx' => 'application/x-glulx',
+ 'umj' => 'application/vnd.umajin',
+ 'unityweb' => 'application/vnd.unity',
+ 'uo' => 'application/vnd.uoml+xml',
+ 'uoml' => 'application/vnd.uoml+xml',
+ 'uri' => 'text/uri-list',
+ 'uris' => 'text/uri-list',
+ 'urls' => 'text/uri-list',
+ 'usda' => 'model/vnd.usda',
+ 'usdz' => 'model/vnd.usdz+zip',
+ 'ustar' => 'application/x-ustar',
+ 'utz' => 'application/vnd.uiq.theme',
+ 'uu' => 'text/x-uuencode',
+ 'uva' => 'audio/vnd.dece.audio',
+ 'uvd' => 'application/vnd.dece.data',
+ 'uvf' => 'application/vnd.dece.data',
+ 'uvg' => 'image/vnd.dece.graphic',
+ 'uvh' => 'video/vnd.dece.hd',
+ 'uvi' => 'image/vnd.dece.graphic',
+ 'uvm' => 'video/vnd.dece.mobile',
+ 'uvp' => 'video/vnd.dece.pd',
+ 'uvs' => 'video/vnd.dece.sd',
+ 'uvt' => 'application/vnd.dece.ttml+xml',
+ 'uvu' => 'video/vnd.uvvu.mp4',
+ 'uvv' => 'video/vnd.dece.video',
+ 'uvva' => 'audio/vnd.dece.audio',
+ 'uvvd' => 'application/vnd.dece.data',
+ 'uvvf' => 'application/vnd.dece.data',
+ 'uvvg' => 'image/vnd.dece.graphic',
+ 'uvvh' => 'video/vnd.dece.hd',
+ 'uvvi' => 'image/vnd.dece.graphic',
+ 'uvvm' => 'video/vnd.dece.mobile',
+ 'uvvp' => 'video/vnd.dece.pd',
+ 'uvvs' => 'video/vnd.dece.sd',
+ 'uvvt' => 'application/vnd.dece.ttml+xml',
+ 'uvvu' => 'video/vnd.uvvu.mp4',
+ 'uvvv' => 'video/vnd.dece.video',
+ 'uvvx' => 'application/vnd.dece.unspecified',
+ 'uvvz' => 'application/vnd.dece.zip',
+ 'uvx' => 'application/vnd.dece.unspecified',
+ 'uvz' => 'application/vnd.dece.zip',
+ 'vbox' => 'application/x-virtualbox-vbox',
+ 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack',
+ 'vcard' => 'text/vcard',
+ 'vcd' => 'application/x-cdlink',
+ 'vcf' => 'text/x-vcard',
+ 'vcg' => 'application/vnd.groove-vcard',
+ 'vcs' => 'text/x-vcalendar',
+ 'vcx' => 'application/vnd.vcx',
+ 'vdi' => 'application/x-virtualbox-vdi',
+ 'vds' => 'model/vnd.sap.vds',
+ 'vhd' => 'application/x-virtualbox-vhd',
+ 'vis' => 'application/vnd.visionary',
+ 'viv' => 'video/vnd.vivo',
+ 'vlc' => 'application/videolan',
+ 'vmdk' => 'application/x-virtualbox-vmdk',
+ 'vob' => 'video/x-ms-vob',
+ 'vor' => 'application/vnd.stardivision.writer',
+ 'vox' => 'application/x-authorware-bin',
+ 'vrml' => 'model/vrml',
+ 'vsd' => 'application/vnd.visio',
+ 'vsf' => 'application/vnd.vsf',
+ 'vss' => 'application/vnd.visio',
+ 'vst' => 'application/vnd.visio',
+ 'vsw' => 'application/vnd.visio',
+ 'vtf' => 'image/vnd.valve.source.texture',
+ 'vtt' => 'text/vtt',
+ 'vtu' => 'model/vnd.vtu',
+ 'vxml' => 'application/voicexml+xml',
+ 'w3d' => 'application/x-director',
+ 'wad' => 'application/x-doom',
+ 'wadl' => 'application/vnd.sun.wadl+xml',
+ 'war' => 'application/java-archive',
+ 'wasm' => 'application/wasm',
+ 'wav' => 'audio/x-wav',
+ 'wax' => 'audio/x-ms-wax',
+ 'wbmp' => 'image/vnd.wap.wbmp',
+ 'wbs' => 'application/vnd.criticaltools.wbs+xml',
+ 'wbxml' => 'application/wbxml',
+ 'wcm' => 'application/vnd.ms-works',
+ 'wdb' => 'application/vnd.ms-works',
+ 'wdp' => 'image/vnd.ms-photo',
+ 'weba' => 'audio/webm',
+ 'webapp' => 'application/x-web-app-manifest+json',
+ 'webm' => 'video/webm',
+ 'webmanifest' => 'application/manifest+json',
+ 'webp' => 'image/webp',
+ 'wg' => 'application/vnd.pmi.widget',
+ 'wgsl' => 'text/wgsl',
+ 'wgt' => 'application/widget',
+ 'wif' => 'application/watcherinfo+xml',
+ 'wks' => 'application/vnd.ms-works',
+ 'wm' => 'video/x-ms-wm',
+ 'wma' => 'audio/x-ms-wma',
+ 'wmd' => 'application/x-ms-wmd',
+ 'wmf' => 'image/wmf',
+ 'wml' => 'text/vnd.wap.wml',
+ 'wmlc' => 'application/wmlc',
+ 'wmls' => 'text/vnd.wap.wmlscript',
+ 'wmlsc' => 'application/vnd.wap.wmlscriptc',
+ 'wmv' => 'video/x-ms-wmv',
+ 'wmx' => 'video/x-ms-wmx',
+ 'wmz' => 'application/x-msmetafile',
+ 'woff' => 'font/woff',
+ 'woff2' => 'font/woff2',
+ 'word' => 'application/msword',
+ 'wpd' => 'application/vnd.wordperfect',
+ 'wpl' => 'application/vnd.ms-wpl',
+ 'wps' => 'application/vnd.ms-works',
+ 'wqd' => 'application/vnd.wqd',
+ 'wri' => 'application/x-mswrite',
+ 'wrl' => 'model/vrml',
+ 'wsc' => 'message/vnd.wfa.wsc',
+ 'wsdl' => 'application/wsdl+xml',
+ 'wspolicy' => 'application/wspolicy+xml',
+ 'wtb' => 'application/vnd.webturbo',
+ 'wvx' => 'video/x-ms-wvx',
+ 'x3d' => 'model/x3d+xml',
+ 'x3db' => 'model/x3d+fastinfoset',
+ 'x3dbz' => 'model/x3d+binary',
+ 'x3dv' => 'model/x3d-vrml',
+ 'x3dvz' => 'model/x3d+vrml',
+ 'x3dz' => 'model/x3d+xml',
+ 'x32' => 'application/x-authorware-bin',
+ 'x_b' => 'model/vnd.parasolid.transmit.binary',
+ 'x_t' => 'model/vnd.parasolid.transmit.text',
+ 'xaml' => 'application/xaml+xml',
+ 'xap' => 'application/x-silverlight-app',
+ 'xar' => 'application/vnd.xara',
+ 'xav' => 'application/xcap-att+xml',
+ 'xbap' => 'application/x-ms-xbap',
+ 'xbd' => 'application/vnd.fujixerox.docuworks.binder',
+ 'xbm' => 'image/x-xbitmap',
+ 'xca' => 'application/xcap-caps+xml',
+ 'xcs' => 'application/calendar+xml',
+ 'xdf' => 'application/xcap-diff+xml',
+ 'xdm' => 'application/vnd.syncml.dm+xml',
+ 'xdp' => 'application/vnd.adobe.xdp+xml',
+ 'xdssc' => 'application/dssc+xml',
+ 'xdw' => 'application/vnd.fujixerox.docuworks',
+ 'xel' => 'application/xcap-el+xml',
+ 'xenc' => 'application/xenc+xml',
+ 'xer' => 'application/patch-ops-error+xml',
+ 'xfdf' => 'application/xfdf',
+ 'xfdl' => 'application/vnd.xfdl',
+ 'xht' => 'application/xhtml+xml',
+ 'xhtm' => 'application/vnd.pwg-xhtml-print+xml',
+ 'xhtml' => 'application/xhtml+xml',
+ 'xhvml' => 'application/xv+xml',
+ 'xif' => 'image/vnd.xiff',
+ 'xl' => 'application/excel',
+ 'xla' => 'application/vnd.ms-excel',
+ 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
+ 'xlc' => 'application/vnd.ms-excel',
+ 'xlf' => 'application/xliff+xml',
+ 'xlm' => 'application/vnd.ms-excel',
+ 'xls' => 'application/vnd.ms-excel',
+ 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
+ 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'xlt' => 'application/vnd.ms-excel',
+ 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
+ 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
+ 'xlw' => 'application/vnd.ms-excel',
+ 'xm' => 'audio/xm',
+ 'xml' => 'application/xml',
+ 'xns' => 'application/xcap-ns+xml',
+ 'xo' => 'application/vnd.olpc-sugar',
+ 'xop' => 'application/xop+xml',
+ 'xpi' => 'application/x-xpinstall',
+ 'xpl' => 'application/xproc+xml',
+ 'xpm' => 'image/x-xpixmap',
+ 'xpr' => 'application/vnd.is-xpr',
+ 'xps' => 'application/vnd.ms-xpsdocument',
+ 'xpw' => 'application/vnd.intercon.formnet',
+ 'xpx' => 'application/vnd.intercon.formnet',
+ 'xsd' => 'application/xml',
+ 'xsf' => 'application/prs.xsf+xml',
+ 'xsl' => 'application/xml',
+ 'xslt' => 'application/xslt+xml',
+ 'xsm' => 'application/vnd.syncml+xml',
+ 'xspf' => 'application/xspf+xml',
+ 'xul' => 'application/vnd.mozilla.xul+xml',
+ 'xvm' => 'application/xv+xml',
+ 'xvml' => 'application/xv+xml',
+ 'xwd' => 'image/x-xwindowdump',
+ 'xyz' => 'chemical/x-xyz',
+ 'xz' => 'application/x-xz',
+ 'yaml' => 'text/yaml',
+ 'yang' => 'application/yang',
+ 'yin' => 'application/yin+xml',
+ 'yml' => 'text/yaml',
+ 'ymp' => 'text/x-suse-ymp',
+ 'z' => 'application/x-compress',
+ 'z1' => 'application/x-zmachine',
+ 'z2' => 'application/x-zmachine',
+ 'z3' => 'application/x-zmachine',
+ 'z4' => 'application/x-zmachine',
+ 'z5' => 'application/x-zmachine',
+ 'z6' => 'application/x-zmachine',
+ 'z7' => 'application/x-zmachine',
+ 'z8' => 'application/x-zmachine',
+ 'zaz' => 'application/vnd.zzazz.deck+xml',
+ 'zip' => 'application/zip',
+ 'zir' => 'application/vnd.zul',
+ 'zirz' => 'application/vnd.zul',
+ 'zmm' => 'application/vnd.handheld-entertainment+xml',
+ 'zsh' => 'text/x-scriptzsh',
+ ];
+
+ /**
+ * Determines the mimetype of a file by looking at its extension.
+ *
+ * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
+ */
+ public static function fromFilename(string $filename): ?string
+ {
+ return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
+ }
+
+ /**
+ * Maps a file extensions to a mimetype.
+ *
+ * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
+ */
+ public static function fromExtension(string $extension): ?string
+ {
+ return self::MIME_TYPES[strtolower($extension)] ?? null;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php
new file mode 100644
index 0000000..d23fba8
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -0,0 +1,165 @@
+boundary = $boundary ?: bin2hex(random_bytes(20));
+ $this->stream = $this->createStream($elements);
+ }
+
+ public function getBoundary(): string
+ {
+ return $this->boundary;
+ }
+
+ public function isWritable(): bool
+ {
+ return false;
+ }
+
+ /**
+ * Get the headers needed before transferring the content of a POST file
+ *
+ * @param string[] $headers
+ */
+ private function getHeaders(array $headers): string
+ {
+ $str = '';
+ foreach ($headers as $key => $value) {
+ $str .= "{$key}: {$value}\r\n";
+ }
+
+ return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n";
+ }
+
+ /**
+ * Create the aggregate stream that will be used to upload the POST data
+ */
+ protected function createStream(array $elements = []): StreamInterface
+ {
+ $stream = new AppendStream();
+
+ foreach ($elements as $element) {
+ if (!is_array($element)) {
+ throw new \UnexpectedValueException('An array is expected');
+ }
+ $this->addElement($stream, $element);
+ }
+
+ // Add the trailing boundary with CRLF
+ $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
+
+ return $stream;
+ }
+
+ private function addElement(AppendStream $stream, array $element): void
+ {
+ foreach (['contents', 'name'] as $key) {
+ if (!array_key_exists($key, $element)) {
+ throw new \InvalidArgumentException("A '{$key}' key is required");
+ }
+ }
+
+ $element['contents'] = Utils::streamFor($element['contents']);
+
+ if (empty($element['filename'])) {
+ $uri = $element['contents']->getMetadata('uri');
+ if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') {
+ $element['filename'] = $uri;
+ }
+ }
+
+ [$body, $headers] = $this->createElement(
+ $element['name'],
+ $element['contents'],
+ $element['filename'] ?? null,
+ $element['headers'] ?? []
+ );
+
+ $stream->addStream(Utils::streamFor($this->getHeaders($headers)));
+ $stream->addStream($body);
+ $stream->addStream(Utils::streamFor("\r\n"));
+ }
+
+ /**
+ * @param string[] $headers
+ *
+ * @return array{0: StreamInterface, 1: string[]}
+ */
+ private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array
+ {
+ // Set a default content-disposition header if one was no provided
+ $disposition = self::getHeader($headers, 'content-disposition');
+ if (!$disposition) {
+ $headers['Content-Disposition'] = ($filename === '0' || $filename)
+ ? sprintf(
+ 'form-data; name="%s"; filename="%s"',
+ $name,
+ basename($filename)
+ )
+ : "form-data; name=\"{$name}\"";
+ }
+
+ // Set a default content-length header if one was no provided
+ $length = self::getHeader($headers, 'content-length');
+ if (!$length) {
+ if ($length = $stream->getSize()) {
+ $headers['Content-Length'] = (string) $length;
+ }
+ }
+
+ // Set a default Content-Type if one was not supplied
+ $type = self::getHeader($headers, 'content-type');
+ if (!$type && ($filename === '0' || $filename)) {
+ $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream';
+ }
+
+ return [$stream, $headers];
+ }
+
+ /**
+ * @param string[] $headers
+ */
+ private static function getHeader(array $headers, string $key): ?string
+ {
+ $lowercaseHeader = strtolower($key);
+ foreach ($headers as $k => $v) {
+ if (strtolower((string) $k) === $lowercaseHeader) {
+ return $v;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php
new file mode 100644
index 0000000..161a224
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php
@@ -0,0 +1,28 @@
+source = $source;
+ $this->size = $options['size'] ?? null;
+ $this->metadata = $options['metadata'] ?? [];
+ $this->buffer = new BufferStream();
+ }
+
+ public function __toString(): string
+ {
+ try {
+ return Utils::copyToString($this);
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function close(): void
+ {
+ $this->detach();
+ }
+
+ public function detach()
+ {
+ $this->tellPos = 0;
+ $this->source = null;
+
+ return null;
+ }
+
+ public function getSize(): ?int
+ {
+ return $this->size;
+ }
+
+ public function tell(): int
+ {
+ return $this->tellPos;
+ }
+
+ public function eof(): bool
+ {
+ return $this->source === null;
+ }
+
+ public function isSeekable(): bool
+ {
+ return false;
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ throw new \RuntimeException('Cannot seek a PumpStream');
+ }
+
+ public function isWritable(): bool
+ {
+ return false;
+ }
+
+ public function write($string): int
+ {
+ throw new \RuntimeException('Cannot write to a PumpStream');
+ }
+
+ public function isReadable(): bool
+ {
+ return true;
+ }
+
+ public function read($length): string
+ {
+ $data = $this->buffer->read($length);
+ $readLen = strlen($data);
+ $this->tellPos += $readLen;
+ $remaining = $length - $readLen;
+
+ if ($remaining) {
+ $this->pump($remaining);
+ $data .= $this->buffer->read($remaining);
+ $this->tellPos += strlen($data) - $readLen;
+ }
+
+ return $data;
+ }
+
+ public function getContents(): string
+ {
+ $result = '';
+ while (!$this->eof()) {
+ $result .= $this->read(1000000);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ if (!$key) {
+ return $this->metadata;
+ }
+
+ return $this->metadata[$key] ?? null;
+ }
+
+ private function pump(int $length): void
+ {
+ if ($this->source !== null) {
+ do {
+ $data = ($this->source)($length);
+ if ($data === false || $data === null) {
+ $this->source = null;
+
+ return;
+ }
+ $this->buffer->write($data);
+ $length -= strlen($data);
+ } while ($length > 0);
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Query.php b/vendor/guzzlehttp/psr7/src/Query.php
new file mode 100644
index 0000000..8b94927
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Query.php
@@ -0,0 +1,113 @@
+ '1', 'foo[b]' => '2'])`.
+ *
+ * @param string $str Query string to parse
+ * @param int|bool $urlEncoding How the query string is encoded
+ */
+ public static function parse(string $str, $urlEncoding = true): array
+ {
+ $result = [];
+
+ if ($str === '') {
+ return $result;
+ }
+
+ if ($urlEncoding === true) {
+ $decoder = function ($value) {
+ return rawurldecode(str_replace('+', ' ', (string) $value));
+ };
+ } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
+ $decoder = 'rawurldecode';
+ } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
+ $decoder = 'urldecode';
+ } else {
+ $decoder = function ($str) {
+ return $str;
+ };
+ }
+
+ foreach (explode('&', $str) as $kvp) {
+ $parts = explode('=', $kvp, 2);
+ $key = $decoder($parts[0]);
+ $value = isset($parts[1]) ? $decoder($parts[1]) : null;
+ if (!array_key_exists($key, $result)) {
+ $result[$key] = $value;
+ } else {
+ if (!is_array($result[$key])) {
+ $result[$key] = [$result[$key]];
+ }
+ $result[$key][] = $value;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Build a query string from an array of key value pairs.
+ *
+ * This function can use the return value of `parse()` to build a query
+ * string. This function does not modify the provided keys when an array is
+ * encountered (like `http_build_query()` would).
+ *
+ * @param array $params Query string parameters.
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
+ * to encode using RFC3986, or PHP_QUERY_RFC1738
+ * to encode using RFC1738.
+ */
+ public static function build(array $params, $encoding = PHP_QUERY_RFC3986): string
+ {
+ if (!$params) {
+ return '';
+ }
+
+ if ($encoding === false) {
+ $encoder = function (string $str): string {
+ return $str;
+ };
+ } elseif ($encoding === PHP_QUERY_RFC3986) {
+ $encoder = 'rawurlencode';
+ } elseif ($encoding === PHP_QUERY_RFC1738) {
+ $encoder = 'urlencode';
+ } else {
+ throw new \InvalidArgumentException('Invalid type');
+ }
+
+ $qs = '';
+ foreach ($params as $k => $v) {
+ $k = $encoder((string) $k);
+ if (!is_array($v)) {
+ $qs .= $k;
+ $v = is_bool($v) ? (int) $v : $v;
+ if ($v !== null) {
+ $qs .= '='.$encoder((string) $v);
+ }
+ $qs .= '&';
+ } else {
+ foreach ($v as $vv) {
+ $qs .= $k;
+ $vv = is_bool($vv) ? (int) $vv : $vv;
+ if ($vv !== null) {
+ $qs .= '='.$encoder((string) $vv);
+ }
+ $qs .= '&';
+ }
+ }
+ }
+
+ return $qs ? (string) substr($qs, 0, -1) : '';
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php
new file mode 100644
index 0000000..faafe1a
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Request.php
@@ -0,0 +1,159 @@
+assertMethod($method);
+ if (!($uri instanceof UriInterface)) {
+ $uri = new Uri($uri);
+ }
+
+ $this->method = strtoupper($method);
+ $this->uri = $uri;
+ $this->setHeaders($headers);
+ $this->protocol = $version;
+
+ if (!isset($this->headerNames['host'])) {
+ $this->updateHostFromUri();
+ }
+
+ if ($body !== '' && $body !== null) {
+ $this->stream = Utils::streamFor($body);
+ }
+ }
+
+ public function getRequestTarget(): string
+ {
+ if ($this->requestTarget !== null) {
+ return $this->requestTarget;
+ }
+
+ $target = $this->uri->getPath();
+ if ($target === '') {
+ $target = '/';
+ }
+ if ($this->uri->getQuery() != '') {
+ $target .= '?'.$this->uri->getQuery();
+ }
+
+ return $target;
+ }
+
+ public function withRequestTarget($requestTarget): RequestInterface
+ {
+ if (preg_match('#\s#', $requestTarget)) {
+ throw new InvalidArgumentException(
+ 'Invalid request target provided; cannot contain whitespace'
+ );
+ }
+
+ $new = clone $this;
+ $new->requestTarget = $requestTarget;
+
+ return $new;
+ }
+
+ public function getMethod(): string
+ {
+ return $this->method;
+ }
+
+ public function withMethod($method): RequestInterface
+ {
+ $this->assertMethod($method);
+ $new = clone $this;
+ $new->method = strtoupper($method);
+
+ return $new;
+ }
+
+ public function getUri(): UriInterface
+ {
+ return $this->uri;
+ }
+
+ public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface
+ {
+ if ($uri === $this->uri) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->uri = $uri;
+
+ if (!$preserveHost || !isset($this->headerNames['host'])) {
+ $new->updateHostFromUri();
+ }
+
+ return $new;
+ }
+
+ private function updateHostFromUri(): void
+ {
+ $host = $this->uri->getHost();
+
+ if ($host == '') {
+ return;
+ }
+
+ if (($port = $this->uri->getPort()) !== null) {
+ $host .= ':'.$port;
+ }
+
+ if (isset($this->headerNames['host'])) {
+ $header = $this->headerNames['host'];
+ } else {
+ $header = 'Host';
+ $this->headerNames['host'] = 'Host';
+ }
+ // Ensure Host is the first header.
+ // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4
+ $this->headers = [$header => [$host]] + $this->headers;
+ }
+
+ /**
+ * @param mixed $method
+ */
+ private function assertMethod($method): void
+ {
+ if (!is_string($method) || $method === '') {
+ throw new InvalidArgumentException('Method must be a non-empty string.');
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php
new file mode 100644
index 0000000..00f16e2
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Response.php
@@ -0,0 +1,161 @@
+ 'Continue',
+ 101 => 'Switching Protocols',
+ 102 => 'Processing',
+ 200 => 'OK',
+ 201 => 'Created',
+ 202 => 'Accepted',
+ 203 => 'Non-Authoritative Information',
+ 204 => 'No Content',
+ 205 => 'Reset Content',
+ 206 => 'Partial Content',
+ 207 => 'Multi-status',
+ 208 => 'Already Reported',
+ 300 => 'Multiple Choices',
+ 301 => 'Moved Permanently',
+ 302 => 'Found',
+ 303 => 'See Other',
+ 304 => 'Not Modified',
+ 305 => 'Use Proxy',
+ 306 => 'Switch Proxy',
+ 307 => 'Temporary Redirect',
+ 308 => 'Permanent Redirect',
+ 400 => 'Bad Request',
+ 401 => 'Unauthorized',
+ 402 => 'Payment Required',
+ 403 => 'Forbidden',
+ 404 => 'Not Found',
+ 405 => 'Method Not Allowed',
+ 406 => 'Not Acceptable',
+ 407 => 'Proxy Authentication Required',
+ 408 => 'Request Time-out',
+ 409 => 'Conflict',
+ 410 => 'Gone',
+ 411 => 'Length Required',
+ 412 => 'Precondition Failed',
+ 413 => 'Request Entity Too Large',
+ 414 => 'Request-URI Too Large',
+ 415 => 'Unsupported Media Type',
+ 416 => 'Requested range not satisfiable',
+ 417 => 'Expectation Failed',
+ 418 => 'I\'m a teapot',
+ 422 => 'Unprocessable Entity',
+ 423 => 'Locked',
+ 424 => 'Failed Dependency',
+ 425 => 'Unordered Collection',
+ 426 => 'Upgrade Required',
+ 428 => 'Precondition Required',
+ 429 => 'Too Many Requests',
+ 431 => 'Request Header Fields Too Large',
+ 451 => 'Unavailable For Legal Reasons',
+ 500 => 'Internal Server Error',
+ 501 => 'Not Implemented',
+ 502 => 'Bad Gateway',
+ 503 => 'Service Unavailable',
+ 504 => 'Gateway Time-out',
+ 505 => 'HTTP Version not supported',
+ 506 => 'Variant Also Negotiates',
+ 507 => 'Insufficient Storage',
+ 508 => 'Loop Detected',
+ 510 => 'Not Extended',
+ 511 => 'Network Authentication Required',
+ ];
+
+ /** @var string */
+ private $reasonPhrase;
+
+ /** @var int */
+ private $statusCode;
+
+ /**
+ * @param int $status Status code
+ * @param (string|string[])[] $headers Response headers
+ * @param string|resource|StreamInterface|null $body Response body
+ * @param string $version Protocol version
+ * @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
+ */
+ public function __construct(
+ int $status = 200,
+ array $headers = [],
+ $body = null,
+ string $version = '1.1',
+ string $reason = null
+ ) {
+ $this->assertStatusCodeRange($status);
+
+ $this->statusCode = $status;
+
+ if ($body !== '' && $body !== null) {
+ $this->stream = Utils::streamFor($body);
+ }
+
+ $this->setHeaders($headers);
+ if ($reason == '' && isset(self::PHRASES[$this->statusCode])) {
+ $this->reasonPhrase = self::PHRASES[$this->statusCode];
+ } else {
+ $this->reasonPhrase = (string) $reason;
+ }
+
+ $this->protocol = $version;
+ }
+
+ public function getStatusCode(): int
+ {
+ return $this->statusCode;
+ }
+
+ public function getReasonPhrase(): string
+ {
+ return $this->reasonPhrase;
+ }
+
+ public function withStatus($code, $reasonPhrase = ''): ResponseInterface
+ {
+ $this->assertStatusCodeIsInteger($code);
+ $code = (int) $code;
+ $this->assertStatusCodeRange($code);
+
+ $new = clone $this;
+ $new->statusCode = $code;
+ if ($reasonPhrase == '' && isset(self::PHRASES[$new->statusCode])) {
+ $reasonPhrase = self::PHRASES[$new->statusCode];
+ }
+ $new->reasonPhrase = (string) $reasonPhrase;
+
+ return $new;
+ }
+
+ /**
+ * @param mixed $statusCode
+ */
+ private function assertStatusCodeIsInteger($statusCode): void
+ {
+ if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
+ throw new \InvalidArgumentException('Status code must be an integer value.');
+ }
+ }
+
+ private function assertStatusCodeRange(int $statusCode): void
+ {
+ if ($statusCode < 100 || $statusCode >= 600) {
+ throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php
new file mode 100644
index 0000000..8219dba
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php
@@ -0,0 +1,23 @@
+@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
+ public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
+}
diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php
new file mode 100644
index 0000000..3cc9534
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php
@@ -0,0 +1,340 @@
+serverParams = $serverParams;
+
+ parent::__construct($method, $uri, $headers, $body, $version);
+ }
+
+ /**
+ * Return an UploadedFile instance array.
+ *
+ * @param array $files An array which respect $_FILES structure
+ *
+ * @throws InvalidArgumentException for unrecognized values
+ */
+ public static function normalizeFiles(array $files): array
+ {
+ $normalized = [];
+
+ foreach ($files as $key => $value) {
+ if ($value instanceof UploadedFileInterface) {
+ $normalized[$key] = $value;
+ } elseif (is_array($value) && isset($value['tmp_name'])) {
+ $normalized[$key] = self::createUploadedFileFromSpec($value);
+ } elseif (is_array($value)) {
+ $normalized[$key] = self::normalizeFiles($value);
+ continue;
+ } else {
+ throw new InvalidArgumentException('Invalid value in files specification');
+ }
+ }
+
+ return $normalized;
+ }
+
+ /**
+ * Create and return an UploadedFile instance from a $_FILES specification.
+ *
+ * If the specification represents an array of values, this method will
+ * delegate to normalizeNestedFileSpec() and return that return value.
+ *
+ * @param array $value $_FILES struct
+ *
+ * @return UploadedFileInterface|UploadedFileInterface[]
+ */
+ private static function createUploadedFileFromSpec(array $value)
+ {
+ if (is_array($value['tmp_name'])) {
+ return self::normalizeNestedFileSpec($value);
+ }
+
+ return new UploadedFile(
+ $value['tmp_name'],
+ (int) $value['size'],
+ (int) $value['error'],
+ $value['name'],
+ $value['type']
+ );
+ }
+
+ /**
+ * Normalize an array of file specifications.
+ *
+ * Loops through all nested files and returns a normalized array of
+ * UploadedFileInterface instances.
+ *
+ * @return UploadedFileInterface[]
+ */
+ private static function normalizeNestedFileSpec(array $files = []): array
+ {
+ $normalizedFiles = [];
+
+ foreach (array_keys($files['tmp_name']) as $key) {
+ $spec = [
+ 'tmp_name' => $files['tmp_name'][$key],
+ 'size' => $files['size'][$key] ?? null,
+ 'error' => $files['error'][$key] ?? null,
+ 'name' => $files['name'][$key] ?? null,
+ 'type' => $files['type'][$key] ?? null,
+ ];
+ $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
+ }
+
+ return $normalizedFiles;
+ }
+
+ /**
+ * Return a ServerRequest populated with superglobals:
+ * $_GET
+ * $_POST
+ * $_COOKIE
+ * $_FILES
+ * $_SERVER
+ */
+ public static function fromGlobals(): ServerRequestInterface
+ {
+ $method = $_SERVER['REQUEST_METHOD'] ?? 'GET';
+ $headers = getallheaders();
+ $uri = self::getUriFromGlobals();
+ $body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
+ $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
+
+ $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
+
+ return $serverRequest
+ ->withCookieParams($_COOKIE)
+ ->withQueryParams($_GET)
+ ->withParsedBody($_POST)
+ ->withUploadedFiles(self::normalizeFiles($_FILES));
+ }
+
+ private static function extractHostAndPortFromAuthority(string $authority): array
+ {
+ $uri = 'http://'.$authority;
+ $parts = parse_url($uri);
+ if (false === $parts) {
+ return [null, null];
+ }
+
+ $host = $parts['host'] ?? null;
+ $port = $parts['port'] ?? null;
+
+ return [$host, $port];
+ }
+
+ /**
+ * Get a Uri populated with values from $_SERVER.
+ */
+ public static function getUriFromGlobals(): UriInterface
+ {
+ $uri = new Uri('');
+
+ $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
+
+ $hasPort = false;
+ if (isset($_SERVER['HTTP_HOST'])) {
+ [$host, $port] = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']);
+ if ($host !== null) {
+ $uri = $uri->withHost($host);
+ }
+
+ if ($port !== null) {
+ $hasPort = true;
+ $uri = $uri->withPort($port);
+ }
+ } elseif (isset($_SERVER['SERVER_NAME'])) {
+ $uri = $uri->withHost($_SERVER['SERVER_NAME']);
+ } elseif (isset($_SERVER['SERVER_ADDR'])) {
+ $uri = $uri->withHost($_SERVER['SERVER_ADDR']);
+ }
+
+ if (!$hasPort && isset($_SERVER['SERVER_PORT'])) {
+ $uri = $uri->withPort($_SERVER['SERVER_PORT']);
+ }
+
+ $hasQuery = false;
+ if (isset($_SERVER['REQUEST_URI'])) {
+ $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2);
+ $uri = $uri->withPath($requestUriParts[0]);
+ if (isset($requestUriParts[1])) {
+ $hasQuery = true;
+ $uri = $uri->withQuery($requestUriParts[1]);
+ }
+ }
+
+ if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) {
+ $uri = $uri->withQuery($_SERVER['QUERY_STRING']);
+ }
+
+ return $uri;
+ }
+
+ public function getServerParams(): array
+ {
+ return $this->serverParams;
+ }
+
+ public function getUploadedFiles(): array
+ {
+ return $this->uploadedFiles;
+ }
+
+ public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->uploadedFiles = $uploadedFiles;
+
+ return $new;
+ }
+
+ public function getCookieParams(): array
+ {
+ return $this->cookieParams;
+ }
+
+ public function withCookieParams(array $cookies): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->cookieParams = $cookies;
+
+ return $new;
+ }
+
+ public function getQueryParams(): array
+ {
+ return $this->queryParams;
+ }
+
+ public function withQueryParams(array $query): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->queryParams = $query;
+
+ return $new;
+ }
+
+ /**
+ * @return array|object|null
+ */
+ public function getParsedBody()
+ {
+ return $this->parsedBody;
+ }
+
+ public function withParsedBody($data): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->parsedBody = $data;
+
+ return $new;
+ }
+
+ public function getAttributes(): array
+ {
+ return $this->attributes;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getAttribute($attribute, $default = null)
+ {
+ if (false === array_key_exists($attribute, $this->attributes)) {
+ return $default;
+ }
+
+ return $this->attributes[$attribute];
+ }
+
+ public function withAttribute($attribute, $value): ServerRequestInterface
+ {
+ $new = clone $this;
+ $new->attributes[$attribute] = $value;
+
+ return $new;
+ }
+
+ public function withoutAttribute($attribute): ServerRequestInterface
+ {
+ if (false === array_key_exists($attribute, $this->attributes)) {
+ return $this;
+ }
+
+ $new = clone $this;
+ unset($new->attributes[$attribute]);
+
+ return $new;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php
new file mode 100644
index 0000000..0aff9b2
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Stream.php
@@ -0,0 +1,283 @@
+size = $options['size'];
+ }
+
+ $this->customMetadata = $options['metadata'] ?? [];
+ $this->stream = $stream;
+ $meta = stream_get_meta_data($this->stream);
+ $this->seekable = $meta['seekable'];
+ $this->readable = (bool) preg_match(self::READABLE_MODES, $meta['mode']);
+ $this->writable = (bool) preg_match(self::WRITABLE_MODES, $meta['mode']);
+ $this->uri = $this->getMetadata('uri');
+ }
+
+ /**
+ * Closes the stream when the destructed
+ */
+ public function __destruct()
+ {
+ $this->close();
+ }
+
+ public function __toString(): string
+ {
+ try {
+ if ($this->isSeekable()) {
+ $this->seek(0);
+ }
+
+ return $this->getContents();
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function getContents(): string
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ if (!$this->readable) {
+ throw new \RuntimeException('Cannot read from non-readable stream');
+ }
+
+ return Utils::tryGetContents($this->stream);
+ }
+
+ public function close(): void
+ {
+ if (isset($this->stream)) {
+ if (is_resource($this->stream)) {
+ fclose($this->stream);
+ }
+ $this->detach();
+ }
+ }
+
+ public function detach()
+ {
+ if (!isset($this->stream)) {
+ return null;
+ }
+
+ $result = $this->stream;
+ unset($this->stream);
+ $this->size = $this->uri = null;
+ $this->readable = $this->writable = $this->seekable = false;
+
+ return $result;
+ }
+
+ public function getSize(): ?int
+ {
+ if ($this->size !== null) {
+ return $this->size;
+ }
+
+ if (!isset($this->stream)) {
+ return null;
+ }
+
+ // Clear the stat cache if the stream has a URI
+ if ($this->uri) {
+ clearstatcache(true, $this->uri);
+ }
+
+ $stats = fstat($this->stream);
+ if (is_array($stats) && isset($stats['size'])) {
+ $this->size = $stats['size'];
+
+ return $this->size;
+ }
+
+ return null;
+ }
+
+ public function isReadable(): bool
+ {
+ return $this->readable;
+ }
+
+ public function isWritable(): bool
+ {
+ return $this->writable;
+ }
+
+ public function isSeekable(): bool
+ {
+ return $this->seekable;
+ }
+
+ public function eof(): bool
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ return feof($this->stream);
+ }
+
+ public function tell(): int
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+
+ $result = ftell($this->stream);
+
+ if ($result === false) {
+ throw new \RuntimeException('Unable to determine stream position');
+ }
+
+ return $result;
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ $whence = (int) $whence;
+
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+ if (!$this->seekable) {
+ throw new \RuntimeException('Stream is not seekable');
+ }
+ if (fseek($this->stream, $offset, $whence) === -1) {
+ throw new \RuntimeException('Unable to seek to stream position '
+ .$offset.' with whence '.var_export($whence, true));
+ }
+ }
+
+ public function read($length): string
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+ if (!$this->readable) {
+ throw new \RuntimeException('Cannot read from non-readable stream');
+ }
+ if ($length < 0) {
+ throw new \RuntimeException('Length parameter cannot be negative');
+ }
+
+ if (0 === $length) {
+ return '';
+ }
+
+ try {
+ $string = fread($this->stream, $length);
+ } catch (\Exception $e) {
+ throw new \RuntimeException('Unable to read from stream', 0, $e);
+ }
+
+ if (false === $string) {
+ throw new \RuntimeException('Unable to read from stream');
+ }
+
+ return $string;
+ }
+
+ public function write($string): int
+ {
+ if (!isset($this->stream)) {
+ throw new \RuntimeException('Stream is detached');
+ }
+ if (!$this->writable) {
+ throw new \RuntimeException('Cannot write to a non-writable stream');
+ }
+
+ // We can't know the size after writing anything
+ $this->size = null;
+ $result = fwrite($this->stream, $string);
+
+ if ($result === false) {
+ throw new \RuntimeException('Unable to write to stream');
+ }
+
+ return $result;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ if (!isset($this->stream)) {
+ return $key ? null : [];
+ } elseif (!$key) {
+ return $this->customMetadata + stream_get_meta_data($this->stream);
+ } elseif (isset($this->customMetadata[$key])) {
+ return $this->customMetadata[$key];
+ }
+
+ $meta = stream_get_meta_data($this->stream);
+
+ return $meta[$key] ?? null;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
new file mode 100644
index 0000000..601c13a
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
@@ -0,0 +1,156 @@
+stream = $stream;
+ }
+
+ /**
+ * Magic method used to create a new stream if streams are not added in
+ * the constructor of a decorator (e.g., LazyOpenStream).
+ *
+ * @return StreamInterface
+ */
+ public function __get(string $name)
+ {
+ if ($name === 'stream') {
+ $this->stream = $this->createStream();
+
+ return $this->stream;
+ }
+
+ throw new \UnexpectedValueException("$name not found on class");
+ }
+
+ public function __toString(): string
+ {
+ try {
+ if ($this->isSeekable()) {
+ $this->seek(0);
+ }
+
+ return $this->getContents();
+ } catch (\Throwable $e) {
+ if (\PHP_VERSION_ID >= 70400) {
+ throw $e;
+ }
+ trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
+ return '';
+ }
+ }
+
+ public function getContents(): string
+ {
+ return Utils::copyToString($this);
+ }
+
+ /**
+ * Allow decorators to implement custom methods
+ *
+ * @return mixed
+ */
+ public function __call(string $method, array $args)
+ {
+ /** @var callable $callable */
+ $callable = [$this->stream, $method];
+ $result = ($callable)(...$args);
+
+ // Always return the wrapped object if the result is a return $this
+ return $result === $this->stream ? $this : $result;
+ }
+
+ public function close(): void
+ {
+ $this->stream->close();
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getMetadata($key = null)
+ {
+ return $this->stream->getMetadata($key);
+ }
+
+ public function detach()
+ {
+ return $this->stream->detach();
+ }
+
+ public function getSize(): ?int
+ {
+ return $this->stream->getSize();
+ }
+
+ public function eof(): bool
+ {
+ return $this->stream->eof();
+ }
+
+ public function tell(): int
+ {
+ return $this->stream->tell();
+ }
+
+ public function isReadable(): bool
+ {
+ return $this->stream->isReadable();
+ }
+
+ public function isWritable(): bool
+ {
+ return $this->stream->isWritable();
+ }
+
+ public function isSeekable(): bool
+ {
+ return $this->stream->isSeekable();
+ }
+
+ public function rewind(): void
+ {
+ $this->seek(0);
+ }
+
+ public function seek($offset, $whence = SEEK_SET): void
+ {
+ $this->stream->seek($offset, $whence);
+ }
+
+ public function read($length): string
+ {
+ return $this->stream->read($length);
+ }
+
+ public function write($string): int
+ {
+ return $this->stream->write($string);
+ }
+
+ /**
+ * Implement in subclasses to dynamically create streams when requested.
+ *
+ * @throws \BadMethodCallException
+ */
+ protected function createStream(): StreamInterface
+ {
+ throw new \BadMethodCallException('Not implemented');
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
new file mode 100644
index 0000000..ae85388
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
@@ -0,0 +1,203 @@
+isReadable()) {
+ $mode = $stream->isWritable() ? 'r+' : 'r';
+ } elseif ($stream->isWritable()) {
+ $mode = 'w';
+ } else {
+ throw new \InvalidArgumentException('The stream must be readable, '
+ .'writable, or both.');
+ }
+
+ return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream));
+ }
+
+ /**
+ * Creates a stream context that can be used to open a stream as a php stream resource.
+ *
+ * @return resource
+ */
+ public static function createStreamContext(StreamInterface $stream)
+ {
+ return stream_context_create([
+ 'guzzle' => ['stream' => $stream],
+ ]);
+ }
+
+ /**
+ * Registers the stream wrapper if needed
+ */
+ public static function register(): void
+ {
+ if (!in_array('guzzle', stream_get_wrappers())) {
+ stream_wrapper_register('guzzle', __CLASS__);
+ }
+ }
+
+ public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool
+ {
+ $options = stream_context_get_options($this->context);
+
+ if (!isset($options['guzzle']['stream'])) {
+ return false;
+ }
+
+ $this->mode = $mode;
+ $this->stream = $options['guzzle']['stream'];
+
+ return true;
+ }
+
+ public function stream_read(int $count): string
+ {
+ return $this->stream->read($count);
+ }
+
+ public function stream_write(string $data): int
+ {
+ return $this->stream->write($data);
+ }
+
+ public function stream_tell(): int
+ {
+ return $this->stream->tell();
+ }
+
+ public function stream_eof(): bool
+ {
+ return $this->stream->eof();
+ }
+
+ public function stream_seek(int $offset, int $whence): bool
+ {
+ $this->stream->seek($offset, $whence);
+
+ return true;
+ }
+
+ /**
+ * @return resource|false
+ */
+ public function stream_cast(int $cast_as)
+ {
+ $stream = clone $this->stream;
+ $resource = $stream->detach();
+
+ return $resource ?? false;
+ }
+
+ /**
+ * @return array{
+ * dev: int,
+ * ino: int,
+ * mode: int,
+ * nlink: int,
+ * uid: int,
+ * gid: int,
+ * rdev: int,
+ * size: int,
+ * atime: int,
+ * mtime: int,
+ * ctime: int,
+ * blksize: int,
+ * blocks: int
+ * }
+ */
+ public function stream_stat(): array
+ {
+ static $modeMap = [
+ 'r' => 33060,
+ 'rb' => 33060,
+ 'r+' => 33206,
+ 'w' => 33188,
+ 'wb' => 33188,
+ ];
+
+ return [
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => $modeMap[$this->mode],
+ 'nlink' => 0,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'rdev' => 0,
+ 'size' => $this->stream->getSize() ?: 0,
+ 'atime' => 0,
+ 'mtime' => 0,
+ 'ctime' => 0,
+ 'blksize' => 0,
+ 'blocks' => 0,
+ ];
+ }
+
+ /**
+ * @return array{
+ * dev: int,
+ * ino: int,
+ * mode: int,
+ * nlink: int,
+ * uid: int,
+ * gid: int,
+ * rdev: int,
+ * size: int,
+ * atime: int,
+ * mtime: int,
+ * ctime: int,
+ * blksize: int,
+ * blocks: int
+ * }
+ */
+ public function url_stat(string $path, int $flags): array
+ {
+ return [
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => 0,
+ 'nlink' => 0,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'rdev' => 0,
+ 'size' => 0,
+ 'atime' => 0,
+ 'mtime' => 0,
+ 'ctime' => 0,
+ 'blksize' => 0,
+ 'blocks' => 0,
+ ];
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php
new file mode 100644
index 0000000..b267199
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php
@@ -0,0 +1,211 @@
+setError($errorStatus);
+ $this->size = $size;
+ $this->clientFilename = $clientFilename;
+ $this->clientMediaType = $clientMediaType;
+
+ if ($this->isOk()) {
+ $this->setStreamOrFile($streamOrFile);
+ }
+ }
+
+ /**
+ * Depending on the value set file or stream variable
+ *
+ * @param StreamInterface|string|resource $streamOrFile
+ *
+ * @throws InvalidArgumentException
+ */
+ private function setStreamOrFile($streamOrFile): void
+ {
+ if (is_string($streamOrFile)) {
+ $this->file = $streamOrFile;
+ } elseif (is_resource($streamOrFile)) {
+ $this->stream = new Stream($streamOrFile);
+ } elseif ($streamOrFile instanceof StreamInterface) {
+ $this->stream = $streamOrFile;
+ } else {
+ throw new InvalidArgumentException(
+ 'Invalid stream or file provided for UploadedFile'
+ );
+ }
+ }
+
+ /**
+ * @throws InvalidArgumentException
+ */
+ private function setError(int $error): void
+ {
+ if (false === in_array($error, UploadedFile::ERRORS, true)) {
+ throw new InvalidArgumentException(
+ 'Invalid error status for UploadedFile'
+ );
+ }
+
+ $this->error = $error;
+ }
+
+ private static function isStringNotEmpty($param): bool
+ {
+ return is_string($param) && false === empty($param);
+ }
+
+ /**
+ * Return true if there is no upload error
+ */
+ private function isOk(): bool
+ {
+ return $this->error === UPLOAD_ERR_OK;
+ }
+
+ public function isMoved(): bool
+ {
+ return $this->moved;
+ }
+
+ /**
+ * @throws RuntimeException if is moved or not ok
+ */
+ private function validateActive(): void
+ {
+ if (false === $this->isOk()) {
+ throw new RuntimeException('Cannot retrieve stream due to upload error');
+ }
+
+ if ($this->isMoved()) {
+ throw new RuntimeException('Cannot retrieve stream after it has already been moved');
+ }
+ }
+
+ public function getStream(): StreamInterface
+ {
+ $this->validateActive();
+
+ if ($this->stream instanceof StreamInterface) {
+ return $this->stream;
+ }
+
+ /** @var string $file */
+ $file = $this->file;
+
+ return new LazyOpenStream($file, 'r+');
+ }
+
+ public function moveTo($targetPath): void
+ {
+ $this->validateActive();
+
+ if (false === self::isStringNotEmpty($targetPath)) {
+ throw new InvalidArgumentException(
+ 'Invalid path provided for move operation; must be a non-empty string'
+ );
+ }
+
+ if ($this->file) {
+ $this->moved = PHP_SAPI === 'cli'
+ ? rename($this->file, $targetPath)
+ : move_uploaded_file($this->file, $targetPath);
+ } else {
+ Utils::copyToStream(
+ $this->getStream(),
+ new LazyOpenStream($targetPath, 'w')
+ );
+
+ $this->moved = true;
+ }
+
+ if (false === $this->moved) {
+ throw new RuntimeException(
+ sprintf('Uploaded file could not be moved to %s', $targetPath)
+ );
+ }
+ }
+
+ public function getSize(): ?int
+ {
+ return $this->size;
+ }
+
+ public function getError(): int
+ {
+ return $this->error;
+ }
+
+ public function getClientFilename(): ?string
+ {
+ return $this->clientFilename;
+ }
+
+ public function getClientMediaType(): ?string
+ {
+ return $this->clientMediaType;
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php
new file mode 100644
index 0000000..f1feee8
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Uri.php
@@ -0,0 +1,743 @@
+ 80,
+ 'https' => 443,
+ 'ftp' => 21,
+ 'gopher' => 70,
+ 'nntp' => 119,
+ 'news' => 119,
+ 'telnet' => 23,
+ 'tn3270' => 23,
+ 'imap' => 143,
+ 'pop' => 110,
+ 'ldap' => 389,
+ ];
+
+ /**
+ * Unreserved characters for use in a regex.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
+ */
+ private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~';
+
+ /**
+ * Sub-delims for use in a regex.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2
+ */
+ private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=';
+ private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26'];
+
+ /** @var string Uri scheme. */
+ private $scheme = '';
+
+ /** @var string Uri user info. */
+ private $userInfo = '';
+
+ /** @var string Uri host. */
+ private $host = '';
+
+ /** @var int|null Uri port. */
+ private $port;
+
+ /** @var string Uri path. */
+ private $path = '';
+
+ /** @var string Uri query string. */
+ private $query = '';
+
+ /** @var string Uri fragment. */
+ private $fragment = '';
+
+ /** @var string|null String representation */
+ private $composedComponents;
+
+ public function __construct(string $uri = '')
+ {
+ if ($uri !== '') {
+ $parts = self::parse($uri);
+ if ($parts === false) {
+ throw new MalformedUriException("Unable to parse URI: $uri");
+ }
+ $this->applyParts($parts);
+ }
+ }
+
+ /**
+ * UTF-8 aware \parse_url() replacement.
+ *
+ * The internal function produces broken output for non ASCII domain names
+ * (IDN) when used with locales other than "C".
+ *
+ * On the other hand, cURL understands IDN correctly only when UTF-8 locale
+ * is configured ("C.UTF-8", "en_US.UTF-8", etc.).
+ *
+ * @see https://bugs.php.net/bug.php?id=52923
+ * @see https://www.php.net/manual/en/function.parse-url.php#114817
+ * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING
+ *
+ * @return array|false
+ */
+ private static function parse(string $url)
+ {
+ // If IPv6
+ $prefix = '';
+ if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
+ /** @var array{0:string, 1:string, 2:string} $matches */
+ $prefix = $matches[1];
+ $url = $matches[2];
+ }
+
+ /** @var string */
+ $encodedUrl = preg_replace_callback(
+ '%[^:/@?&=#]+%usD',
+ static function ($matches) {
+ return urlencode($matches[0]);
+ },
+ $url
+ );
+
+ $result = parse_url($prefix.$encodedUrl);
+
+ if ($result === false) {
+ return false;
+ }
+
+ return array_map('urldecode', $result);
+ }
+
+ public function __toString(): string
+ {
+ if ($this->composedComponents === null) {
+ $this->composedComponents = self::composeComponents(
+ $this->scheme,
+ $this->getAuthority(),
+ $this->path,
+ $this->query,
+ $this->fragment
+ );
+ }
+
+ return $this->composedComponents;
+ }
+
+ /**
+ * Composes a URI reference string from its various components.
+ *
+ * Usually this method does not need to be called manually but instead is used indirectly via
+ * `Psr\Http\Message\UriInterface::__toString`.
+ *
+ * PSR-7 UriInterface treats an empty component the same as a missing component as
+ * getQuery(), getFragment() etc. always return a string. This explains the slight
+ * difference to RFC 3986 Section 5.3.
+ *
+ * Another adjustment is that the authority separator is added even when the authority is missing/empty
+ * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with
+ * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But
+ * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
+ * that format).
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3
+ */
+ public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string
+ {
+ $uri = '';
+
+ // weak type checks to also accept null until we can add scalar type hints
+ if ($scheme != '') {
+ $uri .= $scheme.':';
+ }
+
+ if ($authority != '' || $scheme === 'file') {
+ $uri .= '//'.$authority;
+ }
+
+ if ($authority != '' && $path != '' && $path[0] != '/') {
+ $path = '/'.$path;
+ }
+
+ $uri .= $path;
+
+ if ($query != '') {
+ $uri .= '?'.$query;
+ }
+
+ if ($fragment != '') {
+ $uri .= '#'.$fragment;
+ }
+
+ return $uri;
+ }
+
+ /**
+ * Whether the URI has the default port of the current scheme.
+ *
+ * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used
+ * independently of the implementation.
+ */
+ public static function isDefaultPort(UriInterface $uri): bool
+ {
+ return $uri->getPort() === null
+ || (isset(self::DEFAULT_PORTS[$uri->getScheme()]) && $uri->getPort() === self::DEFAULT_PORTS[$uri->getScheme()]);
+ }
+
+ /**
+ * Whether the URI is absolute, i.e. it has a scheme.
+ *
+ * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true
+ * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative
+ * to another URI, the base URI. Relative references can be divided into several forms:
+ * - network-path references, e.g. '//example.com/path'
+ * - absolute-path references, e.g. '/path'
+ * - relative-path references, e.g. 'subpath'
+ *
+ * @see Uri::isNetworkPathReference
+ * @see Uri::isAbsolutePathReference
+ * @see Uri::isRelativePathReference
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4
+ */
+ public static function isAbsolute(UriInterface $uri): bool
+ {
+ return $uri->getScheme() !== '';
+ }
+
+ /**
+ * Whether the URI is a network-path reference.
+ *
+ * A relative reference that begins with two slash characters is termed an network-path reference.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
+ */
+ public static function isNetworkPathReference(UriInterface $uri): bool
+ {
+ return $uri->getScheme() === '' && $uri->getAuthority() !== '';
+ }
+
+ /**
+ * Whether the URI is a absolute-path reference.
+ *
+ * A relative reference that begins with a single slash character is termed an absolute-path reference.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
+ */
+ public static function isAbsolutePathReference(UriInterface $uri): bool
+ {
+ return $uri->getScheme() === ''
+ && $uri->getAuthority() === ''
+ && isset($uri->getPath()[0])
+ && $uri->getPath()[0] === '/';
+ }
+
+ /**
+ * Whether the URI is a relative-path reference.
+ *
+ * A relative reference that does not begin with a slash character is termed a relative-path reference.
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
+ */
+ public static function isRelativePathReference(UriInterface $uri): bool
+ {
+ return $uri->getScheme() === ''
+ && $uri->getAuthority() === ''
+ && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/');
+ }
+
+ /**
+ * Whether the URI is a same-document reference.
+ *
+ * A same-document reference refers to a URI that is, aside from its fragment
+ * component, identical to the base URI. When no base URI is given, only an empty
+ * URI reference (apart from its fragment) is considered a same-document reference.
+ *
+ * @param UriInterface $uri The URI to check
+ * @param UriInterface|null $base An optional base URI to compare against
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
+ */
+ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
+ {
+ if ($base !== null) {
+ $uri = UriResolver::resolve($base, $uri);
+
+ return ($uri->getScheme() === $base->getScheme())
+ && ($uri->getAuthority() === $base->getAuthority())
+ && ($uri->getPath() === $base->getPath())
+ && ($uri->getQuery() === $base->getQuery());
+ }
+
+ return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === '';
+ }
+
+ /**
+ * Creates a new URI with a specific query string value removed.
+ *
+ * Any existing query string values that exactly match the provided key are
+ * removed.
+ *
+ * @param UriInterface $uri URI to use as a base.
+ * @param string $key Query string key to remove.
+ */
+ public static function withoutQueryValue(UriInterface $uri, string $key): UriInterface
+ {
+ $result = self::getFilteredQueryString($uri, [$key]);
+
+ return $uri->withQuery(implode('&', $result));
+ }
+
+ /**
+ * Creates a new URI with a specific query string value.
+ *
+ * Any existing query string values that exactly match the provided key are
+ * removed and replaced with the given key value pair.
+ *
+ * A value of null will set the query string key without a value, e.g. "key"
+ * instead of "key=value".
+ *
+ * @param UriInterface $uri URI to use as a base.
+ * @param string $key Key to set.
+ * @param string|null $value Value to set
+ */
+ public static function withQueryValue(UriInterface $uri, string $key, ?string $value): UriInterface
+ {
+ $result = self::getFilteredQueryString($uri, [$key]);
+
+ $result[] = self::generateQueryString($key, $value);
+
+ return $uri->withQuery(implode('&', $result));
+ }
+
+ /**
+ * Creates a new URI with multiple specific query string values.
+ *
+ * It has the same behavior as withQueryValue() but for an associative array of key => value.
+ *
+ * @param UriInterface $uri URI to use as a base.
+ * @param (string|null)[] $keyValueArray Associative array of key and values
+ */
+ public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface
+ {
+ $result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
+
+ foreach ($keyValueArray as $key => $value) {
+ $result[] = self::generateQueryString((string) $key, $value !== null ? (string) $value : null);
+ }
+
+ return $uri->withQuery(implode('&', $result));
+ }
+
+ /**
+ * Creates a URI from a hash of `parse_url` components.
+ *
+ * @see https://www.php.net/manual/en/function.parse-url.php
+ *
+ * @throws MalformedUriException If the components do not form a valid URI.
+ */
+ public static function fromParts(array $parts): UriInterface
+ {
+ $uri = new self();
+ $uri->applyParts($parts);
+ $uri->validateState();
+
+ return $uri;
+ }
+
+ public function getScheme(): string
+ {
+ return $this->scheme;
+ }
+
+ public function getAuthority(): string
+ {
+ $authority = $this->host;
+ if ($this->userInfo !== '') {
+ $authority = $this->userInfo.'@'.$authority;
+ }
+
+ if ($this->port !== null) {
+ $authority .= ':'.$this->port;
+ }
+
+ return $authority;
+ }
+
+ public function getUserInfo(): string
+ {
+ return $this->userInfo;
+ }
+
+ public function getHost(): string
+ {
+ return $this->host;
+ }
+
+ public function getPort(): ?int
+ {
+ return $this->port;
+ }
+
+ public function getPath(): string
+ {
+ return $this->path;
+ }
+
+ public function getQuery(): string
+ {
+ return $this->query;
+ }
+
+ public function getFragment(): string
+ {
+ return $this->fragment;
+ }
+
+ public function withScheme($scheme): UriInterface
+ {
+ $scheme = $this->filterScheme($scheme);
+
+ if ($this->scheme === $scheme) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->scheme = $scheme;
+ $new->composedComponents = null;
+ $new->removeDefaultPort();
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withUserInfo($user, $password = null): UriInterface
+ {
+ $info = $this->filterUserInfoComponent($user);
+ if ($password !== null) {
+ $info .= ':'.$this->filterUserInfoComponent($password);
+ }
+
+ if ($this->userInfo === $info) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->userInfo = $info;
+ $new->composedComponents = null;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withHost($host): UriInterface
+ {
+ $host = $this->filterHost($host);
+
+ if ($this->host === $host) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->host = $host;
+ $new->composedComponents = null;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withPort($port): UriInterface
+ {
+ $port = $this->filterPort($port);
+
+ if ($this->port === $port) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->port = $port;
+ $new->composedComponents = null;
+ $new->removeDefaultPort();
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withPath($path): UriInterface
+ {
+ $path = $this->filterPath($path);
+
+ if ($this->path === $path) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->path = $path;
+ $new->composedComponents = null;
+ $new->validateState();
+
+ return $new;
+ }
+
+ public function withQuery($query): UriInterface
+ {
+ $query = $this->filterQueryAndFragment($query);
+
+ if ($this->query === $query) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->query = $query;
+ $new->composedComponents = null;
+
+ return $new;
+ }
+
+ public function withFragment($fragment): UriInterface
+ {
+ $fragment = $this->filterQueryAndFragment($fragment);
+
+ if ($this->fragment === $fragment) {
+ return $this;
+ }
+
+ $new = clone $this;
+ $new->fragment = $fragment;
+ $new->composedComponents = null;
+
+ return $new;
+ }
+
+ public function jsonSerialize(): string
+ {
+ return $this->__toString();
+ }
+
+ /**
+ * Apply parse_url parts to a URI.
+ *
+ * @param array $parts Array of parse_url parts to apply.
+ */
+ private function applyParts(array $parts): void
+ {
+ $this->scheme = isset($parts['scheme'])
+ ? $this->filterScheme($parts['scheme'])
+ : '';
+ $this->userInfo = isset($parts['user'])
+ ? $this->filterUserInfoComponent($parts['user'])
+ : '';
+ $this->host = isset($parts['host'])
+ ? $this->filterHost($parts['host'])
+ : '';
+ $this->port = isset($parts['port'])
+ ? $this->filterPort($parts['port'])
+ : null;
+ $this->path = isset($parts['path'])
+ ? $this->filterPath($parts['path'])
+ : '';
+ $this->query = isset($parts['query'])
+ ? $this->filterQueryAndFragment($parts['query'])
+ : '';
+ $this->fragment = isset($parts['fragment'])
+ ? $this->filterQueryAndFragment($parts['fragment'])
+ : '';
+ if (isset($parts['pass'])) {
+ $this->userInfo .= ':'.$this->filterUserInfoComponent($parts['pass']);
+ }
+
+ $this->removeDefaultPort();
+ }
+
+ /**
+ * @param mixed $scheme
+ *
+ * @throws \InvalidArgumentException If the scheme is invalid.
+ */
+ private function filterScheme($scheme): string
+ {
+ if (!is_string($scheme)) {
+ throw new \InvalidArgumentException('Scheme must be a string');
+ }
+
+ return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ }
+
+ /**
+ * @param mixed $component
+ *
+ * @throws \InvalidArgumentException If the user info is invalid.
+ */
+ private function filterUserInfoComponent($component): string
+ {
+ if (!is_string($component)) {
+ throw new \InvalidArgumentException('User info must be a string');
+ }
+
+ return preg_replace_callback(
+ '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $component
+ );
+ }
+
+ /**
+ * @param mixed $host
+ *
+ * @throws \InvalidArgumentException If the host is invalid.
+ */
+ private function filterHost($host): string
+ {
+ if (!is_string($host)) {
+ throw new \InvalidArgumentException('Host must be a string');
+ }
+
+ return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
+ }
+
+ /**
+ * @param mixed $port
+ *
+ * @throws \InvalidArgumentException If the port is invalid.
+ */
+ private function filterPort($port): ?int
+ {
+ if ($port === null) {
+ return null;
+ }
+
+ $port = (int) $port;
+ if (0 > $port || 0xFFFF < $port) {
+ throw new \InvalidArgumentException(
+ sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
+ );
+ }
+
+ return $port;
+ }
+
+ /**
+ * @param (string|int)[] $keys
+ *
+ * @return string[]
+ */
+ private static function getFilteredQueryString(UriInterface $uri, array $keys): array
+ {
+ $current = $uri->getQuery();
+
+ if ($current === '') {
+ return [];
+ }
+
+ $decodedKeys = array_map(function ($k): string {
+ return rawurldecode((string) $k);
+ }, $keys);
+
+ return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
+ return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);
+ });
+ }
+
+ private static function generateQueryString(string $key, ?string $value): string
+ {
+ // Query string separators ("=", "&") within the key or value need to be encoded
+ // (while preventing double-encoding) before setting the query string. All other
+ // chars that need percent-encoding will be encoded by withQuery().
+ $queryString = strtr($key, self::QUERY_SEPARATORS_REPLACEMENT);
+
+ if ($value !== null) {
+ $queryString .= '='.strtr($value, self::QUERY_SEPARATORS_REPLACEMENT);
+ }
+
+ return $queryString;
+ }
+
+ private function removeDefaultPort(): void
+ {
+ if ($this->port !== null && self::isDefaultPort($this)) {
+ $this->port = null;
+ }
+ }
+
+ /**
+ * Filters the path of a URI
+ *
+ * @param mixed $path
+ *
+ * @throws \InvalidArgumentException If the path is invalid.
+ */
+ private function filterPath($path): string
+ {
+ if (!is_string($path)) {
+ throw new \InvalidArgumentException('Path must be a string');
+ }
+
+ return preg_replace_callback(
+ '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $path
+ );
+ }
+
+ /**
+ * Filters the query string or fragment of a URI.
+ *
+ * @param mixed $str
+ *
+ * @throws \InvalidArgumentException If the query or fragment is invalid.
+ */
+ private function filterQueryAndFragment($str): string
+ {
+ if (!is_string($str)) {
+ throw new \InvalidArgumentException('Query and fragment must be a string');
+ }
+
+ return preg_replace_callback(
+ '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
+ [$this, 'rawurlencodeMatchZero'],
+ $str
+ );
+ }
+
+ private function rawurlencodeMatchZero(array $match): string
+ {
+ return rawurlencode($match[0]);
+ }
+
+ private function validateState(): void
+ {
+ if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) {
+ $this->host = self::HTTP_DEFAULT_HOST;
+ }
+
+ if ($this->getAuthority() === '') {
+ if (0 === strpos($this->path, '//')) {
+ throw new MalformedUriException('The path of a URI without an authority must not start with two slashes "//"');
+ }
+ if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) {
+ throw new MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon');
+ }
+ }
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/UriComparator.php b/vendor/guzzlehttp/psr7/src/UriComparator.php
new file mode 100644
index 0000000..70c582a
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UriComparator.php
@@ -0,0 +1,52 @@
+getHost(), $modified->getHost()) !== 0) {
+ return true;
+ }
+
+ if ($original->getScheme() !== $modified->getScheme()) {
+ return true;
+ }
+
+ if (self::computePort($original) !== self::computePort($modified)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ private static function computePort(UriInterface $uri): int
+ {
+ $port = $uri->getPort();
+
+ if (null !== $port) {
+ return $port;
+ }
+
+ return 'https' === $uri->getScheme() ? 443 : 80;
+ }
+
+ private function __construct()
+ {
+ // cannot be instantiated
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php
new file mode 100644
index 0000000..e174557
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php
@@ -0,0 +1,220 @@
+getPath() === ''
+ && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')
+ ) {
+ $uri = $uri->withPath('/');
+ }
+
+ if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') {
+ $uri = $uri->withHost('');
+ }
+
+ if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) {
+ $uri = $uri->withPort(null);
+ }
+
+ if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) {
+ $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath()));
+ }
+
+ if ($flags & self::REMOVE_DUPLICATE_SLASHES) {
+ $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath()));
+ }
+
+ if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') {
+ $queryKeyValues = explode('&', $uri->getQuery());
+ sort($queryKeyValues);
+ $uri = $uri->withQuery(implode('&', $queryKeyValues));
+ }
+
+ return $uri;
+ }
+
+ /**
+ * Whether two URIs can be considered equivalent.
+ *
+ * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also
+ * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be
+ * resolved against the same base URI. If this is not the case, determination of equivalence or difference of
+ * relative references does not mean anything.
+ *
+ * @param UriInterface $uri1 An URI to compare
+ * @param UriInterface $uri2 An URI to compare
+ * @param int $normalizations A bitmask of normalizations to apply, see constants
+ *
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1
+ */
+ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool
+ {
+ return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
+ }
+
+ private static function capitalizePercentEncoding(UriInterface $uri): UriInterface
+ {
+ $regex = '/(?:%[A-Fa-f0-9]{2})++/';
+
+ $callback = function (array $match): string {
+ return strtoupper($match[0]);
+ };
+
+ return
+ $uri->withPath(
+ preg_replace_callback($regex, $callback, $uri->getPath())
+ )->withQuery(
+ preg_replace_callback($regex, $callback, $uri->getQuery())
+ );
+ }
+
+ private static function decodeUnreservedCharacters(UriInterface $uri): UriInterface
+ {
+ $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i';
+
+ $callback = function (array $match): string {
+ return rawurldecode($match[0]);
+ };
+
+ return
+ $uri->withPath(
+ preg_replace_callback($regex, $callback, $uri->getPath())
+ )->withQuery(
+ preg_replace_callback($regex, $callback, $uri->getQuery())
+ );
+ }
+
+ private function __construct()
+ {
+ // cannot be instantiated
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php
new file mode 100644
index 0000000..3737be1
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/UriResolver.php
@@ -0,0 +1,211 @@
+getScheme() != '') {
+ return $rel->withPath(self::removeDotSegments($rel->getPath()));
+ }
+
+ if ($rel->getAuthority() != '') {
+ $targetAuthority = $rel->getAuthority();
+ $targetPath = self::removeDotSegments($rel->getPath());
+ $targetQuery = $rel->getQuery();
+ } else {
+ $targetAuthority = $base->getAuthority();
+ if ($rel->getPath() === '') {
+ $targetPath = $base->getPath();
+ $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery();
+ } else {
+ if ($rel->getPath()[0] === '/') {
+ $targetPath = $rel->getPath();
+ } else {
+ if ($targetAuthority != '' && $base->getPath() === '') {
+ $targetPath = '/'.$rel->getPath();
+ } else {
+ $lastSlashPos = strrpos($base->getPath(), '/');
+ if ($lastSlashPos === false) {
+ $targetPath = $rel->getPath();
+ } else {
+ $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath();
+ }
+ }
+ }
+ $targetPath = self::removeDotSegments($targetPath);
+ $targetQuery = $rel->getQuery();
+ }
+ }
+
+ return new Uri(Uri::composeComponents(
+ $base->getScheme(),
+ $targetAuthority,
+ $targetPath,
+ $targetQuery,
+ $rel->getFragment()
+ ));
+ }
+
+ /**
+ * Returns the target URI as a relative reference from the base URI.
+ *
+ * This method is the counterpart to resolve():
+ *
+ * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target))
+ *
+ * One use-case is to use the current request URI as base URI and then generate relative links in your documents
+ * to reduce the document size or offer self-contained downloadable document archives.
+ *
+ * $base = new Uri('http://example.com/a/b/');
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'.
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'.
+ * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'.
+ * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'.
+ *
+ * This method also accepts a target that is already relative and will try to relativize it further. Only a
+ * relative-path reference will be returned as-is.
+ *
+ * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well
+ */
+ public static function relativize(UriInterface $base, UriInterface $target): UriInterface
+ {
+ if ($target->getScheme() !== ''
+ && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
+ ) {
+ return $target;
+ }
+
+ if (Uri::isRelativePathReference($target)) {
+ // As the target is already highly relative we return it as-is. It would be possible to resolve
+ // the target with `$target = self::resolve($base, $target);` and then try make it more relative
+ // by removing a duplicate query. But let's not do that automatically.
+ return $target;
+ }
+
+ if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
+ return $target->withScheme('');
+ }
+
+ // We must remove the path before removing the authority because if the path starts with two slashes, the URI
+ // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also
+ // invalid.
+ $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost('');
+
+ if ($base->getPath() !== $target->getPath()) {
+ return $emptyPathUri->withPath(self::getRelativePath($base, $target));
+ }
+
+ if ($base->getQuery() === $target->getQuery()) {
+ // Only the target fragment is left. And it must be returned even if base and target fragment are the same.
+ return $emptyPathUri->withQuery('');
+ }
+
+ // If the base URI has a query but the target has none, we cannot return an empty path reference as it would
+ // inherit the base query component when resolving.
+ if ($target->getQuery() === '') {
+ $segments = explode('/', $target->getPath());
+ /** @var string $lastSegment */
+ $lastSegment = end($segments);
+
+ return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment);
+ }
+
+ return $emptyPathUri;
+ }
+
+ private static function getRelativePath(UriInterface $base, UriInterface $target): string
+ {
+ $sourceSegments = explode('/', $base->getPath());
+ $targetSegments = explode('/', $target->getPath());
+ array_pop($sourceSegments);
+ $targetLastSegment = array_pop($targetSegments);
+ foreach ($sourceSegments as $i => $segment) {
+ if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) {
+ unset($sourceSegments[$i], $targetSegments[$i]);
+ } else {
+ break;
+ }
+ }
+ $targetSegments[] = $targetLastSegment;
+ $relativePath = str_repeat('../', count($sourceSegments)).implode('/', $targetSegments);
+
+ // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".
+ // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
+ // as the first segment of a relative-path reference, as it would be mistaken for a scheme name.
+ if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) {
+ $relativePath = "./$relativePath";
+ } elseif ('/' === $relativePath[0]) {
+ if ($base->getAuthority() != '' && $base->getPath() === '') {
+ // In this case an extra slash is added by resolve() automatically. So we must not add one here.
+ $relativePath = ".$relativePath";
+ } else {
+ $relativePath = "./$relativePath";
+ }
+ }
+
+ return $relativePath;
+ }
+
+ private function __construct()
+ {
+ // cannot be instantiated
+ }
+}
diff --git a/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php
new file mode 100644
index 0000000..bf5ea9d
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/Utils.php
@@ -0,0 +1,463 @@
+ $v) {
+ if (!in_array(strtolower((string) $k), $keys)) {
+ $result[$k] = $v;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Copy the contents of a stream into another stream until the given number
+ * of bytes have been read.
+ *
+ * @param StreamInterface $source Stream to read from
+ * @param StreamInterface $dest Stream to write to
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
+ * to read the entire stream.
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void
+ {
+ $bufferSize = 8192;
+
+ if ($maxLen === -1) {
+ while (!$source->eof()) {
+ if (!$dest->write($source->read($bufferSize))) {
+ break;
+ }
+ }
+ } else {
+ $remaining = $maxLen;
+ while ($remaining > 0 && !$source->eof()) {
+ $buf = $source->read(min($bufferSize, $remaining));
+ $len = strlen($buf);
+ if (!$len) {
+ break;
+ }
+ $remaining -= $len;
+ $dest->write($buf);
+ }
+ }
+ }
+
+ /**
+ * Copy the contents of a stream into a string until the given number of
+ * bytes have been read.
+ *
+ * @param StreamInterface $stream Stream to read
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
+ * to read the entire stream.
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function copyToString(StreamInterface $stream, int $maxLen = -1): string
+ {
+ $buffer = '';
+
+ if ($maxLen === -1) {
+ while (!$stream->eof()) {
+ $buf = $stream->read(1048576);
+ if ($buf === '') {
+ break;
+ }
+ $buffer .= $buf;
+ }
+
+ return $buffer;
+ }
+
+ $len = 0;
+ while (!$stream->eof() && $len < $maxLen) {
+ $buf = $stream->read($maxLen - $len);
+ if ($buf === '') {
+ break;
+ }
+ $buffer .= $buf;
+ $len = strlen($buffer);
+ }
+
+ return $buffer;
+ }
+
+ /**
+ * Calculate a hash of a stream.
+ *
+ * This method reads the entire stream to calculate a rolling hash, based
+ * on PHP's `hash_init` functions.
+ *
+ * @param StreamInterface $stream Stream to calculate the hash for
+ * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
+ * @param bool $rawOutput Whether or not to use raw output
+ *
+ * @throws \RuntimeException on error.
+ */
+ public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string
+ {
+ $pos = $stream->tell();
+
+ if ($pos > 0) {
+ $stream->rewind();
+ }
+
+ $ctx = hash_init($algo);
+ while (!$stream->eof()) {
+ hash_update($ctx, $stream->read(1048576));
+ }
+
+ $out = hash_final($ctx, $rawOutput);
+ $stream->seek($pos);
+
+ return $out;
+ }
+
+ /**
+ * Clone and modify a request with the given changes.
+ *
+ * This method is useful for reducing the number of clones needed to mutate
+ * a message.
+ *
+ * The changes can be one of:
+ * - method: (string) Changes the HTTP method.
+ * - set_headers: (array) Sets the given headers.
+ * - remove_headers: (array) Remove the given headers.
+ * - body: (mixed) Sets the given body.
+ * - uri: (UriInterface) Set the URI.
+ * - query: (string) Set the query string value of the URI.
+ * - version: (string) Set the protocol version.
+ *
+ * @param RequestInterface $request Request to clone and modify.
+ * @param array $changes Changes to apply.
+ */
+ public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface
+ {
+ if (!$changes) {
+ return $request;
+ }
+
+ $headers = $request->getHeaders();
+
+ if (!isset($changes['uri'])) {
+ $uri = $request->getUri();
+ } else {
+ // Remove the host header if one is on the URI
+ if ($host = $changes['uri']->getHost()) {
+ $changes['set_headers']['Host'] = $host;
+
+ if ($port = $changes['uri']->getPort()) {
+ $standardPorts = ['http' => 80, 'https' => 443];
+ $scheme = $changes['uri']->getScheme();
+ if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
+ $changes['set_headers']['Host'] .= ':'.$port;
+ }
+ }
+ }
+ $uri = $changes['uri'];
+ }
+
+ if (!empty($changes['remove_headers'])) {
+ $headers = self::caselessRemove($changes['remove_headers'], $headers);
+ }
+
+ if (!empty($changes['set_headers'])) {
+ $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers);
+ $headers = $changes['set_headers'] + $headers;
+ }
+
+ if (isset($changes['query'])) {
+ $uri = $uri->withQuery($changes['query']);
+ }
+
+ if ($request instanceof ServerRequestInterface) {
+ $new = (new ServerRequest(
+ $changes['method'] ?? $request->getMethod(),
+ $uri,
+ $headers,
+ $changes['body'] ?? $request->getBody(),
+ $changes['version'] ?? $request->getProtocolVersion(),
+ $request->getServerParams()
+ ))
+ ->withParsedBody($request->getParsedBody())
+ ->withQueryParams($request->getQueryParams())
+ ->withCookieParams($request->getCookieParams())
+ ->withUploadedFiles($request->getUploadedFiles());
+
+ foreach ($request->getAttributes() as $key => $value) {
+ $new = $new->withAttribute($key, $value);
+ }
+
+ return $new;
+ }
+
+ return new Request(
+ $changes['method'] ?? $request->getMethod(),
+ $uri,
+ $headers,
+ $changes['body'] ?? $request->getBody(),
+ $changes['version'] ?? $request->getProtocolVersion()
+ );
+ }
+
+ /**
+ * Read a line from the stream up to the maximum allowed buffer length.
+ *
+ * @param StreamInterface $stream Stream to read from
+ * @param int|null $maxLength Maximum buffer length
+ */
+ public static function readLine(StreamInterface $stream, int $maxLength = null): string
+ {
+ $buffer = '';
+ $size = 0;
+
+ while (!$stream->eof()) {
+ if ('' === ($byte = $stream->read(1))) {
+ return $buffer;
+ }
+ $buffer .= $byte;
+ // Break when a new line is found or the max length - 1 is reached
+ if ($byte === "\n" || ++$size === $maxLength - 1) {
+ break;
+ }
+ }
+
+ return $buffer;
+ }
+
+ /**
+ * Create a new stream based on the input type.
+ *
+ * Options is an associative array that can contain the following keys:
+ * - metadata: Array of custom metadata.
+ * - size: Size of the stream.
+ *
+ * This method accepts the following `$resource` types:
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
+ * - `string`: Creates a stream object that uses the given string as the contents.
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
+ * stream object will be created that wraps the given iterable. Each time the
+ * stream is read from, data from the iterator will fill a buffer and will be
+ * continuously called until the buffer is equal to the requested read size.
+ * Subsequent read calls will first read from the buffer and then call `next`
+ * on the underlying iterator until it is exhausted.
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
+ * the object will be cast to a string and then a stream will be returned that
+ * uses the string value.
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
+ * - `callable` When a callable is passed, a read-only stream object will be
+ * created that invokes the given callable. The callable is invoked with the
+ * number of suggested bytes to read. The callable can return any number of
+ * bytes, but MUST return `false` when there is no more data to return. The
+ * stream object that wraps the callable will invoke the callable until the
+ * number of requested bytes are available. Any additional bytes will be
+ * buffered and used in subsequent reads.
+ *
+ * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
+ * @param array{size?: int, metadata?: array} $options Additional options
+ *
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
+ */
+ public static function streamFor($resource = '', array $options = []): StreamInterface
+ {
+ if (is_scalar($resource)) {
+ $stream = self::tryFopen('php://temp', 'r+');
+ if ($resource !== '') {
+ fwrite($stream, (string) $resource);
+ fseek($stream, 0);
+ }
+
+ return new Stream($stream, $options);
+ }
+
+ switch (gettype($resource)) {
+ case 'resource':
+ /*
+ * The 'php://input' is a special stream with quirks and inconsistencies.
+ * We avoid using that stream by reading it into php://temp
+ */
+
+ /** @var resource $resource */
+ if ((\stream_get_meta_data($resource)['uri'] ?? '') === 'php://input') {
+ $stream = self::tryFopen('php://temp', 'w+');
+ stream_copy_to_stream($resource, $stream);
+ fseek($stream, 0);
+ $resource = $stream;
+ }
+
+ return new Stream($resource, $options);
+ case 'object':
+ /** @var object $resource */
+ if ($resource instanceof StreamInterface) {
+ return $resource;
+ } elseif ($resource instanceof \Iterator) {
+ return new PumpStream(function () use ($resource) {
+ if (!$resource->valid()) {
+ return false;
+ }
+ $result = $resource->current();
+ $resource->next();
+
+ return $result;
+ }, $options);
+ } elseif (method_exists($resource, '__toString')) {
+ return self::streamFor((string) $resource, $options);
+ }
+ break;
+ case 'NULL':
+ return new Stream(self::tryFopen('php://temp', 'r+'), $options);
+ }
+
+ if (is_callable($resource)) {
+ return new PumpStream($resource, $options);
+ }
+
+ throw new \InvalidArgumentException('Invalid resource type: '.gettype($resource));
+ }
+
+ /**
+ * Safely opens a PHP stream resource using a filename.
+ *
+ * When fopen fails, PHP normally raises a warning. This function adds an
+ * error handler that checks for errors and throws an exception instead.
+ *
+ * @param string $filename File to open
+ * @param string $mode Mode used to open the file
+ *
+ * @return resource
+ *
+ * @throws \RuntimeException if the file cannot be opened
+ */
+ public static function tryFopen(string $filename, string $mode)
+ {
+ $ex = null;
+ set_error_handler(static function (int $errno, string $errstr) use ($filename, $mode, &$ex): bool {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to open "%s" using mode "%s": %s',
+ $filename,
+ $mode,
+ $errstr
+ ));
+
+ return true;
+ });
+
+ try {
+ /** @var resource $handle */
+ $handle = fopen($filename, $mode);
+ } catch (\Throwable $e) {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to open "%s" using mode "%s": %s',
+ $filename,
+ $mode,
+ $e->getMessage()
+ ), 0, $e);
+ }
+
+ restore_error_handler();
+
+ if ($ex) {
+ /** @var $ex \RuntimeException */
+ throw $ex;
+ }
+
+ return $handle;
+ }
+
+ /**
+ * Safely gets the contents of a given stream.
+ *
+ * When stream_get_contents fails, PHP normally raises a warning. This
+ * function adds an error handler that checks for errors and throws an
+ * exception instead.
+ *
+ * @param resource $stream
+ *
+ * @throws \RuntimeException if the stream cannot be read
+ */
+ public static function tryGetContents($stream): string
+ {
+ $ex = null;
+ set_error_handler(static function (int $errno, string $errstr) use (&$ex): bool {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to read stream contents: %s',
+ $errstr
+ ));
+
+ return true;
+ });
+
+ try {
+ /** @var string|false $contents */
+ $contents = stream_get_contents($stream);
+
+ if ($contents === false) {
+ $ex = new \RuntimeException('Unable to read stream contents');
+ }
+ } catch (\Throwable $e) {
+ $ex = new \RuntimeException(sprintf(
+ 'Unable to read stream contents: %s',
+ $e->getMessage()
+ ), 0, $e);
+ }
+
+ restore_error_handler();
+
+ if ($ex) {
+ /** @var $ex \RuntimeException */
+ throw $ex;
+ }
+
+ return $contents;
+ }
+
+ /**
+ * Returns a UriInterface for the given value.
+ *
+ * This function accepts a string or UriInterface and returns a
+ * UriInterface for the given value. If the value is already a
+ * UriInterface, it is returned as-is.
+ *
+ * @param string|UriInterface $uri
+ *
+ * @throws \InvalidArgumentException
+ */
+ public static function uriFor($uri): UriInterface
+ {
+ if ($uri instanceof UriInterface) {
+ return $uri;
+ }
+
+ if (is_string($uri)) {
+ return new Uri($uri);
+ }
+
+ throw new \InvalidArgumentException('URI must be a string or UriInterface');
+ }
+}
diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md
new file mode 100644
index 0000000..58ddab0
--- /dev/null
+++ b/vendor/psr/cache/CHANGELOG.md
@@ -0,0 +1,16 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 1.0.1 - 2016-08-06
+
+### Fixed
+
+- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr
+- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr
+- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell
+- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell
+
+## 1.0.0 - 2015-12-11
+
+Initial stable release; reflects accepted PSR-6 specification
diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt
new file mode 100644
index 0000000..b1c2c97
--- /dev/null
+++ b/vendor/psr/cache/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2015 PHP Framework Interoperability Group
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/psr/cache/README.md b/vendor/psr/cache/README.md
new file mode 100644
index 0000000..9855a31
--- /dev/null
+++ b/vendor/psr/cache/README.md
@@ -0,0 +1,12 @@
+Caching Interface
+==============
+
+This repository holds all interfaces related to [PSR-6 (Caching Interface)][psr-url].
+
+Note that this is not a Caching implementation of its own. It is merely interfaces that describe the components of a Caching mechanism.
+
+The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
+
+[psr-url]: https://www.php-fig.org/psr/psr-6/
+[package-url]: https://packagist.org/packages/psr/cache
+[implementation-url]: https://packagist.org/providers/psr/cache-implementation
diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json
new file mode 100644
index 0000000..4b68797
--- /dev/null
+++ b/vendor/psr/cache/composer.json
@@ -0,0 +1,25 @@
+{
+ "name": "psr/cache",
+ "description": "Common interface for caching libraries",
+ "keywords": ["psr", "psr-6", "cache"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "require": {
+ "php": ">=8.0.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php
new file mode 100644
index 0000000..bb785f4
--- /dev/null
+++ b/vendor/psr/cache/src/CacheException.php
@@ -0,0 +1,10 @@
+=7.0.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/psr/http-factory/src/RequestFactoryInterface.php b/vendor/psr/http-factory/src/RequestFactoryInterface.php
new file mode 100644
index 0000000..cb39a08
--- /dev/null
+++ b/vendor/psr/http-factory/src/RequestFactoryInterface.php
@@ -0,0 +1,18 @@
+ `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`.
+> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered.
+
diff --git a/vendor/psr/http-message/docs/PSR7-Usage.md b/vendor/psr/http-message/docs/PSR7-Usage.md
new file mode 100644
index 0000000..b6d048a
--- /dev/null
+++ b/vendor/psr/http-message/docs/PSR7-Usage.md
@@ -0,0 +1,159 @@
+### PSR-7 Usage
+
+All PSR-7 applications comply with these interfaces
+They were created to establish a standard between middleware implementations.
+
+> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`.
+> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered.
+
+
+The following examples will illustrate how basic operations are done in PSR-7.
+
+##### Examples
+
+
+For this examples to work (at least) a PSR-7 implementation package is required. (eg: zendframework/zend-diactoros, guzzlehttp/psr7, slim/slim, etc)
+All PSR-7 implementations should have the same behaviour.
+
+The following will be assumed:
+`$request` is an object of `Psr\Http\Message\RequestInterface` and
+
+`$response` is an object implementing `Psr\Http\Message\RequestInterface`
+
+
+### Working with HTTP Headers
+
+#### Adding headers to response:
+
+```php
+$response->withHeader('My-Custom-Header', 'My Custom Message');
+```
+
+#### Appending values to headers
+
+```php
+$response->withAddedHeader('My-Custom-Header', 'The second message');
+```
+
+#### Checking if header exists:
+
+```php
+$request->hasHeader('My-Custom-Header'); // will return false
+$response->hasHeader('My-Custom-Header'); // will return true
+```
+
+> Note: My-Custom-Header was only added in the Response
+
+#### Getting comma-separated values from a header (also applies to request)
+
+```php
+// getting value from request headers
+$request->getHeaderLine('Content-Type'); // will return: "text/html; charset=UTF-8"
+// getting value from response headers
+$response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Message; The second message"
+```
+
+#### Getting array of value from a header (also applies to request)
+```php
+// getting value from request headers
+$request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"]
+// getting value from response headers
+$response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"]
+```
+
+#### Removing headers from HTTP Messages
+```php
+// removing a header from Request, removing deprecated "Content-MD5" header
+$request->withoutHeader('Content-MD5');
+
+// removing a header from Response
+// effect: the browser won't know the size of the stream
+// the browser will download the stream till it ends
+$response->withoutHeader('Content-Length');
+```
+
+### Working with HTTP Message Body
+
+When working with the PSR-7 there are two methods of implementation:
+#### 1. Getting the body separately
+
+> This method makes the body handling easier to understand and is useful when repeatedly calling body methods. (You only call `getBody()` once). Using this method mistakes like `$response->write()` are also prevented.
+
+```php
+$body = $response->getBody();
+// operations on body, eg. read, write, seek
+// ...
+// replacing the old body
+$response->withBody($body);
+// this last statement is optional as we working with objects
+// in this case the "new" body is same with the "old" one
+// the $body variable has the same value as the one in $request, only the reference is passed
+```
+
+#### 2. Working directly on response
+
+> This method is useful when only performing few operations as the `$request->getBody()` statement fragment is required
+
+```php
+$response->getBody()->write('hello');
+```
+
+### Getting the body contents
+
+The following snippet gets the contents of a stream contents.
+> Note: Streams must be rewinded, if content was written into streams, it will be ignored when calling `getContents()` because the stream pointer is set to the last character, which is `\0` - meaning end of stream.
+```php
+$body = $response->getBody();
+$body->rewind(); // or $body->seek(0);
+$bodyText = $body->getContents();
+```
+> Note: If `$body->seek(1)` is called before `$body->getContents()`, the first character will be ommited as the starting pointer is set to `1`, not `0`. This is why using `$body->rewind()` is recommended.
+
+### Append to body
+
+```php
+$response->getBody()->write('Hello'); // writing directly
+$body = $request->getBody(); // which is a `StreamInterface`
+$body->write('xxxxx');
+```
+
+### Prepend to body
+Prepending is different when it comes to streams. The content must be copied before writing the content to be prepended.
+The following example will explain the behaviour of streams.
+
+```php
+// assuming our response is initially empty
+$body = $repsonse->getBody();
+// writing the string "abcd"
+$body->write('abcd');
+
+// seeking to start of stream
+$body->seek(0);
+// writing 'ef'
+$body->write('ef'); // at this point the stream contains "efcd"
+```
+
+#### Prepending by rewriting separately
+
+```php
+// assuming our response body stream only contains: "abcd"
+$body = $response->getBody();
+$body->rewind();
+$contents = $body->getContents(); // abcd
+// seeking the stream to beginning
+$body->rewind();
+$body->write('ef'); // stream contains "efcd"
+$body->write($contents); // stream contains "efabcd"
+```
+
+> Note: `getContents()` seeks the stream while reading it, therefore if the second `rewind()` method call was not present the stream would have resulted in `abcdefabcd` because the `write()` method appends to stream if not preceeded by `rewind()` or `seek(0)`.
+
+#### Prepending by using contents as a string
+```php
+$body = $response->getBody();
+$body->rewind();
+$contents = $body->getContents(); // efabcd
+$contents = 'ef'.$contents;
+$body->rewind();
+$body->write($contents);
+```
diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php
new file mode 100644
index 0000000..a83c985
--- /dev/null
+++ b/vendor/psr/http-message/src/MessageInterface.php
@@ -0,0 +1,187 @@
+getHeaders() as $name => $values) {
+ * echo $name . ": " . implode(", ", $values);
+ * }
+ *
+ * // Emit headers iteratively:
+ * foreach ($message->getHeaders() as $name => $values) {
+ * foreach ($values as $value) {
+ * header(sprintf('%s: %s', $name, $value), false);
+ * }
+ * }
+ *
+ * While header names are not case-sensitive, getHeaders() will preserve the
+ * exact case in which headers were originally specified.
+ *
+ * @return string[][] Returns an associative array of the message's headers. Each
+ * key MUST be a header name, and each value MUST be an array of strings
+ * for that header.
+ */
+ public function getHeaders(): array;
+
+ /**
+ * Checks if a header exists by the given case-insensitive name.
+ *
+ * @param string $name Case-insensitive header field name.
+ * @return bool Returns true if any header names match the given header
+ * name using a case-insensitive string comparison. Returns false if
+ * no matching header name is found in the message.
+ */
+ public function hasHeader(string $name): bool;
+
+ /**
+ * Retrieves a message header value by the given case-insensitive name.
+ *
+ * This method returns an array of all the header values of the given
+ * case-insensitive header name.
+ *
+ * If the header does not appear in the message, this method MUST return an
+ * empty array.
+ *
+ * @param string $name Case-insensitive header field name.
+ * @return string[] An array of string values as provided for the given
+ * header. If the header does not appear in the message, this method MUST
+ * return an empty array.
+ */
+ public function getHeader(string $name): array;
+
+ /**
+ * Retrieves a comma-separated string of the values for a single header.
+ *
+ * This method returns all of the header values of the given
+ * case-insensitive header name as a string concatenated together using
+ * a comma.
+ *
+ * NOTE: Not all header values may be appropriately represented using
+ * comma concatenation. For such headers, use getHeader() instead
+ * and supply your own delimiter when concatenating.
+ *
+ * If the header does not appear in the message, this method MUST return
+ * an empty string.
+ *
+ * @param string $name Case-insensitive header field name.
+ * @return string A string of values as provided for the given header
+ * concatenated together using a comma. If the header does not appear in
+ * the message, this method MUST return an empty string.
+ */
+ public function getHeaderLine(string $name): string;
+
+ /**
+ * Return an instance with the provided value replacing the specified header.
+ *
+ * While header names are case-insensitive, the casing of the header will
+ * be preserved by this function, and returned from getHeaders().
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that has the
+ * new and/or updated header and value.
+ *
+ * @param string $name Case-insensitive header field name.
+ * @param string|string[] $value Header value(s).
+ * @return static
+ * @throws \InvalidArgumentException for invalid header names or values.
+ */
+ public function withHeader(string $name, $value): MessageInterface;
+
+ /**
+ * Return an instance with the specified header appended with the given value.
+ *
+ * Existing values for the specified header will be maintained. The new
+ * value(s) will be appended to the existing list. If the header did not
+ * exist previously, it will be added.
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that has the
+ * new header and/or value.
+ *
+ * @param string $name Case-insensitive header field name to add.
+ * @param string|string[] $value Header value(s).
+ * @return static
+ * @throws \InvalidArgumentException for invalid header names or values.
+ */
+ public function withAddedHeader(string $name, $value): MessageInterface;
+
+ /**
+ * Return an instance without the specified header.
+ *
+ * Header resolution MUST be done without case-sensitivity.
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that removes
+ * the named header.
+ *
+ * @param string $name Case-insensitive header field name to remove.
+ * @return static
+ */
+ public function withoutHeader(string $name): MessageInterface;
+
+ /**
+ * Gets the body of the message.
+ *
+ * @return StreamInterface Returns the body as a stream.
+ */
+ public function getBody(): StreamInterface;
+
+ /**
+ * Return an instance with the specified message body.
+ *
+ * The body MUST be a StreamInterface object.
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return a new instance that has the
+ * new body stream.
+ *
+ * @param StreamInterface $body Body.
+ * @return static
+ * @throws \InvalidArgumentException When the body is not valid.
+ */
+ public function withBody(StreamInterface $body): MessageInterface;
+}
diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php
new file mode 100644
index 0000000..33f85e5
--- /dev/null
+++ b/vendor/psr/http-message/src/RequestInterface.php
@@ -0,0 +1,130 @@
+getQuery()`
+ * or from the `QUERY_STRING` server param.
+ *
+ * @return array
+ */
+ public function getQueryParams(): array;
+
+ /**
+ * Return an instance with the specified query string arguments.
+ *
+ * These values SHOULD remain immutable over the course of the incoming
+ * request. They MAY be injected during instantiation, such as from PHP's
+ * $_GET superglobal, or MAY be derived from some other value such as the
+ * URI. In cases where the arguments are parsed from the URI, the data
+ * MUST be compatible with what PHP's parse_str() would return for
+ * purposes of how duplicate query parameters are handled, and how nested
+ * sets are handled.
+ *
+ * Setting query string arguments MUST NOT change the URI stored by the
+ * request, nor the values in the server params.
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that has the
+ * updated query string arguments.
+ *
+ * @param array $query Array of query string arguments, typically from
+ * $_GET.
+ * @return static
+ */
+ public function withQueryParams(array $query): ServerRequestInterface;
+
+ /**
+ * Retrieve normalized file upload data.
+ *
+ * This method returns upload metadata in a normalized tree, with each leaf
+ * an instance of Psr\Http\Message\UploadedFileInterface.
+ *
+ * These values MAY be prepared from $_FILES or the message body during
+ * instantiation, or MAY be injected via withUploadedFiles().
+ *
+ * @return array An array tree of UploadedFileInterface instances; an empty
+ * array MUST be returned if no data is present.
+ */
+ public function getUploadedFiles(): array;
+
+ /**
+ * Create a new instance with the specified uploaded files.
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that has the
+ * updated body parameters.
+ *
+ * @param array $uploadedFiles An array tree of UploadedFileInterface instances.
+ * @return static
+ * @throws \InvalidArgumentException if an invalid structure is provided.
+ */
+ public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface;
+
+ /**
+ * Retrieve any parameters provided in the request body.
+ *
+ * If the request Content-Type is either application/x-www-form-urlencoded
+ * or multipart/form-data, and the request method is POST, this method MUST
+ * return the contents of $_POST.
+ *
+ * Otherwise, this method may return any results of deserializing
+ * the request body content; as parsing returns structured content, the
+ * potential types MUST be arrays or objects only. A null value indicates
+ * the absence of body content.
+ *
+ * @return null|array|object The deserialized body parameters, if any.
+ * These will typically be an array or object.
+ */
+ public function getParsedBody();
+
+ /**
+ * Return an instance with the specified body parameters.
+ *
+ * These MAY be injected during instantiation.
+ *
+ * If the request Content-Type is either application/x-www-form-urlencoded
+ * or multipart/form-data, and the request method is POST, use this method
+ * ONLY to inject the contents of $_POST.
+ *
+ * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of
+ * deserializing the request body content. Deserialization/parsing returns
+ * structured data, and, as such, this method ONLY accepts arrays or objects,
+ * or a null value if nothing was available to parse.
+ *
+ * As an example, if content negotiation determines that the request data
+ * is a JSON payload, this method could be used to create a request
+ * instance with the deserialized parameters.
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that has the
+ * updated body parameters.
+ *
+ * @param null|array|object $data The deserialized body data. This will
+ * typically be in an array or object.
+ * @return static
+ * @throws \InvalidArgumentException if an unsupported argument type is
+ * provided.
+ */
+ public function withParsedBody($data): ServerRequestInterface;
+
+ /**
+ * Retrieve attributes derived from the request.
+ *
+ * The request "attributes" may be used to allow injection of any
+ * parameters derived from the request: e.g., the results of path
+ * match operations; the results of decrypting cookies; the results of
+ * deserializing non-form-encoded message bodies; etc. Attributes
+ * will be application and request specific, and CAN be mutable.
+ *
+ * @return array Attributes derived from the request.
+ */
+ public function getAttributes(): array;
+
+ /**
+ * Retrieve a single derived request attribute.
+ *
+ * Retrieves a single derived request attribute as described in
+ * getAttributes(). If the attribute has not been previously set, returns
+ * the default value as provided.
+ *
+ * This method obviates the need for a hasAttribute() method, as it allows
+ * specifying a default value to return if the attribute is not found.
+ *
+ * @see getAttributes()
+ * @param string $name The attribute name.
+ * @param mixed $default Default value to return if the attribute does not exist.
+ * @return mixed
+ */
+ public function getAttribute(string $name, $default = null);
+
+ /**
+ * Return an instance with the specified derived request attribute.
+ *
+ * This method allows setting a single derived request attribute as
+ * described in getAttributes().
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that has the
+ * updated attribute.
+ *
+ * @see getAttributes()
+ * @param string $name The attribute name.
+ * @param mixed $value The value of the attribute.
+ * @return static
+ */
+ public function withAttribute(string $name, $value): ServerRequestInterface;
+
+ /**
+ * Return an instance that removes the specified derived request attribute.
+ *
+ * This method allows removing a single derived request attribute as
+ * described in getAttributes().
+ *
+ * This method MUST be implemented in such a way as to retain the
+ * immutability of the message, and MUST return an instance that removes
+ * the attribute.
+ *
+ * @see getAttributes()
+ * @param string $name The attribute name.
+ * @return static
+ */
+ public function withoutAttribute(string $name): ServerRequestInterface;
+}
diff --git a/vendor/psr/http-message/src/StreamInterface.php b/vendor/psr/http-message/src/StreamInterface.php
new file mode 100644
index 0000000..a62aabb
--- /dev/null
+++ b/vendor/psr/http-message/src/StreamInterface.php
@@ -0,0 +1,158 @@
+
+ * [user-info@]host[:port]
+ *
+ *
+ * If the port component is not set or is the standard port for the current
+ * scheme, it SHOULD NOT be included.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-3.2
+ * @return string The URI authority, in "[user-info@]host[:port]" format.
+ */
+ public function getAuthority(): string;
+
+ /**
+ * Retrieve the user information component of the URI.
+ *
+ * If no user information is present, this method MUST return an empty
+ * string.
+ *
+ * If a user is present in the URI, this will return that value;
+ * additionally, if the password is also present, it will be appended to the
+ * user value, with a colon (":") separating the values.
+ *
+ * The trailing "@" character is not part of the user information and MUST
+ * NOT be added.
+ *
+ * @return string The URI user information, in "username[:password]" format.
+ */
+ public function getUserInfo(): string;
+
+ /**
+ * Retrieve the host component of the URI.
+ *
+ * If no host is present, this method MUST return an empty string.
+ *
+ * The value returned MUST be normalized to lowercase, per RFC 3986
+ * Section 3.2.2.
+ *
+ * @see http://tools.ietf.org/html/rfc3986#section-3.2.2
+ * @return string The URI host.
+ */
+ public function getHost(): string;
+
+ /**
+ * Retrieve the port component of the URI.
+ *
+ * If a port is present, and it is non-standard for the current scheme,
+ * this method MUST return it as an integer. If the port is the standard port
+ * used with the current scheme, this method SHOULD return null.
+ *
+ * If no port is present, and no scheme is present, this method MUST return
+ * a null value.
+ *
+ * If no port is present, but a scheme is present, this method MAY return
+ * the standard port for that scheme, but SHOULD return null.
+ *
+ * @return null|int The URI port.
+ */
+ public function getPort(): ?int;
+
+ /**
+ * Retrieve the path component of the URI.
+ *
+ * The path can either be empty or absolute (starting with a slash) or
+ * rootless (not starting with a slash). Implementations MUST support all
+ * three syntaxes.
+ *
+ * Normally, the empty path "" and absolute path "/" are considered equal as
+ * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically
+ * do this normalization because in contexts with a trimmed base path, e.g.
+ * the front controller, this difference becomes significant. It's the task
+ * of the user to handle both "" and "/".
+ *
+ * The value returned MUST be percent-encoded, but MUST NOT double-encode
+ * any characters. To determine what characters to encode, please refer to
+ * RFC 3986, Sections 2 and 3.3.
+ *
+ * As an example, if the value should include a slash ("/") not intended as
+ * delimiter between path segments, that value MUST be passed in encoded
+ * form (e.g., "%2F") to the instance.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2
+ * @see https://tools.ietf.org/html/rfc3986#section-3.3
+ * @return string The URI path.
+ */
+ public function getPath(): string;
+
+ /**
+ * Retrieve the query string of the URI.
+ *
+ * If no query string is present, this method MUST return an empty string.
+ *
+ * The leading "?" character is not part of the query and MUST NOT be
+ * added.
+ *
+ * The value returned MUST be percent-encoded, but MUST NOT double-encode
+ * any characters. To determine what characters to encode, please refer to
+ * RFC 3986, Sections 2 and 3.4.
+ *
+ * As an example, if a value in a key/value pair of the query string should
+ * include an ampersand ("&") not intended as a delimiter between values,
+ * that value MUST be passed in encoded form (e.g., "%26") to the instance.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2
+ * @see https://tools.ietf.org/html/rfc3986#section-3.4
+ * @return string The URI query string.
+ */
+ public function getQuery(): string;
+
+ /**
+ * Retrieve the fragment component of the URI.
+ *
+ * If no fragment is present, this method MUST return an empty string.
+ *
+ * The leading "#" character is not part of the fragment and MUST NOT be
+ * added.
+ *
+ * The value returned MUST be percent-encoded, but MUST NOT double-encode
+ * any characters. To determine what characters to encode, please refer to
+ * RFC 3986, Sections 2 and 3.5.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2
+ * @see https://tools.ietf.org/html/rfc3986#section-3.5
+ * @return string The URI fragment.
+ */
+ public function getFragment(): string;
+
+ /**
+ * Return an instance with the specified scheme.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified scheme.
+ *
+ * Implementations MUST support the schemes "http" and "https" case
+ * insensitively, and MAY accommodate other schemes if required.
+ *
+ * An empty scheme is equivalent to removing the scheme.
+ *
+ * @param string $scheme The scheme to use with the new instance.
+ * @return static A new instance with the specified scheme.
+ * @throws \InvalidArgumentException for invalid or unsupported schemes.
+ */
+ public function withScheme(string $scheme): UriInterface;
+
+ /**
+ * Return an instance with the specified user information.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified user information.
+ *
+ * Password is optional, but the user information MUST include the
+ * user; an empty string for the user is equivalent to removing user
+ * information.
+ *
+ * @param string $user The user name to use for authority.
+ * @param null|string $password The password associated with $user.
+ * @return static A new instance with the specified user information.
+ */
+ public function withUserInfo(string $user, ?string $password = null): UriInterface;
+
+ /**
+ * Return an instance with the specified host.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified host.
+ *
+ * An empty host value is equivalent to removing the host.
+ *
+ * @param string $host The hostname to use with the new instance.
+ * @return static A new instance with the specified host.
+ * @throws \InvalidArgumentException for invalid hostnames.
+ */
+ public function withHost(string $host): UriInterface;
+
+ /**
+ * Return an instance with the specified port.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified port.
+ *
+ * Implementations MUST raise an exception for ports outside the
+ * established TCP and UDP port ranges.
+ *
+ * A null value provided for the port is equivalent to removing the port
+ * information.
+ *
+ * @param null|int $port The port to use with the new instance; a null value
+ * removes the port information.
+ * @return static A new instance with the specified port.
+ * @throws \InvalidArgumentException for invalid ports.
+ */
+ public function withPort(?int $port): UriInterface;
+
+ /**
+ * Return an instance with the specified path.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified path.
+ *
+ * The path can either be empty or absolute (starting with a slash) or
+ * rootless (not starting with a slash). Implementations MUST support all
+ * three syntaxes.
+ *
+ * If the path is intended to be domain-relative rather than path relative then
+ * it must begin with a slash ("/"). Paths not starting with a slash ("/")
+ * are assumed to be relative to some base path known to the application or
+ * consumer.
+ *
+ * Users can provide both encoded and decoded path characters.
+ * Implementations ensure the correct encoding as outlined in getPath().
+ *
+ * @param string $path The path to use with the new instance.
+ * @return static A new instance with the specified path.
+ * @throws \InvalidArgumentException for invalid paths.
+ */
+ public function withPath(string $path): UriInterface;
+
+ /**
+ * Return an instance with the specified query string.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified query string.
+ *
+ * Users can provide both encoded and decoded query characters.
+ * Implementations ensure the correct encoding as outlined in getQuery().
+ *
+ * An empty query string value is equivalent to removing the query string.
+ *
+ * @param string $query The query string to use with the new instance.
+ * @return static A new instance with the specified query string.
+ * @throws \InvalidArgumentException for invalid query strings.
+ */
+ public function withQuery(string $query): UriInterface;
+
+ /**
+ * Return an instance with the specified URI fragment.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified URI fragment.
+ *
+ * Users can provide both encoded and decoded fragment characters.
+ * Implementations ensure the correct encoding as outlined in getFragment().
+ *
+ * An empty fragment value is equivalent to removing the fragment.
+ *
+ * @param string $fragment The fragment to use with the new instance.
+ * @return static A new instance with the specified fragment.
+ */
+ public function withFragment(string $fragment): UriInterface;
+
+ /**
+ * Return the string representation as a URI reference.
+ *
+ * Depending on which components of the URI are present, the resulting
+ * string is either a full URI or relative reference according to RFC 3986,
+ * Section 4.1. The method concatenates the various components of the URI,
+ * using the appropriate delimiters:
+ *
+ * - If a scheme is present, it MUST be suffixed by ":".
+ * - If an authority is present, it MUST be prefixed by "//".
+ * - The path can be concatenated without delimiters. But there are two
+ * cases where the path has to be adjusted to make the URI reference
+ * valid as PHP does not allow to throw an exception in __toString():
+ * - If the path is rootless and an authority is present, the path MUST
+ * be prefixed by "/".
+ * - If the path is starting with more than one "/" and no authority is
+ * present, the starting slashes MUST be reduced to one.
+ * - If a query is present, it MUST be prefixed by "?".
+ * - If a fragment is present, it MUST be prefixed by "#".
+ *
+ * @see http://tools.ietf.org/html/rfc3986#section-4.1
+ * @return string
+ */
+ public function __toString(): string;
+}
diff --git a/vendor/ralouphie/getallheaders/LICENSE b/vendor/ralouphie/getallheaders/LICENSE
new file mode 100644
index 0000000..be5540c
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Ralph Khattar
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/ralouphie/getallheaders/README.md b/vendor/ralouphie/getallheaders/README.md
new file mode 100644
index 0000000..9430d76
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/README.md
@@ -0,0 +1,27 @@
+getallheaders
+=============
+
+PHP `getallheaders()` polyfill. Compatible with PHP >= 5.3.
+
+[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders)
+[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master)
+[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders)
+[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders)
+[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders)
+
+
+This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php).
+
+## Install
+
+For PHP version **`>= 5.6`**:
+
+```
+composer require ralouphie/getallheaders
+```
+
+For PHP version **`< 5.6`**:
+
+```
+composer require ralouphie/getallheaders "^2"
+```
diff --git a/vendor/ralouphie/getallheaders/composer.json b/vendor/ralouphie/getallheaders/composer.json
new file mode 100644
index 0000000..de8ce62
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/composer.json
@@ -0,0 +1,26 @@
+{
+ "name": "ralouphie/getallheaders",
+ "description": "A polyfill for getallheaders.",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "ralph.khattar@gmail.com"
+ }
+ ],
+ "require": {
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5 || ^6.5",
+ "php-coveralls/php-coveralls": "^2.1"
+ },
+ "autoload": {
+ "files": ["src/getallheaders.php"]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "getallheaders\\Tests\\": "tests/"
+ }
+ }
+}
diff --git a/vendor/ralouphie/getallheaders/src/getallheaders.php b/vendor/ralouphie/getallheaders/src/getallheaders.php
new file mode 100644
index 0000000..c7285a5
--- /dev/null
+++ b/vendor/ralouphie/getallheaders/src/getallheaders.php
@@ -0,0 +1,46 @@
+ 'Content-Type',
+ 'CONTENT_LENGTH' => 'Content-Length',
+ 'CONTENT_MD5' => 'Content-Md5',
+ );
+
+ foreach ($_SERVER as $key => $value) {
+ if (substr($key, 0, 5) === 'HTTP_') {
+ $key = substr($key, 5);
+ if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {
+ $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
+ $headers[$key] = $value;
+ }
+ } elseif (isset($copy_server[$key])) {
+ $headers[$copy_server[$key]] = $value;
+ }
+ }
+
+ if (!isset($headers['Authorization'])) {
+ if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
+ $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
+ } elseif (isset($_SERVER['PHP_AUTH_USER'])) {
+ $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
+ $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
+ } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {
+ $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];
+ }
+ }
+
+ return $headers;
+ }
+
+}
diff --git a/vendor/squizlabs/php_codesniffer/CHANGELOG.md b/vendor/squizlabs/php_codesniffer/CHANGELOG.md
new file mode 100644
index 0000000..2da2e81
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/CHANGELOG.md
@@ -0,0 +1,5721 @@
+# Changelog
+The file documents changes to the PHP_CodeSniffer project.
+
+## [Unreleased]
+
+_Nothing yet._
+
+
+## [3.8.1] - 2024-01-11
+
+### Added
+- Documentation has been added for the following sniffs:
+ - Generic.CodeAnalysis.EmptyPHPStatement
+ - Generic.Formatting.SpaceBeforeCast
+ - Generic.PHP.Syntax
+ - Generic.WhiteSpace.LanguageConstructSpacing
+ - PSR12.Classes.ClosingBrace
+ - PSR12.Classes.OpeningBraceSpace
+ - PSR12.ControlStructures.BooleanOperatorPlacement
+ - PSR12.Files.OpenTag
+ - Thanks to [Rodrigo Primo][@rodrigoprimo] and [Denis Žoljom][@dingo-d] for the patches
+
+### Changed
+- GitHub releases will now always only contain unversioned release assets (PHARS + asc files) (same as it previously was in the squizlabs repo). See [#205] for context.
+ - Thanks to [Shivam Mathur][@shivammathur] for opening a discussion about this
+- Various housekeeping, includes improvements to the tests and documentation
+ - Thanks to [Dan Wallis][@fredden], [Lucas Hoffmann][@lucc], [Rodrigo Primo][@rodrigoprimo] and [Juliette Reinders Folmer][@jrfnl] for their contributions
+
+### Fixed
+- Fixed bug [#124] : Report Full : avoid unnecessarily wrapping lines when `-s` is used
+ - Thanks to [Brad Jorsch][@anomiex] for the patch
+- Fixed bug [#124] : Report Full : fix incorrect bolding of pipes when `-s` is used and messages wraps
+ - Thanks to [Brad Jorsch][@anomiex] for the patch
+- Fixed bug [#150] : Squiz.WhiteSpace.KeywordSpacing : prevent a PHP notice when run during live coding
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#154] : Report Full : delimiter line calculation could go wonky on wide screens when a report contains multi-line messages
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#178] : Squiz.Commenting.VariableComment : docblocks were incorrectly being flagged as missing when a property declaration used PHP native union/intersection type declarations
+ - Thanks to [Ferdinand Kuhl][@fcool] for the patch
+- Fixed bug [#211] : Squiz.Commenting.VariableComment : docblocks were incorrectly being flagged as missing when a property declaration used PHP 8.2+ stand-alone `true`/`false`/`null` type declarations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#211] : Squiz.Commenting.VariableComment : docblocks were incorrectly being flagged as missing when a property declaration used PHP native `parent`, `self` or a namespace relative class name type declaration
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#226] : Generic.CodeAnalysis.ForLoopShouldBeWhileLoop : prevent a potential PHP 8.3 deprecation notice during live coding
+ - Thanks to [Rodrigo Primo][@rodrigoprimo] for the patch
+
+[#124]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/124
+[#150]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/150
+[#154]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/154
+[#178]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/178
+[#205]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/205
+[#211]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/211
+[#226]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/226
+
+
+## [3.8.0] - 2023-12-08
+
+[Squizlabs/PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) is dead. Long live [PHPCSStandards/PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer)!
+
+### Breaking Changes
+- The `squizlabs/PHP_CodeSniffer` repository has been abandoned. The `PHPCSStandards/PHP_CodeSniffer` repository will serve as the continuation of the project. For more information about this change, please read the [announcement](https://github.com/squizlabs/PHP_CodeSniffer/issues/3932).
+ - Installation of PHP_CodeSniffer via PEAR is no longer supported.
+ - Users will need to switch to another installation method.
+ - Note: this does not affect the PEAR sniffs.
+ - For Composer users, nothing changes.
+ - **_In contrast to earlier information, the `squizlabs/php_codesniffer` package now points to the new repository and everything will continue to work as before._**
+ - PHIVE users may need to clear the PHIVE URL cache.
+ - PHIVE users who don't use the package alias, but refer to the package URL, will need to update the URL from `https://squizlabs.github.io/PHP_CodeSniffer/phars/` to `https://phars.phpcodesniffer.com/phars/`.
+ - Users who download the PHAR files using curl or wget, will need to update the download URL from `https://squizlabs.github.io/PHP_CodeSniffer/[phpcs|phpcbf].phar` or `https://github.com/squizlabs/PHP_CodeSnifffer/releases/latest/download/[phpcs|phpcbf].phar` to `https://phars.phpcodesniffer.com/[phpcs|phpcbf].phar`.
+ - For users who install PHP_CodeSniffer via the [setup-php](https://github.com/shivammathur/setup-php/) action runner for GitHub Actions, nothing changes.
+ - Users using a git clone will need to update the clone address from `git@github.com:squizlabs/PHP_CodeSniffer.git` to `git@github.com:PHPCSStandards/PHP_CodeSniffer.git`.
+ - Contributors will need to fork the new repo and add both the new fork as well as the new repo as remotes to their local git copy of PHP_CodeSniffer.
+ - Users who have (valid) open issues or pull requests in the `squizlabs/PHP_CodeSniffer` repository are invited to resubmit these to the `PHPCSStandards/PHP_CodeSniffer` repository.
+
+### Added
+- Runtime support for PHP 8.3. All known PHP 8.3 deprecation notices have been fixed
+ - Syntax support for new PHP 8.3 features will follow in a future release
+ - If you find any PHP 8.3 deprecation notices which were missed, please report them
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches
+- Added support for PHP 8.2 readonly classes to File::getClassProperties() through a new is_readonly array index in the return value
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for PHP 8.2 readonly classes to a number of sniffs
+ - Generic.CodeAnalysis.UnnecessaryFinalModifier
+ - PEAR.Commenting.ClassComment
+ - PEAR.Commenting.FileComment
+ - PSR1.Files.SideEffects
+ - PSR2.Classes.ClassDeclaration
+ - PSR12.Files.FileHeader
+ - Squiz.Classes.ClassDeclaration
+ - Squiz.Classes.LowercaseClassKeywords
+ - Squiz.Commenting.ClassComment
+ - Squiz.Commenting.DocCommentAlignment
+ - Squiz.Commenting.FileComment
+ - Squiz.Commenting.InlineComment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for PHP 8.2 `true` as a stand-alone type declaration
+ - The `File::getMethodProperties()`, `File::getMethodParameters()` and `File::getMemberProperties()` methods now all support the `true` type
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for PHP 8.2 `true` as a stand-alone type to a number of sniffs
+ - Generic.PHP.LowerCaseType
+ - PSr12.Functions.NullableTypeDeclaration
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added a Performance report to allow for finding "slow" sniffs
+ - To run this report, run PHPCS with --report=Performance.
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.RequireStrictTypes : new warning for when there is a declare statement, but the strict_types directive is set to 0
+ - The warning can be turned off by excluding the `Generic.PHP.RequireStrictTypes.Disabled` error code
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.FunctionComment : new `ParamNameUnexpectedAmpersandPrefix` error for parameters annotated as passed by reference while the parameter is not passed by reference
+ - Thanks to [Dan Wallis][@fredden] for the patch
+- Documentation has been added for the following sniffs:
+ - PSR2.Files.ClosingTag
+ - PSR2.Methods.FunctionCallSignature
+ - PSR2.Methods.FunctionClosingBrace
+ - Thanks to [Atsushi Okui][@blue32a] for the patch
+- Support for PHPUnit 8 and 9 to the test suite
+ - Test suites for external standards which run via the PHPCS native test suite can now run on PHPUnit 4-9 (was 4-7)
+ - If any of these tests use the PHPUnit `setUp()`/`tearDown()` methods or overload the `setUp()` in the `AbstractSniffUnitTest` test case, they will need to be adjusted. See the [PR details for further information](https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/59/commits/26384ebfcc0b1c1651b0e1e40c9b6c8c22881832)
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Changed
+- Changes have been made to the way PHPCS handles invalid sniff properties being set in a custom ruleset
+ - Fixes PHP 8.2 deprecation notices for properties set in a (custom) ruleset for complete standards/complete sniff categories
+ - Invalid sniff properties set for individual sniffs will now result in an error and halt the execution of PHPCS
+ - A descriptive error message is provided to allow users to fix their ruleset
+ - Sniff properties set for complete standards/complete sniff categories will now only be set on sniffs which explicitly support the property
+ - The property will be silently ignored for those sniffs which do not support the property
+ - Invalid sniff properties set for sniffs via inline annotations will result in an informative `Internal.PropertyDoesNotExist` errror on line 1 of the scanned file, but will not halt the execution of PHPCS
+ - For sniff developers, it is strongly recommended for sniffs to explicitly declare any user-adjustable public properties
+ - If dynamic properties need to be supported for a sniff, either declare the magic __set()/__get()/__isset()/__unset() methods on the sniff or let the sniff extend stdClass
+ - Note: The #[\AllowDynamicProperties] attribute will have no effect for properties which are being set in rulesets
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The third parameter for the Ruleset::setSniffProperty() method has been changed to expect an array
+ - Sniff developers/integrators of PHPCS may need to make some small adjustments to allow for this change
+ - Existing code will continue to work but will throw a deprecation error
+ - The backwards compatiblity layer will be removed in PHPCS 4.0
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- When using `auto` report width (the default) a value of 80 columns will be used if the width cannot be determined
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Sniff error messages are now more informative to help bugs get reported to the correct project
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.CodeAnalysis.UnusedFunctionParameter will now ignore magic methods for which the signature is defined by PHP
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Functions.OpeningFunctionBraceBsdAllman will now check the brace indent before the opening brace for empty functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Functions.OpeningFunctionBraceKernighanRitchie will now check the spacing before the opening brace for empty functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.WhiteSpace.IncrementDecrementSpacing now detects more spacing issues
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PSR2.Classes.PropertyDeclaration now enforces that the readonly modifier comes after the visibility modifier
+ - PSR2 and PSR12 do not have documented rules for this as they pre-date the readonly modifier
+ - PSR-PER has been used to confirm the order of this keyword so it can be applied to PSR2 and PSR12 correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PEAR.Commenting.FunctionComment + Squiz.Commenting.FunctionComment: the SpacingAfter error can now be auto-fixed
+ - Thanks to [Dan Wallis][@fredden] for the patch
+- Squiz.PHP.InnerFunctions sniff no longer reports on OO methods for OO structures declared within a function or closure
+ - Thanks to [@Daimona] for the patch
+- Squiz.PHP.NonExecutableCode will now also flag redundant return statements just before a closure close brace
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Runtime performance improvement for PHPCS CLI users. The improvement should be most noticeable for users on Windows.
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The following sniffs have received performance related improvements:
+ - Generic.PHP.LowerCaseConstant
+ - Generic.PHP.LowerCaseType
+ - PSR12.Files.OpenTag
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches
+- The -e (explain) command will now list sniffs in natural order
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Tests using the PHPCS native test framework with multiple test case files will now run the test case files in numeric order.
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The following sniffs have received minor message readability improvements:
+ - Generic.Arrays.ArrayIndent
+ - Generic.Formatting.SpaceAfterCast
+ - Generic.Formatting.SpaceAfterNot
+ - Generic.WhiteSpace.SpreadOperatorSpacingAfter
+ - Squiz.Arrays.ArrayDeclaration
+ - Squiz.Commenting.DocCommentAlignment
+ - Squiz.ControlStructures.ControlSignature
+ - Thanks to [Danny van der Sluijs][@DannyvdSluijs] and [Juliette Reinders Folmer][@jrfnl] for the patches
+- Improved README syntax highlighting
+ - Thanks to [Benjamin Loison][@Benjamin-Loison] for the patch
+- Various documentation improvements
+ - Thanks to [Andrew Dawes][@AndrewDawes], [Danny van der Sluijs][@DannyvdSluijs] and [Juliette Reinders Folmer][@jrfnl] for the patches
+
+### Removed
+- Removed support for installation via PEAR
+ - Use composer or the PHAR files instead
+
+### Fixed
+- Fixed bug [#2857] : Squiz/NonExecutableCode: prevent false positives when exit is used in a ternary expression or as default with null coalesce
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3386] : PSR1/SideEffects : improved recognition of disable/enable annotations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3557] : Squiz.Arrays.ArrayDeclaration will now ignore PHP 7.4 array unpacking when determining whether an array is associative
+ - Thanks to [Volker Dusch][@edorian] for the patch
+- Fixed bug [#3592] : Squiz/NonExecutableCode: prevent false positives when a PHP 8.0+ inline throw expression is encountered
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3715] : Generic/UnusedFunctionParameter: fixed incorrect errorcode for closures/arrow functions nested within extended classes/classes which implement
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3717] : Squiz.Commenting.FunctionComment: fixed false positive for `InvalidNoReturn` when type is never
+ - Thanks to [Choraimy Kroonstuiver][@axlon] for the patch
+- Fixed bug [#3720] : Generic/RequireStrictTypes : will now bow out silently in case of parse errors/live coding instead of throwing false positives/false negatives
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3720] : Generic/RequireStrictTypes : did not handle multi-directive declare statements
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3722] : Potential "Uninitialized string offset 1" in octal notation backfill
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3736] : PEAR/FunctionDeclaration: prevent fixer removing the close brace (and creating a parse error) when there is no space between the open brace and close brace of a function
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3739] : PEAR/FunctionDeclaration: prevent fixer conflict, and potentially creating a parse error, for unconventionally formatted return types
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3770] : Squiz/NonExecutableCode: prevent false positives for switching between PHP and HTML
+ - Thanks to [Dan Wallis][@fredden] for the patch
+- Fixed bug [#3773] : Tokenizer/PHP: tokenization of the readonly keyword when used in combination with PHP 8.2 disjunctive normal types
+ - Thanks to [Dan Wallis][@fredden] and [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3776] : Generic/JSHint: error when JSHint is not available
+ - Thanks to [Dan Wallis][@fredden] for the patch
+- Fixed bug [#3777] : Squiz/NonExecutableCode: slew of bug fixes, mostly related to modern PHP
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3778] : Squiz/LowercasePHPFunctions: bug fix for class names in attributes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3779] : Generic/ForbiddenFunctions: bug fix for class names in attributes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3785] : Squiz.Commenting.FunctionComment: potential "Uninitialized string offset 0" when a type contains a duplicate pipe symbol
+ - Thanks to [Dan Wallis][@fredden] for the patch
+- Fixed bug [#3787] : PEAR/Squiz/[MultiLine]FunctionDeclaration: allow for PHP 8.1 new in initializers
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3789] : Incorrect tokenization for ternary operator with `match` inside of it
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3790] : PSR12/AnonClassDeclaration: prevent fixer creating parse error when there was no space before the open brace
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3797] : Tokenizer/PHP: more context sensitive keyword fixes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3801] : File::getMethodParameters(): allow for readonly promoted properties without visibility
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3805] : Generic/FunctionCallArgumentSpacing: prevent fixer conflict over PHP 7.3+ trailing comma's in function calls
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3806] : Squiz.PHP.InnerFunctions sniff now correctly reports inner functions declared within a closure
+ - Thanks to [@Daimona] for the patch
+- Fixed bug [#3809] : GitBlame report was broken when passing a basepath
+ - Thanks to [Chris][@datengraben] for the patch
+- Fixed bug [#3813] : Squiz.Commenting.FunctionComment: false positive for parameter name mismatch on parameters annotated as passed by reference
+ - Thanks to [Dan Wallis][@fredden] for the patch
+- Fixed bug [#3833] : Generic.PHP.LowerCaseType: fixed potential undefined array index notice
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3846] : PSR2.Classes.ClassDeclaration.CloseBraceAfterBody : fixer will no longer remove indentation on the close brace line
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3854] : Fatal error when using Gitblame report in combination with `--basepath` and running from project subdirectory
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3856] : PSR12.Traits.UseDeclaration was using the wrong error code - SpacingAfterAs - for spacing issues after the `use` keyword
+ - These will now be reported using the SpacingAfterUse error code
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3856] : PSR12.Traits.UseDeclaration did not check spacing after `use` keyword for multi-line trait use statements
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3867] : Tokenizer/PHP: union type and intersection type operators were not correctly tokenized for static properties without explicit visibility
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3877] : Filter names can be case-sensitive. The -h help text will now display the correct case for the available filters
+ - Thanks to [@simonsan] for the patch
+- Fixed bug [#3893] : Generic/DocComment : the SpacingAfterTagGroup fixer could accidentally remove ignore annotations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3898] : Squiz/NonExecutableCode : the sniff could get confused over comments in unexpected places
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3904] : Squiz/FunctionSpacing : prevent potential fixer conflict
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug [#3906] : Tokenizer/CSS: bug fix related to the unsupported slash comment syntax
+ - Thanks to [Dan Wallis][@fredden] for the patch
+- Fixed bug [#3913] : Config did not always correctly store unknown "long" arguments in the `$unknown` property
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+Thanks go to [Dan Wallis][@fredden] and [Danny van der Sluijs][@DannyvdSluijs] for reviewing quite a few of the PRs for this release.
+Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo change over.
+
+[#2857]: https://github.com/squizlabs/PHP_CodeSniffer/issues/2857
+[#3386]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3386
+[#3557]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3557
+[#3592]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3592
+[#3715]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3715
+[#3717]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3717
+[#3720]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3720
+[#3722]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3722
+[#3736]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3736
+[#3739]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3739
+[#3770]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3770
+[#3773]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3773
+[#3776]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3776
+[#3777]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3777
+[#3778]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3778
+[#3779]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3779
+[#3785]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3785
+[#3787]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3787
+[#3789]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3789
+[#3790]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3790
+[#3797]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3797
+[#3801]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3801
+[#3805]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3805
+[#3806]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3806
+[#3809]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3809
+[#3813]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3813
+[#3833]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3833
+[#3846]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3846
+[#3854]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3854
+[#3856]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3856
+[#3867]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3867
+[#3877]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3877
+[#3893]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3893
+[#3898]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3898
+[#3904]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3904
+[#3906]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3906
+[#3913]: https://github.com/squizlabs/PHP_CodeSniffer/pull/3913
+
+## [3.7.2] - 2023-02-23
+### Changed
+- Newer versions of Composer will now suggest installing PHPCS using require-dev instead of require
+ - Thanks to [Gary Jones][@GaryJones] for the patch
+- A custom Out Of Memory error will now be shown if PHPCS or PHPCBF run out of memory during a run
+ - Error message provides actionable information about how to fix the problem and ensures the error is not silent
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] and [Alain Schlesser][@schlessera] for the patch
+- Generic.PHP.LowerCaseType sniff now correctly examines types inside arrow functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Formatting.OperatorBracket no longer reports false positives in match() structures
+
+### Fixed
+- Fixed bug #3616 : Squiz.PHP.DisallowComparisonAssignment false positive for PHP 8 match expression
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3618 : Generic.WhiteSpace.ArbitraryParenthesesSpacing false positive for return new parent()
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3632 : Short list not tokenized correctly in control structures without braces
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3639 : Tokenizer not applying tab replacement to heredoc/nowdoc closers
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3640 : Generic.WhiteSpace.DisallowTabIndent not reporting errors for PHP 7.3 flexible heredoc/nowdoc syntax
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3645 : PHPCS can show 0 exit code when running in parallel even if child process has fatal error
+ - Thanks to [Alex Panshin][@enl] for the patch
+- Fixed bug #3653 : False positives for match() in OperatorSpacingSniff
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #3666 : PEAR.Functions.FunctionCallSignature incorrect indent fix when checking mixed HTML/PHP files
+- Fixed bug #3668 : PSR12.Classes.ClassInstantiation.MissingParentheses false positive when instantiating parent classes
+ - Similar issues also fixed in Generic.Functions.FunctionCallArgumentSpacing and Squiz.Formatting.OperatorBracket
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3672 : Incorrect ScopeIndent.IncorrectExact report for match inside array literal
+- Fixed bug #3694 : Generic.WhiteSpace.SpreadOperatorSpacingAfter does not ignore spread operator in PHP 8.1 first class callables
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.7.1] - 2022-06-18
+### Fixed
+- Fixed bug #3609 : Methods/constants with name empty/isset/unset are always reported as error
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.7.0] - 2022-06-13
+### Added
+- Added support for PHP 8.1 explicit octal notation
+ - This new syntax has been backfilled for PHP versions less than 8.1
+ - Thanks to [Mark Baker][@MarkBaker] for the patch
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for additional fixes
+- Added support for PHP 8.1 enums
+ - This new syntax has been backfilled for PHP versions less than 8.1
+ - Includes a new T_ENUM_CASE token to represent the case statements inside an enum
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for additional core and sniff support
+- Added support for the PHP 8.1 readonly token
+ - Tokenzing of the readonly keyword has been backfilled for PHP versions less than 8.1
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Added support for PHP 8.1 intersection types
+ - Includes a new T_TYPE_INTERSECTION token to represent the ampersand character inside intersection types
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+
+### Changed
+- File::getMethodParameters now supports the new PHP 8.1 readonly token
+ - When constructor property promotion is used, a new property_readonly array index is included in the return value
+ - This is a boolean value indicating if the property is readonly
+ - If the readonly token is detected, a new readonly_token array index is included in the return value
+ - This contains the token index of the readonly keyword
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Support for new PHP 8.1 readonly keyword has been added to the following sniffs:
+ - Generic.PHP.LowerCaseKeyword
+ - PSR2.Classes.PropertyDeclaration
+ - Squiz.Commenting.BlockComment
+ - Squiz.Commenting.DocCommentAlignment
+ - Squiz.Commenting.VariableComment
+ - Squiz.WhiteSpace.ScopeKeywordSpacing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches
+- The parallel feature is now more efficient and runs faster in some situations due to improved process management
+ - Thanks to [Sergei Morozov][@morozov] for the patch
+- The list of installed coding standards now has consistent ordering across all platforms
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.UpperCaseConstant and Generic.PHP.LowerCaseConstant now ignore type declarations
+ - These sniffs now only report errors for true/false/null when used as values
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.LowerCaseType now supports the PHP 8.1 never type
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+
+### Fixed
+- Fixed bug #3502 : A match statement within an array produces Squiz.Arrays.ArrayDeclaration.NoKeySpecified
+- Fixed bug #3503 : Squiz.Commenting.FunctionComment.ThrowsNoFullStop false positive when one line @throw
+- Fixed bug #3505 : The nullsafe operator is not counted in Generic.Metrics.CyclomaticComplexity
+ - Thanks to [Mark Baker][@MarkBaker] for the patch
+- Fixed bug #3526 : PSR12.Properties.ConstantVisibility false positive when using public final const syntax
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3530 : Line indented incorrectly false positive when using match-expression inside switch case
+- Fixed bug #3534 : Name of typed enum tokenized as T_GOTO_LABEL
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3546 : Tokenizer/PHP: bug fix - parent/static keywords in class instantiations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3550 : False positive from PSR2.ControlStructures.SwitchDeclaration.TerminatingComment when using trailing comment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3575: Squiz.Scope.MethodScope misses visibility keyword on previous line
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3604: Tokenizer/PHP: bug fix for double quoted strings using ${
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.6.2] - 2021-12-13
+### Changed
+- Processing large code bases that use tab indenting inside comments and strings will now be faster
+ - Thanks to [Thiemo Kreuz][@thiemowmde] for the patch
+
+### Fixed
+- Fixed bug #3388 : phpcs does not work when run from WSL drives
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] and [Graham Wharton][@gwharton] for the patch
+- Fixed bug #3422 : Squiz.WhiteSpace.ScopeClosingBrace fixer removes HTML content when fixing closing brace alignment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3437 : PSR12 does not forbid blank lines at the start of the class body
+ - Added new PSR12.Classes.OpeningBraceSpace sniff to enforce this
+- Fixed bug #3440 : Squiz.WhiteSpace.MemberVarSpacing false positives when attributes used without docblock
+ - Thanks to [Vadim Borodavko][@javer] for the patch
+- Fixed bug #3448 : PHP 8.1 deprecation notice while generating running time value
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] and Andy Postnikov for the patch
+- Fixed bug #3456 : PSR12.Classes.ClassInstantiation.MissingParentheses false positive using attributes on anonymous class
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3460 : Generic.Formatting.MultipleStatementAlignment false positive on closure with parameters
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3468 : do/while loops are double-counted in Generic.Metrics.CyclomaticComplexity
+ - Thanks to [Mark Baker][@MarkBaker] for the patch
+- Fixed bug #3469 : Ternary Operator and Null Coalescing Operator are not counted in Generic.Metrics.CyclomaticComplexity
+ - Thanks to [Mark Baker][@MarkBaker] for the patch
+- Fixed bug #3472 : PHP 8 match() expression is not counted in Generic.Metrics.CyclomaticComplexity
+ - Thanks to [Mark Baker][@MarkBaker] for the patch
+
+## [3.6.1] - 2021-10-11
+### Changed
+- PHPCS annotations can now be specified using hash-style comments
+ - Previously, only slash-style and block-style comments could be used to do things like disable errors
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The new PHP 8.1 tokenisation for ampersands has been reverted to use the existing PHP_CodeSniffer method
+ - The PHP 8.1 tokens T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG and T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG are unsued
+ - Ampersands continue to be tokenized as T_BITWISE_AND for all PHP versions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] and [Anna Filina][@afilina] for the patch
+- File::getMethodParameters() no longer incorrectly returns argument attributes in the type hint array index
+ - A new has_attributes array index is available and set to TRUE if the argument has attributes defined
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed an issue where some sniffs would not run on PHP files that only used the short echo tag
+ - The following sniffs were affected:
+ - Generic.Files.ExecutableFile
+ - Generic.Files.LowercasedFilename
+ - Generic.Files.LineEndings
+ - Generic.Files.EndFileNewline
+ - Generic.Files.EndFileNoNewline
+ - Generic.PHP.ClosingPHPTag
+ - Generic.PHP.Syntax
+ - Generic.VersionControl.GitMergeConflict
+ - Generic.WhiteSpace.DisallowSpaceIndent
+ - Generic.WhiteSpace.DisallowTabIndent
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.BlockComment now correctly applies rules for block comments after a short echo tag
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Generic.NamingConventions.ConstructorName no longer throws deprecation notices on PHP 8.1
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed false positives when using attributes in the following sniffs:
+ - PEAR.Commenting.FunctionComment
+ - Squiz.Commenting.InlineComment
+ - Squiz.Commenting.BlockComment
+ - Squiz.Commenting.VariableComment
+ - Squiz.WhiteSpace.MemberVarSpacing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3294 : Bug in attribute tokenization when content contains PHP end token or attribute closer on new line
+ - Thanks to [Alessandro Chitolina][@alekitto] for the patch
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the tests
+- Fixed bug #3296 : PSR2.ControlStructures.SwitchDeclaration takes phpcs:ignore as content of case body
+- Fixed bug #3297 : PSR2.ControlStructures.SwitchDeclaration.TerminatingComment does not handle try/finally blocks
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3302 : PHP 8.0 | Tokenizer/PHP: bugfix for union types using namespace operator
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3303 : findStartOfStatement() doesn't work with T_OPEN_TAG_WITH_ECHO
+- Fixed bug #3316 : Arrow function not tokenized correctly when using null in union type
+- Fixed bug #3317 : Problem with how phpcs handles ignored files when running in parallel
+ - Thanks to [Emil Andersson][@emil-nasso] for the patch
+- Fixed bug #3324 : PHPCS hangs processing some nested arrow functions inside a function call
+- Fixed bug #3326 : Generic.Formatting.MultipleStatementAlignment error with const DEFAULT
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3333 : Squiz.Objects.ObjectInstantiation: null coalesce operators are not recognized as assignment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3340 : Ensure interface and trait names are always tokenized as T_STRING
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3342 : PSR12/Squiz/PEAR standards all error on promoted properties with docblocks
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3345 : IF statement with no braces and double catch turned into syntax error by auto-fixer
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3352 : PSR2.ControlStructures.SwitchDeclaration can remove comments on the same line as the case statement while fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3357 : Generic.Functions.OpeningFunctionBraceBsdAllman removes return type when additional lines are present
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3362 : Generic.WhiteSpace.ScopeIndent false positive for arrow functions inside arrays
+- Fixed bug #3384 : Squiz.Commenting.FileComment.SpacingAfterComment false positive on empty file
+- Fixed bug #3394 : Fix PHP 8.1 auto_detect_line_endings deprecation notice
+- Fixed bug #3400 : PHP 8.1: prevent deprecation notices about missing return types
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3424 : PHPCS fails when using PHP 8 Constructor property promotion with attributes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3425 : PHP 8.1 | Runner::processChildProcs(): fix passing null to non-nullable bug
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3445 : Nullable parameter after attribute incorrectly tokenized as ternary operator
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.6.0] - 2021-04-09
+### Added
+- Added support for PHP 8.0 union types
+ - A new T_TYPE_UNION token is available to represent the pipe character
+ - File::getMethodParameters(), getMethodProperties(), and getMemberProperties() will now return union types
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for PHP 8.0 named function call arguments
+ - A new T_PARAM_NAME token is available to represent the label with the name of the function argument in it
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for PHP 8.0 attributes
+ - The PHP-supplied T_ATTRIBUTE token marks the start of an attribute
+ - A new T_ATTRIBUTE_END token is available to mark the end of an attribute
+ - New attribute_owner and attribute_closer indexes are available in the tokens array for all tokens inside an attribute
+ - Tokenizing of attributes has been backfilled for older PHP versions
+ - The following sniffs have been updated to support attributes:
+ - PEAR.Commenting.ClassComment
+ - PEAR.Commenting.FileComment
+ - PSR1.Files.SideEffects
+ - PSR12.Files.FileHeader
+ - Squiz.Commenting.ClassComment
+ - Squiz.Commenting.FileComment
+ - Squiz.WhiteSpace.FunctionSpacing
+ - Thanks to [Vadim Borodavko][@javer] for the patch
+ - Thanks to [Alessandro Chitolina][@alekitto] for the patch
+- Added support for PHP 8.0 dereferencing of text strings with interpolated variables
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for PHP 8.0 match expressions
+ - Match expressions are now tokenised with parenthesis and scope openers and closers
+ - Sniffs can listen for the T_MATCH token to process match expressions
+ - Note that the case and default statements inside match expressions do not have scopes set
+ - A new T_MATCH_ARROW token is available to represent the arrows in match expressions
+ - A new T_MATCH_DEFAULT token is available to represent the default keyword in match expressions
+ - All tokenizing of match expressions has been backfilled for older PHP versions
+ - The following sniffs have been updated to support match expressions:
+ - Generic.CodeAnalysis.AssignmentInCondition
+ - Generic.CodeAnalysis.EmptyPHPStatement
+ - Thanks to [Vadim Borodavko][@javer] for the patch
+ - Generic.CodeAnalysis.EmptyStatement
+ - Generic.PHP.LowerCaseKeyword
+ - PEAR.ControlStructures.ControlSignature
+ - PSR12.ControlStructures.BooleanOperatorPlacement
+ - Squiz.Commenting.LongConditionClosingComment
+ - Squiz.Commenting.PostStatementComment
+ - Squiz.ControlStructures.LowercaseDeclaration
+ - Squiz.ControlStructures.ControlSignature
+ - Squiz.Formatting.OperatorBracket
+ - Squiz.PHP.DisallowMultipleAssignments
+ - Squiz.Objects.ObjectInstantiation
+ - Squiz.WhiteSpace.ControlStructureSpacing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added Generic.NamingConventions.AbstractClassNamePrefix to enforce that class names are prefixed with "Abstract"
+ - Thanks to [Anna Borzenko][@annechko] for the contribution
+- Added Generic.NamingConventions.InterfaceNameSuffix to enforce that interface names are suffixed with "Interface"
+ - Thanks to [Anna Borzenko][@annechko] for the contribution
+- Added Generic.NamingConventions.TraitNameSuffix to enforce that trait names are suffixed with "Trait"
+ - Thanks to [Anna Borzenko][@annechko] for the contribution
+
+### Changed
+- The value of the T_FN_ARROW token has changed from "T_FN_ARROW" to "PHPCS_T_FN_ARROW" to avoid package conflicts
+ - This will have no impact on custom sniffs unless they are specifically looking at the value of the T_FN_ARROW constant
+ - If sniffs are just using constant to find arrow functions, they will continue to work without modification
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- File::findStartOfStatement() now works correctly when passed the last token in a statement
+- File::getMethodParameters() now supports PHP 8.0 constructor property promotion
+ - Returned method params now include a "property_visibility" and "visibility_token" index if property promotion is detected
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- File::getMethodProperties() now includes a "return_type_end_token" index in the return value
+ - This indicates the last token in the return type, which is helpful when checking union types
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Include patterns are now ignored when processing STDIN
+ - Previously, checks using include patterns were excluded when processing STDIN when no file path was provided via --stdin-path
+ - Now, all include and exclude rules are ignored when no file path is provided, allowing all checks to run
+ - If you want include and exclude rules enforced when checking STDIN, use --stdin-path to set the file path
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Spaces are now correctly escaped in the paths to external on Windows
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.CodeAnalysis.UnusedFunctionParameter can now be configured to ignore variable usage for specific type hints
+ -- This allows you to suppress warnings for some variables that are not required, but leave warnings for others
+ -- Set the ignoreTypeHints array property to a list of type hints to ignore
+ -- Thanks to [Petr Bugyík][@o5] for the patch
+- Generic.Formatting.MultipleStatementAlignment can now align statements at the start of the assignment token
+ - Previously, the sniff enforced that the values were aligned, even if this meant the assignment tokens were not
+ - Now, the sniff can enforce that the assignment tokens are aligned, even if this means the values are not
+ - Set the "alignAtEnd" sniff property to "false" to align the assignment tokens
+ - The default remains at "true", so the assigned values are aligned
+ - Thanks to [John P. Bloch][@johnpbloch] for the patch
+- Generic.PHP.LowerCaseType now supports checking of typed properties
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.LowerCaseType now supports checking of union types
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PEAR.Commenting.FunctionComment and Squiz.Commenting.FunctionComment sniffs can now ignore private and protected methods
+ - Set the "minimumVisibility" sniff property to "protected" to ignore private methods
+ - Set the "minimumVisibility" sniff property to "public" to ignore both private and protected methods
+ - The default remains at "private", so all methods are checked
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- PEAR.Commenting.FunctionComment and Squiz.Commenting.FunctionComment sniffs can now ignore return tags in any method
+ - Previously, only __construct and __destruct were ignored
+ - Set the list of method names to ignore in the "specialMethods" sniff property
+ - The default remains at "__construct" and "__destruct" only
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- PSR2.ControlStructures.SwitchDeclaration now supports nested switch statements where every branch terminates
+ - Previously, if a CASE only contained a SWITCH and no direct terminating statement, a fall-through error was displayed
+ - Now, the error is surpressed if every branch of the SWITCH has a terminating statement
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- The PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket error message is now reported on the closing parenthesis token
+ - Previously, the error was being reported on the function keyword, leading to confusing line numbers in the error report
+- Squiz.Commenting.FunctionComment is now able to ignore function comments that are only inheritdoc statements
+ - Set the skipIfInheritdoc sniff property to "true" to skip checking function comments if the content is only {@inhertidoc}
+ - The default remains at "false", so these comments will continue to report errors
+ - Thanks to [Jess Myrbo][@xjm] for the patch
+- Squiz.Commenting.FunctionComment now supports the PHP 8 mixed type
+ - Thanks to [Vadim Borodavko][@javer] for the patch
+- Squiz.PHP.NonExecutableCode now has improved handling of syntax errors
+ - Thanks to [Thiemo Kreuz][@thiemowmde] for the patch
+- Squiz.WhiteSpace.ScopeKeywordSpacing now checks spacing when using PHP 8.0 constructor property promotion
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed an issue that could occur when checking files on network drives, such as with WSL2 on Windows 10
+ - This works around a long-standing PHP bug with is_readable()
+ - Thanks to [Michael S][@codebymikey] for the patch
+- Fixed a number of false positives in the Squiz.PHP.DisallowMultipleAssignments sniff
+ - Sniff no longer errors for default value assignments in arrow functions
+ - Sniff no longer errors for assignments on first line of closure
+ - Sniff no longer errors for assignments after a goto label
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #2913 : Generic.WhiteSpace.ScopeIndent false positive when opening and closing tag on same line inside conditional
+- Fixed bug #2992 : Enabling caching using a ruleset produces invalid cache files when using --sniffs and --exclude CLI args
+- Fixed bug #3003 : Squiz.Formatting.OperatorBracket autofix incorrect when assignment used with null coalescing operator
+- Fixed bug #3145 : Autoloading of sniff fails when multiple classes declared in same file
+- Fixed bug #3157 : PSR2.ControlStructures.SwitchDeclaration.BreakIndent false positive when case keyword is not indented
+- Fixed bug #3163 : Undefined index error with pre-commit hook using husky on PHP 7.4
+ - Thanks to [Ismo Vuorinen][@ivuorinen] for the patch
+- Fixed bug #3165 : Squiz.PHP.DisallowComparisonAssignment false positive when comparison inside closure
+- Fixed bug #3167 : Generic.WhiteSpace.ScopeIndent false positive when using PHP 8.0 constructor property promotion
+- Fixed bug #3170 : Squiz.WhiteSpace.OperatorSpacing false positive when using negation with string concat
+ - This also fixes the same issue in the PSR12.Operators.OperatorSpacing sniff
+- Fixed bug #3177 : Incorrect tokenization of GOTO statements in mixed PHP/HTML files
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3184 : PSR2.Namespace.NamespaceDeclaration false positive on namespace operator
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3188 : Squiz.WhiteSpace.ScopeKeywordSpacing false positive for static return type
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3192 : findStartOfStatement doesn't work correctly inside switch
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- Fixed bug #3195 : Generic.WhiteSpace.ScopeIndent confusing message when combination of tabs and spaces found
+- Fixed bug #3197 : Squiz.NamingConventions.ValidVariableName does not use correct error code for all member vars
+- Fixed bug #3219 : Generic.Formatting.MultipleStatementAlignment false positive for empty anonymous classes and closures
+- Fixed bug #3258 : Squiz.Formatting.OperatorBracket duplicate error messages for unary minus
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3273 : Squiz.Functions.FunctionDeclarationArgumentSpacing reports line break as 0 spaces between parenthesis
+- Fixed bug #3277 : Nullable static return typehint causes whitespace error
+- Fixed bug #3284 : Unused parameter false positive when using array index in arrow function
+
+## [3.5.8] - 2020-10-23
+### Removed
+- Reverted a change to the way include/exclude patterns are processed for STDIN content
+ - This change is not backwards compatible and will be re-introduced in version 3.6.0
+
+## [3.5.7] - 2020-10-23
+### Added
+- The PHP 8.0 T_NULLSAFE_OBJECT_OPERATOR token has been made available for older versions
+ - Existing sniffs that check for T_OBJECT_OPERATOR have been modified to apply the same rules for the nullsafe object operator
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The new method of PHP 8.0 tokenizing for namespaced names has been revert to thr pre 8.0 method
+ - This maintains backwards compatible for existing sniffs on PHP 8.0
+ - This change will be removed in PHPCS 4.0 as the PHP 8.0 tokenizing method will be backported for pre 8.0 versions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for changes to the way PHP 8.0 tokenizes hash comments
+ - The existing PHP 5-7 behaviour has been replicated for version 8, so no sniff changes are required
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Running the unit tests now includes warnings in the found and fixable error code counts
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PSR12.Functions.NullableTypeDeclaration now supports the PHP8 static return type
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Changed
+- The autoloader has been changed to fix sniff class name detection issues that may occur when running on PHP 7.4+
+ - Thanks to [Eloy Lafuente][@stronk7] for the patch
+- PSR12.ControlStructures.BooleanOperatorPlacement.FoundMixed error message is now more accurate when using the allowOnly setting
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+
+### Fixed
+- Fixed Squiz.Formatting.OperatorBracket false positive when exiting with a negative number
+- Fixed Squiz.PHP.DisallowComparisonAssignment false positive for methods called on an object
+- Fixed bug #2882 : Generic.Arrays.ArrayIndent can request close brace indent to be less than the statement indent level
+- Fixed bug #2883 : Generic.WhiteSpace.ScopeIndent.Incorrect issue after NOWDOC
+- Fixed bug #2975 : Undefined offset in PSR12.Functions.ReturnTypeDeclaration when checking function return type inside ternary
+- Fixed bug #2988 : Undefined offset in Squiz.Strings.ConcatenationSpacing during live coding
+ - Thanks to [Thiemo Kreuz][@thiemowmde] for the patch
+- Fixed bug #2989 : Incorrect auto-fixing in Generic.ControlStructures.InlineControlStructure during live coding
+ - Thanks to [Thiemo Kreuz][@thiemowmde] for the patch
+- Fixed bug #3007 : Directory exclude pattern improperly excludes directories with names that start the same
+ - Thanks to [Steve Talbot][@SteveTalbot] for the patch
+- Fixed bug #3043 : Squiz.WhiteSpace.OperatorSpacing false positive for negation in arrow function
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3049 : Incorrect error with arrow function and parameter passed as reference
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3053 : PSR2 incorrect fix when multiple use statements on same line do not have whitespace between them
+- Fixed bug #3058 : Progress gets unaligned when 100% happens at the end of the available dots
+- Fixed bug #3059 : Squiz.Arrays.ArrayDeclaration false positive when using type casting
+ - Thanks to [Sergei Morozov][@morozov] for the patch
+- Fixed bug #3060 : Squiz.Arrays.ArrayDeclaration false positive for static functions
+ - Thanks to [Sergei Morozov][@morozov] for the patch
+- Fixed bug #3065 : Should not fix Squiz.Arrays.ArrayDeclaration.SpaceBeforeComma if comment between element and comma
+ - Thanks to [Sergei Morozov][@morozov] for the patch
+- Fixed bug #3066 : No support for namespace operator used in type declarations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3075 : PSR12.ControlStructures.BooleanOperatorPlacement false positive when operator is the only content on line
+- Fixed bug #3099 : Squiz.WhiteSpace.OperatorSpacing false positive when exiting with negative number
+ - Thanks to [Sergei Morozov][@morozov] for the patch
+- Fixed bug #3102 : PSR12.Squiz.OperatorSpacing false positive for default values of arrow functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #3124 : PSR-12 not reporting error for empty lines with only whitespace
+- Fixed bug #3135 : Ignore annotations are broken on PHP 8.0
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.5.6] - 2020-08-10
+### Added
+- Added support for PHP 8.0 magic constant dereferencing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added support for changes to the way PHP 8.0 tokenizes comments
+ - The existing PHP 5-7 behaviour has been replicated for version 8, so no sniff changes are required
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- `File::getMethodProperties()` now detects the PHP 8.0 static return type
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The PHP 8.0 static return type is now supported for arrow functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Changed
+- The cache is no longer used if the list of loaded PHP extensions changes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- `Generic.NamingConventions.CamelCapsFunctionName` no longer reports `__serialize` and `__unserialize` as invalid names
+ - Thanks to [Filip Š][@filips123] for the patch
+- `PEAR.NamingConventions.ValidFunctionName` no longer reports `__serialize` and `__unserialize` as invalid names
+ - Thanks to [Filip Š][@filips123] for the patch
+- `Squiz.Scope.StaticThisUsage` now detects usage of `$this` inside closures and arrow functions
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+
+### Fixed
+- Fixed bug #2877 : PEAR.Functions.FunctionCallSignature false positive for array of functions
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- Fixed bug #2888 : PSR12.Files.FileHeader blank line error with multiple namespaces in one file
+- Fixed bug #2926 : phpcs hangs when using arrow functions that return heredoc
+- Fixed bug #2943 : Redundant semicolon added to a file when fixing PSR2.Files.ClosingTag.NotAllowed
+- Fixed bug #2967 : Markdown generator does not output headings correctly
+ - Thanks to [Petr Bugyík][@o5] for the patch
+- Fixed bug #2977 : File::isReference() does not detect return by reference for closures
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2994 : Generic.Formatting.DisallowMultipleStatements false positive for FOR loop with no body
+- Fixed bug #3033 : Error generated during tokenizing of goto statements on PHP 8
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.5.5] - 2020-04-17
+### Changed
+- The T_FN backfill now works more reliably so T_FN tokens only ever represent real arrow functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed an issue where including sniffs using paths containing multiple dots would silently fail
+- Generic.CodeAnalysis.EmptyPHPStatement now detects empty statements at the start of control structures
+
+### Fixed
+- Error wording in PEAR.Functions.FunctionCallSignature now always uses "parenthesis" instead of sometimes using "bracket"
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- Fixed bug #2787 : Squiz.PHP.DisallowMultipleAssignments not ignoring typed property declarations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2810 : PHPCBF fails to fix file with empty statement at start on control structure
+- Fixed bug #2812 : Squiz.Arrays.ArrayDeclaration not detecting some arrays with multiple arguments on the same line
+ - Thanks to [Jakub Chábek][@grongor] for the patch
+- Fixed bug #2826 : Generic.WhiteSpace.ArbitraryParenthesesSpacing doesn't detect issues for statements directly after a control structure
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- Fixed bug #2848 : PSR12.Files.FileHeader false positive for file with mixed PHP and HTML and no file header
+- Fixed bug #2849 : Generic.WhiteSpace.ScopeIndent false positive with arrow function inside array
+- Fixed bug #2850 : Generic.PHP.LowerCaseKeyword complains __HALT_COMPILER is uppercase
+- Fixed bug #2853 : Undefined variable error when using Info report
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2865 : Double arrow tokenized as T_STRING when placed after function named "fn"
+- Fixed bug #2867 : Incorrect scope matching when arrow function used inside IF condition
+- Fixed bug #2868 : phpcs:ignore annotation doesnt work inside a docblock
+- Fixed bug #2878 : PSR12.Files.FileHeader conflicts with Generic.Files.LineEndings
+- Fixed bug #2895 : PSR2.Methods.FunctionCallSignature.MultipleArguments false positive with arrow function argument
+
+## [3.5.4] - 2020-01-31
+### Changed
+- The PHP 7.4 numeric separator backfill now works correctly for more float formats
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The PHP 7.4 numeric separator backfill is no longer run on PHP version 7.4.0 or greater
+- File::getCondition() now accepts a 3rd argument that allows for the closest matching token to be returned
+ - By default, it continues to return the first matched token found from the top of the file
+- Fixed detection of array return types for arrow functions
+- Added Generic.PHP.DisallowRequestSuperglobal to ban the use of the $_REQUEST superglobal
+ - Thanks to [Jeantwan Teuma][@Morerice] for the contribution
+- Generic.ControlStructures.InlineControlStructure no longer shows errors for WHILE and FOR statements without a body
+ - Previously it required these to have curly braces, but there were no statements to enclose in them
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PSR12.ControlStructures.BooleanOperatorPlacement can now be configured to enforce a specific operator position
+ - By default, the sniff ensures that operators are all at the begining or end of lines, but not a mix of both
+ - Set the allowOnly property to "first" to enforce all boolean operators to be at the start of a line
+ - Set the allowOnly property to "last" to enforce all boolean operators to be at the end of a line
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- PSR12.Files.ImportStatement now auto-fixes import statements by removing the leading slash
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Squiz.ControlStructures.ForLoopDeclaration now has a setting to ignore newline characters
+ - Default remains FALSE, so newlines are not allowed within FOR definitions
+ - Override the "ignoreNewlines" setting in a ruleset.xml file to change
+- Squiz.PHP.InnerFunctions now handles multiple nested anon classes correctly
+
+### Fixed
+- Fixed bug #2497 : Sniff properties not set when referencing a sniff using relative paths or non-native slashes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2657 : Squiz.WhiteSpace.FunctionSpacing can remove spaces between comment and first/last method during auto-fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2688 : Case statements not tokenized correctly when switch is contained within ternary
+- Fixed bug #2698 : PHPCS throws errors determining auto report width when shell_exec is disabled
+ - Thanks to [Matthew Peveler][@MasterOdin] for the patch
+- Fixed bug #2730 : PSR12.ControlStructures.ControlStructureSpacing does not ignore comments between conditions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2732 : PSR12.Files.FileHeader misidentifies file header in mixed content file
+- Fixed bug #2745 : AbstractArraySniff wrong indices when mixed coalesce and ternary values
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #2748 : Wrong end of statement for fn closures
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #2751 : Autoload relative paths first to avoid confusion with files from the global include path
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Fixed bug #2763 : PSR12 standard reports errors for multi-line FOR definitions
+- Fixed bug #2768 : Generic.Files.LineLength false positive for non-breakable strings at exactly the soft limit
+ - Thanks to [Alex Miles][@ghostal] for the patch
+- Fixed bug #2773 : PSR2.Methods.FunctionCallSignature false positive when arrow function has array return type
+- Fixed bug #2790 : PSR12.Traits.UseDeclaration ignores block comments
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- Fixed bug #2791 : PSR12.Functions.NullableTypeDeclaration false positive when ternary operator used with instanceof
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2802 : Can't specify a report file path using the tilde shortcut
+- Fixed bug #2804 : PHP4-style typed properties not tokenized correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2805 : Undefined Offset notice during live coding of arrow functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2843 : Tokenizer does not support alternative syntax for declare statements
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.5.3] - 2019-12-04
+### Changed
+- The PHP 7.4 T_FN token has been made available for older versions
+ - T_FN represents the fn string used for arrow functions
+ - The double arrow becomes the scope opener, and uses a new T_FN_ARROW token type
+ - The token after the statement (normally a semicolon) becomes the scope closer
+ - The token is also associated with the opening and closing parenthesis of the statement
+ - Any functions named "fn" will cause have a T_FN token for the function name, but have no scope information
+ - Thanks to [Michał Bundyra][@michalbundyra] for the help with this change
+- PHP 7.4 numeric separators are now tokenized in the same way when using older PHP versions
+ - Previously, a number like 1_000 would tokenize as T_LNUMBER (1), T_STRING (_000)
+ - Now, the number tokenizes as T_LNUMBER (1_000)
+ - Sniff developers should consider how numbers with underscores impact their custom sniffs
+- The PHPCS file cache now takes file permissions into account
+ - The cache is now invalidated for a file when its permissions are changed
+- File::getMethodParameters() now supports arrow functions
+- File::getMethodProperties() now supports arrow functions
+- Added Fixer::changeCodeBlockIndent() to change the indent of a code block while auto-fixing
+ - Can be used to either increase or decrease the indent
+ - Useful when moving the start position of something like a closure, where you want the content to also move
+- Added Generic.Files.ExecutableFile sniff
+ - Ensures that files are not executable
+ - Thanks to [Matthew Peveler][@MasterOdin] for the contribution
+- Generic.CodeAnalysis.EmptyPhpStatement now reports unnecessary semicolons after control structure closing braces
+ - Thanks to [Vincent Langlet][@VincentLanglet] for the patch
+- Generic.PHP.LowerCaseKeyword now enforces that the "fn" keyword is lowercase
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Generic.WhiteSpace.ScopeIndent now supports static arrow functions
+- PEAR.Functions.FunctionCallSignature now adjusts the indent of function argument contents during auto-fixing
+ - Previously, only the first line of an argument was changed, leading to inconsistent indents
+ - This change also applies to PSR2.Methods.FunctionCallSignature
+- PSR2.ControlStructures.ControlStructureSpacing now checks whitespace before the closing parenthesis of multi-line control structures
+ - Previously, it incorrectly applied the whitespace check for single-line definitions only
+- PSR12.Functions.ReturnTypeDeclaration now checks the return type of arrow functions
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- PSR12.Traits.UseDeclaration now ensures all trait import statements are grouped together
+ - Previously, the trait import section of the class ended when the first non-import statement was found
+ - Checking now continues throughout the class to ensure all statements are grouped together
+ - This also ensures that empty lines are not requested after an import statement that isn't the last one
+- Squiz.Functions.LowercaseFunctionKeywords now enforces that the "fn" keyword is lowercase
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+
+### Fixed
+- Fixed bug #2586 : Generic.WhiteSpace.ScopeIndent false positives when indenting open tags at a non tab-stop
+- Fixed bug #2638 : Squiz.CSS.DuplicateClassDefinitionSniff sees comments as part of the class name
+ - Thanks to [Raphael Horber][@rhorber] for the patch
+- Fixed bug #2640 : Squiz.WhiteSpace.OperatorSpacing false positives for some negation operators
+ - Thanks to [Jakub Chábek][@grongor] and [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2674 : Squiz.Functions.FunctionDeclarationArgumentSpacing prints wrong argument name in error message
+- Fixed bug #2676 : PSR12.Files.FileHeader locks up when file ends with multiple inline comments
+- Fixed bug #2678 : PSR12.Classes.AnonClassDeclaration incorrectly enforcing that closing brace be on a line by itself
+- Fixed bug #2685 : File::getMethodParameters() setting typeHintEndToken for vars with no type hint
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2694 : AbstractArraySniff produces invalid indices when using ternary operator
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #2702 : Generic.WhiteSpace.ScopeIndent false positive when using ternary operator with short arrays
+
+## [3.5.2] - 2019-10-28
+### Changed
+- Generic.ControlStructures.DisallowYodaConditions now returns less false positives
+ - False positives were being returned for array comparisions, or when performing some function calls
+- Squiz.WhiteSpace.SemicolonSpacing.Incorrect error message now escapes newlines and tabs
+ - Provides a clearer error message as whitespace is now visible
+ - Also allows for better output for report types such as CSV and XML
+- The error message for PSR12.Files.FileHeader.SpacingAfterBlock has been made clearer
+ - It now uses the wording from the published PSR-12 standard to indicate that blocks must be separated by a blank line
+ - Thanks to [Craig Duncan][@duncan3dc] for the patch
+
+### Fixed
+- Fixed bug #2654 : Incorrect indentation for arguments of multiline function calls
+- Fixed bug #2656 : Squiz.WhiteSpace.MemberVarSpacing removes comments before first member var during auto fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2663 : Generic.NamingConventions.ConstructorName complains about old constructor in interfaces
+- Fixed bug #2664 : PSR12.Files.OpenTag incorrectly identifies PHP file with only an opening tag
+- Fixed bug #2665 : PSR12.Files.ImportStatement should not apply to traits
+- Fixed bug #2673 : PSR12.Traits.UseDeclaration does not allow comments or blank lines between use statements
+
+## [3.5.1] - 2019-10-17
+### Changed
+- Very very verbose diff report output has slightly changed to improve readability
+ - Output is printed when running PHPCS with the --report=diff and -vvv command line arguments
+ - Fully qualified class names have been replaced with sniff codes
+ - Tokens being changed now display the line number they are on
+- PSR2, PSR12, and PEAR standards now correctly check for blank lines at the start of function calls
+ - This check has been missing from these standards, but has now been implemented
+ - When using the PEAR standard, the error code is PEAR.Functions.FunctionCallSignature.FirstArgumentPosition
+ - When using PSR2 or PSR12, the error code is PSR2.Methods.FunctionCallSignature.FirstArgumentPosition
+- PSR12.ControlStructures.BooleanOperatorPlacement no longer complains when multiple expression appears on the same line
+ - Previously, boolean operators were enforce to appear at the start or end of lines only
+ - Boolean operators can now appear in the middle of the line
+- PSR12.Files.FileHeader no longer ignores comments preceding a use, namespace, or declare statement
+- PSR12.Files.FileHeader now allows a hashbang line at the top of the file
+
+### Fixed
+- Fixed bug #2506 : PSR2 standard can't auto fix multi-line function call inside a string concat statement
+- Fixed bug #2530 : PEAR.Commenting.FunctionComment does not support intersection types in comments
+- Fixed bug #2615 : Constant visibility false positive on non-class constants
+- Fixed bug #2616 : PSR12.Files.FileHeader false positive when file only contains docblock
+- Fixed bug #2619 : PSR12.Files.FileHeader locks up when inline comment is the last content in a file
+- Fixed bug #2621 : PSR12.Classes.AnonClassDeclaration.CloseBraceSameLine false positive for anon class passed as function argument
+ - Thanks to [Martins Sipenko][@martinssipenko] for the patch
+- Fixed bug #2623 : PSR12.ControlStructures.ControlStructureSpacing not ignoring indentation inside multi-line string arguments
+- Fixed bug #2624 : PSR12.Traits.UseDeclaration doesnt apply the correct indent during auto fixing
+- Fixed bug #2626 : PSR12.Files.FileHeader detects @var annotations as file docblocks
+- Fixed bug #2628 : PSR12.Traits.UseDeclaration does not allow comments above a USE declaration
+- Fixed bug #2632 : Incorrect indentation of lines starting with "static" inside closures
+- Fixed bug #2641 : PSR12.Functions.NullableTypeDeclaration false positive when using new static()
+
+## [3.5.0] - 2019-09-27
+### Changed
+- The included PSR12 standard is now complete and ready to use
+ - Check your code using PSR-12 by running PHPCS with --standard=PSR12
+- Added support for PHP 7.4 typed properties
+ - The nullable operator is now tokenized as T_NULLABLE inside property types, as it is elsewhere
+ - To get the type of a member var, use the File::getMemberProperties() method, which now contains a "type" array index
+ - This contains the type of the member var, or a blank string if not specified
+ - If the type is nullable, the return type will contain the leading ?
+ - If a type is specified, the position of the first token in the type will be set in a "type_token" array index
+ - If a type is specified, the position of the last token in the type will be set in a "type_end_token" array index
+ - If the type is nullable, a "nullable_type" array index will also be set to TRUE
+ - If the type contains namespace information, it will be cleaned of whitespace and comments in the return value
+- The PSR1 standard now correctly bans alternate PHP tags
+ - Previously, it only banned short open tags and not the pre-7.0 alternate tags
+- Added support for only checking files that have been locally staged in a git repo
+ - Use --filter=gitstaged to check these files
+ - You still need to give PHPCS a list of files or directories in which to apply the filter
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- JSON reports now end with a newline character
+- The phpcs.xsd schema now validates phpcs-only and phpcbf-only attributes correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The tokenizer now correctly identifies inline control structures in more cases
+- All helper methods inside the File class now throw RuntimeException instead of TokenizerException
+ - Some tokenizer methods were also throwing RuntimeExpection but now correctly throw TokenizerException
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The File::getMethodParameters() method now returns more information, and supports closure USE groups
+ - If a type hint is specified, the position of the last token in the hint will be set in a "type_hint_end_token" array index
+ - If a default is specified, the position of the first token in the default value will be set in a "default_token" array index
+ - If a default is specified, the position of the equals sign will be set in a "default_equal_token" array index
+ - If the param is not the last, the position of the comma will be set in a "comma_token" array index
+ - If the param is passed by reference, the position of the reference operator will be set in a "reference_token" array index
+ - If the param is variable length, the position of the variadic operator will be set in a "variadic_token" array index
+- The T_LIST token and it's opening and closing parentheses now contain references to each other in the tokens array
+ - Uses the same parenthesis_opener/closer/owner indexes as other tokens
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The T_ANON_CLASS token and it's opening and closing parentheses now contain references to each other in the tokens array
+ - Uses the same parenthesis_opener/closer/owner indexes as other tokens
+ - Only applicable if the anon class is passing arguments to the constructor
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The PHP 7.4 T_BAD_CHARACTER token has been made available for older versions
+ - Allows you to safely look for this token, but it will not appear unless checking with PHP 7.4+
+- Metrics are now available for Squiz.WhiteSpace.FunctionSpacing
+ - Use the "info" report to see blank lines before/after functions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Metrics are now available for Squiz.WhiteSpace.MemberVarSpacing
+ - Use the "info" report to see blank lines before member vars
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added Generic.ControlStructures.DisallowYodaConditions sniff
+ - Ban the use of Yoda conditions
+ - Thanks to [Mponos George][@gmponos] for the contribution
+- Added Generic.PHP.RequireStrictTypes sniff
+ - Enforce the use of a strict types declaration in PHP files
+- Added Generic.WhiteSpace.SpreadOperatorSpacingAfter sniff
+ - Checks whitespace between the spread operator and the variable/function call it applies to
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added PSR12.Classes.AnonClassDeclaration sniff
+ - Enforces the formatting of anonymous classes
+- Added PSR12.Classes.ClosingBrace sniff
+ - Enforces that closing braces of classes/interfaces/traits/functions are not followed by a comment or statement
+- Added PSR12.ControlStructures.BooleanOperatorPlacement sniff
+ - Enforces that boolean operators between conditions are consistently at the start or end of the line
+- Added PSR12.ControlStructures.ControlStructureSpacing sniff
+ - Enforces that spacing and indents are correct inside control structure parenthesis
+- Added PSR12.Files.DeclareStatement sniff
+ - Enforces the formatting of declare statements within a file
+- Added PSR12.Files.FileHeader sniff
+ - Enforces the order and formatting of file header blocks
+- Added PSR12.Files.ImportStatement sniff
+ - Enforces the formatting of import statements within a file
+- Added PSR12.Files.OpenTag sniff
+ - Enforces that the open tag is on a line by itself when used at the start of a php-only file
+- Added PSR12.Functions.ReturnTypeDeclaration sniff
+ - Enforces the formatting of return type declarations in functions and closures
+- Added PSR12.Properties.ConstantVisibility sniff
+ - Enforces that constants must have their visibility defined
+ - Uses a warning instead of an error due to this conditionally requiring the project to support PHP 7.1+
+- Added PSR12.Traits.UseDeclaration sniff
+ - Enforces the formatting of trait import statements within a class
+- Generic.Files.LineLength ignoreComments property now ignores comments at the end of a line
+ - Previously, this property was incorrectly causing the sniff to ignore any line that ended with a comment
+ - Now, the trailing comment is not included in the line length, but the rest of the line is still checked
+- Generic.Files.LineLength now only ignores unwrappable comments when the comment is on a line by itself
+ - Previously, a short unwrappable comment at the end of the line would have the sniff ignore the entire line
+- Generic.Functions.FunctionCallArgumentSpacing no longer checks spacing around assignment operators inside function calls
+ - Use the Squiz.WhiteSpace.OperatorSpacing sniff to enforce spacing around assignment operators
+ - Note that this sniff checks spacing around all assignment operators, not just inside function calls
+ - The Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals error has been removed
+ - use Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore instead
+ - The Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterEquals error has been removed
+ - use Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter instead
+ - This also changes the PEAR/PSR2/PSR12 standards so they no longer check assignment operators inside function calls
+ - They were previously checking these operators when they should not have
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.WhiteSpace.ScopeIndent no longer performs exact indents checking for chained method calls
+ - Other sniffs can be used to enforce chained method call indent rules
+ - Thanks to [Pieter Frenssen][@pfrenssen] for the patch
+- PEAR.WhiteSpace.ObjectOperatorIndent now supports multi-level chained statements
+ - When enabled, chained calls must be indented 1 level more or less than the previous line
+ - Set the new "multilevel" setting to TRUE in a ruleset.xml file to enable this behaviour
+ - Thanks to [Marcos Passos][@marcospassos] for the patch
+- PSR2.ControlStructures.ControlStructureSpacing now allows whitespace after the opening parenthesis if followed by a comment
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- PSR2.Classes.PropertyDeclaration now enforces a single space after a property type keyword
+ - The PSR2 standard itself excludes this new check as it is not defined in the written standard
+ - Using the PSR12 standard will enforce this check
+- Squiz.Commenting.BlockComment no longer requires blank line before comment if it's the first content after the PHP open tag
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Functions.FunctionDeclarationArgumentSpacing now has more accurate error messages
+ - This includes renaming the SpaceAfterDefault error code to SpaceAfterEquals, which reflects the real error
+- Squiz.Functions.FunctionDeclarationArgumentSpacing now checks for no space after a reference operator
+ - If you don't want this new behaviour, exclude the SpacingAfterReference error message in a ruleset.xml file
+- Squiz.Functions.FunctionDeclarationArgumentSpacing now checks for no space after a variadic operator
+ - If you don't want this new behaviour, exclude the SpacingAfterVariadic error message in a ruleset.xml file
+- Squiz.Functions.MultiLineFunctionDeclaration now has improved fixing for the FirstParamSpacing and UseFirstParamSpacing errors
+- Squiz.Operators.IncrementDecrementUsage now suggests pre-increment of variables instead of post-increment
+ - This change does not enforce pre-increment over post-increment; only the suggestion has changed
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.PHP.DisallowMultipleAssignments now has a second error code for when assignments are found inside control structure conditions
+ - The new error code is Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
+ - All other multiple assignment cases use the existing error code Squiz.PHP.DisallowMultipleAssignments.Found
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.FunctionSpacing now applies beforeFirst and afterLast spacing rules to nested functions
+ - Previously, these rules only applied to the first and last function in a class, interface, or trait
+ - These rules now apply to functions nested in any statement block, including other functions and conditions
+- Squiz.WhiteSpace.OperatorSpacing now has improved handling of parse errors
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.OperatorSpacing now checks spacing around the instanceof operator
+ - Thanks to [Jakub Chábek][@grongor] for the patch
+- Squiz.WhiteSpace.OperatorSpacing can now enforce a single space before assignment operators
+ - Previously, the sniff this spacing as multiple assignment operators are sometimes aligned
+ - Now, you can set the ignoreSpacingBeforeAssignments sniff property to FALSE to enable checking
+ - Default remains TRUE, so spacing before assignments is not checked by default
+ - Thanks to [Jakub Chábek][@grongor] for the patch
+
+### Fixed
+- Fixed bug #2391 : Sniff-specific ignore rules inside rulesets are filtering out too many files
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] and [Willington Vega][@wvega] for the patch
+- Fixed bug #2478 : FunctionCommentThrowTag.WrongNumber when exception is thrown once but built conditionally
+- Fixed bug #2479 : Generic.WhiteSpace.ScopeIndent error when using array destructing with exact indent checking
+- Fixed bug #2498 : Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed autofix breaks heredoc
+- Fixed bug #2502 : Generic.WhiteSpace.ScopeIndent false positives with nested switch indentation and case fall-through
+- Fixed bug #2504 : Generic.WhiteSpace.ScopeIndent false positives with nested arrays and nowdoc string
+- Fixed bug #2511 : PSR2 standard not checking if closing paren of single-line function declaration is on new line
+- Fixed bug #2512 : Squiz.PHP.NonExecutableCode does not support alternate SWITCH control structure
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2522 : Text generator throws error when code sample line is too long
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2526 : XML report format has bad syntax on Windows
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2529 : Generic.Formatting.MultipleStatementAlignment wrong error for assign in string concat
+- Fixed bug #2534 : Unresolvable installed_paths can lead to open_basedir errors
+ - Thanks to [Oliver Nowak][@ndm2] for the patch
+- Fixed bug #2541 : Text doc generator does not allow for multi-line rule explanations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2549 : Searching for a phpcs.xml file can throw warnings due to open_basedir restrictions
+ - Thanks to [Matthew Peveler][@MasterOdin] for the patch
+- Fixed bug #2558 : PHP 7.4 throwing offset syntax with curly braces is deprecated message
+ - Thanks to [Matthew Peveler][@MasterOdin] for the patch
+- Fixed bug #2561 : PHP 7.4 compatibility fix / implode argument order
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2562 : Inline WHILE triggers SpaceBeforeSemicolon incorrectly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2565 : Generic.ControlStructures.InlineControlStructure confused by mixed short/long tags
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2566 : Author tag email validation doesn't support all TLDs
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2575 : Custom error messages don't have data replaced when cache is enabled
+- Fixed bug #2601 : Squiz.WhiteSpace.FunctionSpacing incorrect fix when spacing is 0
+- Fixed bug #2608 : PSR2 throws errors for use statements when multiple namespaces are defined in a file
+
+## [3.4.2] - 2019-04-11
+### Changed
+- Squiz.Arrays.ArrayDeclaration now has improved handling of syntax errors
+
+### Fixed
+- Fixed an issue where the PCRE JIT on PHP 7.3 caused PHPCS to die when using the parallel option
+ - PHPCS now disables the PCRE JIT before running
+- Fixed bug #2368 : MySource.PHP.AjaxNullComparison throws error when first function has no doc comment
+- Fixed bug #2414 : Indention false positive in switch/case/if combination
+- Fixed bug #2423 : Squiz.Formatting.OperatorBracket.MissingBrackets error with static
+- Fixed bug #2450 : Indentation false positive when closure containing nested IF conditions used as function argument
+- Fixed bug #2452 : LowercasePHPFunctions sniff failing on "new \File()"
+- Fixed bug #2453 : Squiz.CSS.SemicolonSpacingSniff false positive when style name proceeded by an asterisk
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2464 : Fixer conflict between Generic.WhiteSpace.ScopeIndent and Squiz.WhiteSpace.ScopeClosingBrace when class indented 1 space
+- Fixed bug #2465 : Excluding a sniff by path is not working
+- Fixed bug #2467 : PHP open/close tags inside CSS files are replaced with internal PHPCS token strings when auto fixing
+
+## [3.4.1] - 2019-03-19
+### Changed
+- The PEAR installable version of PHPCS was missing some files, which have been re-included in this release
+ - The code report was not previously available for PEAR installs
+ - The Generic.Formatting.SpaceBeforeCast sniff was not previously available for PEAR installs
+ - The Generic.WhiteSpace.LanguageConstructSpacing sniff was not previously available for PEAR installs
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PHPCS will now refuse to run if any of the required PHP extensions are not loaded
+ - Previously, PHPCS only relied on requirements being checked by PEAR and Composer
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Ruleset XML parsing errors are now displayed in a readable format so they are easier to correct
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The PSR2 standard no longer throws duplicate errors for spacing around FOR loop parentheses
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- T_PHPCS_SET tokens now contain sniffCode, sniffProperty, and sniffPropertyValue indexes
+ - Sniffs can use this information instead of having to parse the token content manually
+- Added more guard code for syntax errors to various CSS sniffs
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Commenting.DocComment error messages now contain the name of the comment tag that caused the error
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.ControlStructures.InlineControlStructure now handles syntax errors correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Debug.JSHint now longer requires rhino and can be run directly from the npm install
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Files.LineEndings no longer adds superfluous new line at the end of JS and CSS files
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Formatting.DisallowMultipleStatements no longer tries fix lines containing phpcs:ignore statements
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Functions.FunctionCallArgumentSpacing now has improved performance and anonymous class support
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.WhiteSpace.ScopeIndent now respects changes to the "exact" property using phpcs:set mid-way through a file
+ - This allows you change the "exact" rule for only some parts of a file
+- Generic.WhiteSpace.ScopeIndent now disables exact indent checking inside all arrays
+ - Previously, this was only done when using long array syntax, but it now works for short array syntax as well
+- PEAR.Classes.ClassDeclaration now has improved handling of PHPCS annotations and tab indents
+- PSR12.Classes.ClassInstantiation has changed it's error code from MissingParenthesis to MissingParentheses
+- PSR12.Keywords.ShortFormTypeKeywords now ignores all spacing inside type casts during both checking and fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Classes.LowercaseClassKeywords now examines the class keyword for anonymous classes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.ControlStructures.ControlSignature now has improved handling of parse errors
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.PostStatementComment fixer no longer adds a blank line at the start of a JS file that begins with a comment
+ - Fixes a conflict between this sniff and the Squiz.WhiteSpace.SuperfluousWhitespace sniff
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.PostStatementComment now ignores comments inside control structure conditions, such as FOR loops
+ - Fixes a conflict between this sniff and the Squiz.ControlStructures.ForLoopDeclaration sniff
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.FunctionCommentThrowTag now has improved support for unknown exception types and namespaces
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.ControlStructures.ForLoopDeclaration has improved whitespace, closure, and empty expression support
+ - The SpacingAfterSecondNoThird error code has been removed as part of these fixes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.CSS.ClassDefinitionOpeningBraceSpace now handles comments and indentation correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.CSS.ClassDefinitionClosingBrace now handles comments, indentation, and multiple statements on the same line correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.CSS.Opacity now handles comments correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.CSS.SemicolonSpacing now handles comments and syntax errors correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.NamingConventions.ValidVariableName now supports variables inside anonymous classes correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.PHP.LowercasePHPFunctions now handles use statements, namespaces, and comments correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.FunctionSpacing now fixes function spacing correctly when a function is the first content in a file
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.SuperfluousWhitespace no longer throws errors for spacing between functions and properties in anon classes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Zend.Files.ClosingTag no longer adds a semi-colon during fixing of a file that only contains a comment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Zend.NamingConventions.ValidVariableName now supports variables inside anonymous classes correctly
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed bug #2298 : PSR2.Classes.ClassDeclaration allows extended class on new line
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #2337 : Generic.WhiteSpace.ScopeIndent incorrect error when multi-line function call starts on same line as open tag
+- Fixed bug #2348 : Cache not invalidated when changing a ruleset included by another
+- Fixed bug #2376 : Using __halt_compiler() breaks Generic.PHP.ForbiddenFunctions unless it's last in the function list
+ - Thanks to [Sijun Zhu][@Billz95] for the patch
+- Fixed bug #2393 : The gitmodified filter will infinitely loop when encountering deleted file paths
+ - Thanks to [Lucas Manzke][@lmanzke] for the patch
+- Fixed bug #2396 : Generic.WhiteSpace.ScopeIndent incorrect error when multi-line IF condition mixed with HTML
+- Fixed bug #2431 : Use function/const not tokenized as T_STRING when preceded by comment
+
+## [3.4.0] - 2018-12-20
+### Deprecated
+- The Generic.Formatting.NoSpaceAfterCast sniff has been deprecated and will be removed in version 4
+ - The functionality of this sniff is now available in the Generic.Formatting.SpaceAfterCast sniff
+ - Include the Generic.Formatting.SpaceAfterCast sniff and set the "spacing" property to "0"
+ - As soon as possible, replace all instances of the old sniff code with the new sniff code and property setting
+ - The existing sniff will continue to work until version 4 has been released
+
+### Changed
+- Rule include patterns in a ruleset.xml file are now evaluated as OR instead of AND
+ - Previously, a file had to match every include pattern and no exclude patterns to be included
+ - Now, a file must match at least one include pattern and no exclude patterns to be included
+ - This is a bug fix as include patterns are already documented to work this way
+- New token T_BITWISE_NOT added for the bitwise not operator
+ - This token was previously tokenized as T_NONE
+ - Any sniffs specifically looking for T_NONE tokens with a tilde as the contents must now also look for T_BITWISE_NOT
+ - Sniffs can continue looking for T_NONE as well as T_BITWISE_NOT to support older PHP_CodeSniffer versions
+- All types of binary casting are now tokenized as T_BINARY_CAST
+ - Previously, the 'b' in 'b"some string with $var"' would be a T_BINARY_CAST, but only when the string contained a var
+ - This change ensures the 'b' is always tokenized as T_BINARY_CAST
+ - This change also converts '(binary)' from T_STRING_CAST to T_BINARY_CAST
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the help with this patch
+- Array properties set inside a ruleset.xml file can now extend a previous value instead of always overwriting it
+ - e.g., if you include a ruleset that defines forbidden functions, can you now add to that list instead of having to redefine it
+ - To use this feature, add extends="true" to the property tag
+ - e.g., property name="forbiddenFunctionNames" type="array" extend="true"
+ - Thanks to [Michael Moravec][@Majkl578] for the patch
+- If $XDG_CACHE_HOME is set and points to a valid directory, it will be used for caching instead of the system temp directory
+- PHPCBF now disables parallel running if you are passing content on STDIN
+ - Stops an error from being shown after the fixed output is printed
+- The progress report now shows files with tokenizer errors as skipped (S) instead of a warning (W)
+ - The tokenizer error is still displayed in reports as normal
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The Squiz standard now ensures there is no space between an increment/decrement operator and its variable
+- The File::getMethodProperties() method now includes a has_body array index in the return value
+ - FALSE if the method has no body (as with abstract and interface methods) or TRUE otherwise
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- The File::getTokensAsString() method now throws an exception if the $start param is invalid
+ - If the $length param is invalid, an empty string will be returned
+ - Stops an infinite loop when the function is passed invalid data
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added new Generic.CodeAnalysis.EmptyPHPStatement sniff
+ - Warns when it finds empty PHP open/close tag combinations or superfluous semicolons
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added new Generic.Formatting.SpaceBeforeCast sniff
+ - Ensures there is exactly 1 space before a type cast, unless the cast statement is indented or multi-line
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added new Generic.VersionControl.GitMergeConflict sniff
+ - Detects merge conflict artifacts left in files
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added Generic.WhiteSpace.IncrementDecrementSpacing sniff
+ - Ensures there is no space between the operator and the variable it applies to
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added PSR12.Functions.NullableTypeDeclaration sniff
+ - Ensures there is no space after the question mark in a nullable type declaration
+ - Thanks to [Timo Schinkel][@timoschinkel] for the contribution
+- A number of sniffs have improved support for methods in anonymous classes
+ - These sniffs would often throw the same error twice for functions in nested classes
+ - Error messages have also been changed to be less confusing
+ - The full list of affected sniffs is:
+ - Generic.NamingConventions.CamelCapsFunctionName
+ - PEAR.NamingConventions.ValidFunctionName
+ - PSR1.Methods.CamelCapsMethodName
+ - PSR2.Methods.MethodDeclaration
+ - Squiz.Scope.MethodScope
+ - Squiz.Scope.StaticThisUsage
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.CodeAnalysis.UnusedFunctionParameter now only skips functions with empty bodies when the class implements an interface
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.CodeAnalysis.UnusedFunctionParameter now has additional error codes to indicate where unused params were found
+ - The new error code prefixes are:
+ - FoundInExtendedClass: when the class extends another
+ - FoundInImplementedInterface: when the class implements an interface
+ - Found: used in all other cases, including closures
+ - The new error code suffixes are:
+ - BeforeLastUsed: the unused param was positioned before the last used param in the function signature
+ - AfterLastUsed: the unused param was positioned after the last used param in the function signature
+ - This makes the new error code list for this sniff:
+ - Found
+ - FoundBeforeLastUsed
+ - FoundAfterLastUsed
+ - FoundInExtendedClass
+ - FoundInExtendedClassBeforeLastUsed
+ - FoundInExtendedClassAfterLastUsed
+ - FoundInImplementedInterface
+ - FoundInImplementedInterfaceBeforeLastUsed
+ - FoundInImplementedInterfaceAfterLastUsed
+ - These errors code make it easier for specific cases to be ignored or promoted using a ruleset.xml file
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Generic.Classes.DuplicateClassName now inspects traits for duplicate names as well as classes and interfaces
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- Generic.Files.InlineHTML now ignores a BOM at the start of the file
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- Generic.PHP.CharacterBeforePHPOpeningTag now ignores a BOM at the start of the file
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- Generic.Formatting.SpaceAfterCast now has a setting to specify how many spaces are required after a type cast
+ - Default remains 1
+ - Override the "spacing" setting in a ruleset.xml file to change
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Formatting.SpaceAfterCast now has a setting to ignore newline characters after a type cast
+ - Default remains FALSE, so newlines are not allowed
+ - Override the "ignoreNewlines" setting in a ruleset.xml file to change
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Formatting.SpaceAfterNot now has a setting to specify how many spaces are required after a NOT operator
+ - Default remains 1
+ - Override the "spacing" setting in a ruleset.xml file to change
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Formatting.SpaceAfterNot now has a setting to ignore newline characters after the NOT operator
+ - Default remains FALSE, so newlines are not allowed
+ - Override the "ignoreNewlines" setting in a ruleset.xml file to change
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PEAR.Functions.FunctionDeclaration now checks spacing before the opening parenthesis of functions with no body
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- PEAR.Functions.FunctionDeclaration now enforces no space before the semicolon in functions with no body
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- PSR2.Classes.PropertyDeclaration now checks the order of property modifier keywords
+ - This is a rule that is documented in PSR-2 but was not enforced by the included PSR2 standard until now
+ - This sniff is also able to fix the order of the modifier keywords if they are incorrect
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PSR2.Methods.MethodDeclaration now checks method declarations inside traits
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- Squiz.Commenting.InlineComment now has better detection of comment block boundaries
+- Squiz.Classes.ClassFileName now checks that a trait name matches the filename
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- Squiz.Classes.SelfMemberReference now supports scoped declarations and anonymous classes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Classes.SelfMemberReference now fixes multiple errors at once, increasing fixer performance
+ - Thanks to [Gabriel Ostrolucký][@ostrolucky] for the patch
+- Squiz.Functions.LowercaseFunctionKeywords now checks abstract and final prefixes, and auto-fixes errors
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Objects.ObjectMemberComma.Missing has been renamed to Squiz.Objects.ObjectMemberComma.Found
+ - The error is thrown when the comma is found but not required, so the error code was incorrect
+ - If you are referencing the old error code in a ruleset XML file, please use the new code instead
+ - If you wish to maintain backwards compatibility, you can provide rules for both the old and new codes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.ObjectOperatorSpacing is now more tolerant of parse errors
+- Squiz.WhiteSpace.ObjectOperatorSpacing now fixes errors more efficiently
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed bug #2109 : Generic.Functions.CallTimePassByReference false positive for bitwise and used in function argument
+- Fixed bug #2165 : Conflict between Squiz.Arrays.ArrayDeclaration and ScopeIndent sniffs when heredoc used in array
+- Fixed bug #2167 : Generic.WhiteSpace.ScopeIndent shows invalid error when scope opener indented inside inline HTML
+- Fixed bug #2178 : Generic.NamingConventions.ConstructorName matches methods in anon classes with same name as containing class
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2190 : PEAR.Functions.FunctionCallSignature incorrect error when encountering trailing PHPCS annotation
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2194 : Generic.Whitespace.LanguageConstructSpacing should not be checking namespace operators
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2202 : Squiz.WhiteSpace.OperatorSpacing throws error for negative index when using curly braces for string access
+ - Same issue fixed in Squiz.Formatting.OperatorBracket
+ - Thanks to [Andreas Buchenrieder][@anbuc] for the patch
+- Fixed bug #2210 : Generic.NamingConventions.CamelCapsFunctionName not ignoring SoapClient __getCookies() method
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2211 : PSR2.Methods.MethodDeclaration gets confused over comments between modifier keywords
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2212 : FUNCTION and CONST in use groups being tokenised as T_FUNCTION and T_CONST
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- Fixed bug #2214 : File::getMemberProperties() is recognizing method params as properties
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2236 : Memory info measurement unit is Mb but probably should be MB
+- Fixed bug #2246 : CSS tokenizer does not tokenize class names correctly when they contain the string NEW
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2278 : Squiz.Operators.ComparisonOperatorUsage false positive when inline IF contained in parentheses
+ - Thanks to [Arnout Boks][@aboks] for the patch
+- Fixed bug #2284 : Squiz.Functions.FunctionDeclarationArgumentSpacing removing type hint during fixing
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #2297 : Anonymous class not tokenized correctly when used as argument to another anon class
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+
+## [2.9.2] - 2018-11-08
+### Changed
+- PHPCS should now run under PHP 7.3 without deprecation warnings
+ - Thanks to [Nick Wilde][@NickDickinsonWilde] for the patch
+
+### Fixed
+- Fixed bug #1496 : Squiz.Strings.DoubleQuoteUsage not unescaping dollar sign when fixing
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #1549 : Squiz.PHP.EmbeddedPhp fixer conflict with // comment before PHP close tag
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1890 : Incorrect Squiz.WhiteSpace.ControlStructureSpacing.NoLineAfterClose error between catch and finally statements
+
+## [3.3.2] - 2018-09-24
+### Changed
+- Fixed a problem where the report cache was not being cleared when the sniffs inside a standard were updated
+- The info report (--report=info) now has improved formatting for metrics that span multiple lines
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The unit test runner now skips .bak files when looking for test cases
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The Squiz standard now ensures underscores are not used to indicate visibility of private members vars and methods
+ - Previously, this standard enforced the use of underscores
+- Generic.PHP.NoSilencedErrors error messages now contain a code snippet to show the context of the error
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Arrays.ArrayDeclaration no longer reports errors for a comma on a line new after a here/nowdoc
+ - Also stops a parse error being generated when auto-fixing
+ - The SpaceBeforeComma error message has been changed to only have one data value instead of two
+- Squiz.Commenting.FunctionComment no longer errors when trying to fix indents of multi-line param comments
+- Squiz.Formatting.OperatorBracket now correctly fixes statements that contain strings
+- Squiz.PHP.CommentedOutCode now ignores more @-style annotations and includes better comment block detection
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed a problem where referencing a relative file path in a ruleset XML file could add unnecessary sniff exclusions
+ - This didn't actually exclude anything, but caused verbose output to list strange exclusion rules
+- Fixed bug #2110 : Squiz.WhiteSpace.FunctionSpacing is removing indents from the start of functions when fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2115 : Squiz.Commenting.VariableComment not checking var types when the @var line contains a comment
+- Fixed bug #2120 : Tokenizer fails to match T_INLINE_ELSE when used after function call containing closure
+- Fixed bug #2121 : Squiz.PHP.DisallowMultipleAssignments false positive in while loop conditions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2127 : File::findExtendedClassName() doesn't support nested classes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2138 : Tokenizer detects wrong token for php ::class feature with spaces
+- Fixed bug #2143 : PSR2.Namespaces.UseDeclaration does not properly fix "use function" and "use const" statements
+ - Thanks to [Chris Wilkinson][@thewilkybarkid] for the patch
+- Fixed bug #2144 : Squiz.Arrays.ArrayDeclaration does incorrect align calculation in array with cyrillic keys
+- Fixed bug #2146 : Zend.Files.ClosingTag removes closing tag from end of file without inserting a semicolon
+- Fixed bug #2151 : XML schema not updated with the new array property syntax
+
+## [3.3.1] - 2018-07-27
+### Removed
+- Support for HHVM has been dropped due to recent unfixed bugs and HHVM refocus on Hack only
+ - Thanks to [Walt Sorensen][@photodude] and [Juliette Reinders Folmer][@jrfnl] for helping to remove all HHVM exceptions from the core
+
+### Changed
+- The full report (the default report) now has improved word wrapping for multi-line messages and sniff codes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The summary report now sorts files based on their directory location instead of just a basic string sort
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The source report now orders error codes by name when they have the same number of errors
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The junit report no longer generates validation errors with the Jenkins xUnit plugin
+ - Thanks to [Nikolay Geo][@nicholascus] for the patch
+- Generic.Commenting.DocComment no longer generates the SpacingBeforeTags error if tags are the first content in the docblock
+ - The sniff will still generate a MissingShort error if there is no short comment
+ - This allows the MissingShort error to be suppressed in a ruleset to make short descriptions optional
+- Generic.Functions.FunctionCallArgumentSpacing now properly fixes multi-line function calls with leading commas
+ - Previously, newlines between function arguments would be removed
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.Syntax will now use PHP_BINARY instead of trying to discover the executable path
+ - This ensures that the sniff will always syntax check files using the PHP version that PHPCS is running under
+ - Setting the php_path config var will still override this value as normal
+ - Thanks to [Willem Stuursma-Ruwen][@willemstuursma] for the patch
+- PSR2.Namespaces.UseDeclaration now supports commas at the end of group use declarations
+ - Also improves checking and fixing for use statements containing parse errors
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Arrays.ArrayDeclaration no longer removes the array opening brace while fixing
+ - This could occur when the opening brace was on a new line and the first array key directly followed
+ - This change also stops the KeyNotAligned error message being incorrectly reported in these cases
+- Squiz.Arrays.ArrayDeclaration no longer tries to change multi-line arrays to single line when they contain comments
+ - Fixes a conflict between this sniff and some indentation sniffs
+- Squiz.Classes.ClassDeclaration no longer enforces spacing rules when a class is followed by a function
+ - Fixes a conflict between this sniff and the Squiz.WhiteSpace.FunctionSpacing sniff
+- The Squiz.Classes.ValidClassName.NotCamelCaps message now references PascalCase instead of CamelCase
+ - The "CamelCase class name" metric produced by the sniff has been changed to "PascalCase class name"
+ - This reflects the fact that the class name check is actually a Pascal Case check and not really Camel Case
+ - Thanks to [Tom H Anderson][@TomHAnderson] for the patch
+- Squiz.Commenting.InlineComment no longer enforces spacing rules when an inline comment is followed by a docblock
+ - Fixes a conflict between this sniff and the Squiz.WhiteSpace.FunctionSpacing sniff
+- Squiz.WhiteSpace.OperatorSpacing no longer tries to fix operator spacing if the next content is a comment on a new line
+ - Fixes a conflict between this sniff and the Squiz.Commenting.PostStatementComment sniff
+ - Also stops PHPCS annotations from being moved to a different line, potentially changing their meaning
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.FunctionSpacing no longer checks spacing of functions at the top of an embedded PHP block
+ - Fixes a conflict between this sniff and the Squiz.PHP.EmbeddedPHP sniff
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.MemberVarSpacing no longer checks spacing before member vars that come directly after methods
+ - Fixes a conflict between this sniff and the Squiz.WhiteSpace.FunctionSpacing sniff
+- Squiz.WhiteSpace.SuperfluousWhitespace now recognizes unicode whitespace at the start and end of a file
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed bug #2029 : Squiz.Scope.MemberVarScope throws fatal error when a property is found in an interface
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2047 : PSR12.Classes.ClassInstantiation false positive when instantiating class from array index
+- Fixed bug #2048 : GenericFormatting.MultipleStatementAlignment false positive when assigning values inside an array
+- Fixed bug #2053 : PSR12.Classes.ClassInstantiation incorrectly fix when using member vars and some variable formats
+- Fixed bug #2065 : Generic.ControlStructures.InlineControlStructure fixing fails when inline control structure contains closure
+- Fixed bug #2072 : Squiz.Arrays.ArrayDeclaration throws NoComma error when array value is a shorthand IF statement
+- Fixed bug #2082 : File with "defined() or define()" syntax triggers PSR1.Files.SideEffects.FoundWithSymbols
+- Fixed bug #2095 : PSR2.Namespaces.NamespaceDeclaration does not handle namespaces defined over multiple lines
+
+## [3.3.0] - 2018-06-07
+### Deprecated
+- The Squiz.WhiteSpace.LanguageConstructSpacing sniff has been deprecated and will be removed in version 4
+ - The sniff has been moved to the Generic standard, with a new code of Generic.WhiteSpace.LanguageConstructSpacing
+ - As soon as possible, replace all instances of the old sniff code with the new sniff code in your ruleset.xml files
+ - The existing Squiz sniff will continue to work until version 4 has been released
+ - The new Generic sniff now also checks many more language constructs to enforce additional spacing rules
+ - Thanks to [Mponos George][@gmponos] for the contribution
+- The current method for setting array properties in ruleset files has been deprecated and will be removed in version 4
+ - Currently, setting an array value uses the string syntax "print=>echo,create_function=>null"
+ - Now, individual array elements are specified using a new "element" tag with "key" and "value" attributes
+ - For example, element key="print" value="echo"
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- The T_ARRAY_HINT token has been deprecated and will be removed in version 4
+ - The token was used to ensure array type hints were not tokenized as T_ARRAY, but no other type hints were given a special token
+ - Array type hints now use the standard T_STRING token instead
+ - Sniffs referencing this token type will continue to run without error until version 4, but will not find any T_ARRAY_HINT tokens
+- The T_RETURN_TYPE token has been deprecated and will be removed in version 4
+ - The token was used to ensure array/self/parent/callable return types were tokenized consistently
+ - For namespaced return types, only the last part of the string (the class name) was tokenized as T_RETURN_TYPE
+ - This was not consistent and so return types are now left using their original token types so they are not skipped by sniffs
+ - The exception are array return types, which are tokenized as T_STRING instead of T_ARRAY, as they are for type hints
+ - Sniffs referencing this token type will continue to run without error until version 4, but will not find any T_RETUTN_TYPE tokens
+ - To get the return type of a function, use the File::getMethodProperties() method, which now contains a "return_type" array index
+ - This contains the return type of the function or closer, or a blank string if not specified
+ - If the return type is nullable, the return type will contain the leading ?
+ - A nullable_return_type array index in the return value will also be set to true
+ - If the return type contains namespace information, it will be cleaned of whitespace and comments
+ - To access the original return value string, use the main tokens array
+
+### Added
+- This release contains an incomplete version of the PSR-12 coding standard
+ - Errors found using this standard should be valid, but it will miss a lot of violations until it is complete
+ - If you'd like to test and help, you can use the standard by running PHPCS with --standard=PSR12
+
+### Changed
+- Config values set using --runtime-set now override any config values set in rulesets or the CodeSniffer.conf file
+- You can now apply include-pattern rules to individual message codes in a ruleset like you can with exclude-pattern rules
+ - Previously, include-pattern rules only applied to entire sniffs
+ - If a message code has both include and exclude patterns, the exclude patterns will be ignored
+- Using PHPCS annotations to selectively re-enable sniffs is now more flexible
+ - Previously, you could only re-enable a sniff/category/standard using the exact same code that was disabled
+ - Now, you can disable a standard and only re-enable a specific category or sniff
+ - Or, you can disable a specific sniff and have it re-enable when you re-enable the category or standard
+- The value of array sniff properties can now be set using phpcs:set annotations
+ - e.g., phpcs:set Standard.Category.SniffName property[] key=>value,key2=>value2
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- PHPCS annotations now remain as T_PHPCS_* tokens instead of reverting to comment tokens when --ignore-annotations is used
+ - This stops sniffs (especially commenting sniffs) from generating a large number of false errors when ignoring
+ - Any custom sniffs that are using the T_PHPCS_* tokens to detect annotations may need to be changed to ignore them
+ - Check $phpcsFile->config->annotations to see if annotations are enabled and ignore when false
+- You can now use fully or partially qualified class names for custom reports instead of absolute file paths
+ - To support this, you must specify an autoload file in your ruleset.xml file and use it to register an autoloader
+ - Your autoloader will need to load your custom report class when requested
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The JSON report format now does escaping in error source codes as well as error messages
+ - Thanks to [Martin Vasel][@marvasDE] for the patch
+- Invalid installed_paths values are now ignored instead of causing a fatal error
+- Improved testability of custom rulesets by allowing the installed standards to be overridden
+ - Thanks to [Timo Schinkel][@timoschinkel] for the patch
+- The key used for caching PHPCS runs now includes all set config values
+ - This fixes a problem where changing config values (e.g., via --runtime-set) used an incorrect cache file
+- The "Function opening brace placement" metric has been separated into function and closure metrics in the info report
+ - Closures are no longer included in the "Function opening brace placement" metric
+ - A new "Closure opening brace placement" metric now shows information for closures
+- Multi-line T_YIELD_FROM statements are now replicated properly for older PHP versions
+- The PSR2 standard no longer produces 2 error messages when the AS keyword in a foreach loop is not lowercase
+- Specifying a path to a non-existent dir when using the --report-[reportType]=/path/to/report CLI option no longer throws an exception
+ - This now prints a readable error message, as it does when using --report-file
+- The File::getMethodParamaters() method now includes a type_hint_token array index in the return value
+ - Provides the position in the token stack of the first token in the type hint
+- The File::getMethodProperties() method now includes a return_type_token array index in the return value
+ - Provides the position in the token stack of the first token in the return type
+- The File::getTokensAsString() method can now optionally return original (non tab-replaced) content
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Removed Squiz.PHP.DisallowObEndFlush from the Squiz standard
+ - If you use this sniff and want to continue banning ob_end_flush(), use Generic.PHP.ForbiddenFunctions instead
+ - You will need to set the forbiddenFunctions property in your ruleset.xml file
+- Removed Squiz.PHP.ForbiddenFunctions from the Squiz standard
+ - Replaced by using the forbiddenFunctions property of Generic.PHP.ForbiddenFunctions in the Squiz ruleset.xml
+ - Functionality of the Squiz standard remains the same, but the error codes are now different
+ - Previously, Squiz.PHP.ForbiddenFunctions.Found and Squiz.PHP.ForbiddenFunctions.FoundWithAlternative
+ - Now, Generic.PHP.ForbiddenFunctions.Found and Generic.PHP.ForbiddenFunctions.FoundWithAlternative
+- Added new Generic.PHP.LowerCaseType sniff
+ - Ensures PHP types used for type hints, return types, and type casting are lowercase
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added new Generic.WhiteSpace.ArbitraryParenthesesSpacing sniff
+ - Generates an error for whitespace inside parenthesis that don't belong to a function call/declaration or control structure
+ - Generates a warning for any empty parenthesis found
+ - Allows the required spacing to be set using the spacing sniff property (default is 0)
+ - Allows newlines to be used by setting the ignoreNewlines sniff property (default is false)
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added new PSR12.Classes.ClassInstantiation sniff
+ - Ensures parenthesis are used when instantiating a new class
+- Added new PSR12.Keywords.ShortFormTypeKeywords sniff
+ - Ensures the short form of PHP types is used when type casting
+- Added new PSR12.Namespaces.CompundNamespaceDepth sniff
+ - Ensures compound namespace use statements have a max depth of 2 levels
+ - The max depth can be changed by setting the 'maxDepth' sniff property in a ruleset.xml file
+- Added new PSR12.Operators.OperatorSpacing sniff
+ - Ensures operators are preceded and followed by at least 1 space
+- Improved core support for grouped property declarations
+ - Also improves support in Squiz.WhiteSpace.ScopeKeywordSpacing and Squiz.WhiteSpace.MemberVarSpacing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Commenting.DocComment now produces a NonParamGroup error when tags are mixed in with the @param tag group
+ - It would previously throw either a NonParamGroup or ParamGroup error depending on the order of tags
+ - This change allows the NonParamGroup error to be suppressed in a ruleset to allow the @param group to contain other tags
+ - Thanks to [Phil Davis][@phil-davis] for the patch
+- Generic.Commenting.DocComment now continues checks param tags even if the doc comment short description is missing
+ - This change allows the MissingShort error to be suppressed in a ruleset without all other errors being suppressed as well
+ - Thanks to [Phil Davis][@phil-davis] for the patch
+- Generic.CodeAnalysis.AssignmentInCondition now reports a different error code for assignments found in WHILE conditions
+ - The return value of a function call is often assigned in a WHILE condition, so this change makes it easier to exclude these cases
+ - The new code for this error message is Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
+ - The error code for all other cases remains as Generic.CodeAnalysis.AssignmentInCondition.Found
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Functions.OpeningFunctionBraceBsdAllman now longer leaves trailing whitespace when moving the opening brace during fixing
+ - Also applies to fixes made by PEAR.Functions.FunctionDeclaration and Squiz.Functions.MultiLineFunctionDeclaration
+- Generic.WhiteSpace.ScopeIndent now does a better job of fixing the indent of multi-line comments
+- Generic.WhiteSpace.ScopeIndent now does a better job of fixing the indent of PHP open and close tags
+- PEAR.Commenting.FunctionComment now report a different error code for param comment lines with too much padding
+ - Previously, any lines of a param comment that don't start at the exact comment position got the same error code
+ - Now, only comment lines with too little padding use ParamCommentAlignment as they are clearly mistakes
+ - Comment lines with too much padding may be using precision alignment as now use ParamCommentAlignmentExceeded
+ - This allows for excessive padding to be excluded from a ruleset while continuing to enforce a minimum padding
+- PEAR.WhiteSpace.ObjectOperatorIndent now checks the indent of more chained operators
+ - Previously, it only checked chains beginning with a variable
+ - Now, it checks chains beginning with function calls, static class names, etc
+- Squiz.Arrays.ArrayDeclaration now continues checking array formatting even if the key indent is not correct
+ - Allows for using different array indent rules while still checking/fixing double arrow and value alignment
+- Squiz.Commenting.BlockComment has improved support for tab-indented comments
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.BlockComment auto fixing no longer breaks when two block comments follow each other
+ - Also stopped single-line block comments from being auto fixed when they are embedded in other code
+ - Also fixed as issue found when PHPCS annotations were used inside a block comment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.BlockComment.LastLineIndent is now able to be fixed with phpcbf
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.BlockComment now aligns star-prefixed lines under the opening tag while fixing, instead of indenting them
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.FunctionComment.IncorrectTypeHint message no longer contains cut-off suggested type hints
+- Squiz.Commenting.InlineComment now uses a new error code for inline comments at the end of a function
+ - Previously, all inline comments followed by a blank line threw a Squiz.Commenting.InlineComment.SpacingAfter error
+ - Now, inline comments at the end of a function will instead throw Squiz.Commenting.InlineComment.SpacingAfterAtFunctionEnd
+ - If you previously excluded SpacingAfter, add an exclusion for SpacingAfterAtFunctionEnd to your ruleset as well
+ - If you previously only included SpacingAfter, consider including SpacingAfterAtFunctionEnd as well
+ - The Squiz standard now excludes SpacingAfterAtFunctionEnd as the blank line is checked elsewhere
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.ControlStructures.ControlSignature now errors when a comment follows the closing brace of an earlier body
+ - Applies to catch, finally, else, elseif, and do/while structures
+ - The included PSR2 standard now enforces this rule
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Formatting.OperatorBracket.MissingBrackets message has been changed to remove the word "arithmetic"
+ - The sniff checks more than just arithmetic operators, so the message is now clearer
+- Sniffs.Operators.ComparisonOperatorUsage now detects more cases of implicit true comparisons
+ - It could previously be confused by comparisons used as function arguments
+- Squiz.PHP.CommentedOutCode now ignores simple @-style annotation comments so they are not flagged as commented out code
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.PHP.CommentedOutCode now ignores a greater number of short comments so they are not flagged as commented out code
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.PHP.DisallowComparisonAssignment no longer errors when using the null coalescing operator
+ - Given this operator is used almost exclusively to assign values, it didn't make sense to generate an error
+- Squiz.WhiteSpacing.FunctionSpacing now has a property to specify how many blank lines should be before the first class method
+ - Only applies when a method is the first code block in a class (i.e., there are no member vars before it)
+ - Override the 'spacingBeforeFirst' property in a ruleset.xml file to change
+ - If not set, the sniff will use whatever value is set for the existing 'spacing' property
+- Squiz.WhiteSpacing.FunctionSpacing now has a property to specify how many blank lines should be after the last class method
+ - Only applies when a method is the last code block in a class (i.e., there are no member vars after it)
+ - Override the 'spacingAfterLast' property in a ruleset.xml file to change
+ - If not set, the sniff will use whatever value is set for the existing 'spacing' property
+
+### Fixed
+- Fixed bug #1863 : File::findEndOfStatement() not working when passed a scope opener
+- Fixed bug #1876 : PSR2.Namespaces.UseDeclaration not giving error for use statements before the namespace declaration
+ - Adds a new PSR2.Namespaces.UseDeclaration.UseBeforeNamespace error message
+- Fixed bug #1881 : Generic.Arrays.ArrayIndent is indenting sub-arrays incorrectly when comma not used after the last value
+- Fixed bug #1882 : Conditional with missing braces confused by indirect variables
+- Fixed bug #1915 : JS tokenizer fails to tokenize regular expression proceeded by boolean not operator
+- Fixed bug #1920 : Directory exclude pattern improperly excludes files with names that start the same
+ - Thanks to [Jeff Puckett][@jpuck] for the patch
+- Fixed bug #1922 : Equal sign alignment check broken when list syntax used before assignment operator
+- Fixed bug #1925 : Generic.Formatting.MultipleStatementAlignment skipping assignments within closures
+- Fixed bug #1931 : Generic opening brace placement sniffs do not correctly support function return types
+- Fixed bug #1932 : Generic.ControlStructures.InlineControlStructure fixer moves new PHPCS annotations
+- Fixed bug #1938 : Generic opening brace placement sniffs incorrectly move PHPCS annotations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1939 : phpcs:set annotations do not cause the line they are on to be ignored
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1949 : Squiz.PHP.DisallowMultipleAssignments false positive when using namespaces with static assignments
+- Fixed bug #1959 : SquizMultiLineFunctionDeclaration error when param has trailing comment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1963 : Squiz.Scope.MemberVarScope does not work for multiline member declaration
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1971 : Short array list syntax not correctly tokenized if short array is the first content in a file
+- Fixed bug #1979 : Tokenizer does not change heredoc to nowdoc token if the start tag contains spaces
+- Fixed bug #1982 : Squiz.Arrays.ArrayDeclaration fixer sometimes puts a comma in front of the last array value
+- Fixed bug #1993 : PSR1/PSR2 not reporting or fixing short open tags
+- Fixed bug #1996 : Custom report paths don't work on case-sensitive filesystems
+- Fixed bug #2006 : Squiz.Functions.FunctionDeclarationArgumentSpacing fixer removes comment between parens when no args
+ - The SpacingAfterOpenHint error message has been removed
+ - It is replaced by the the existing SpacingAfterOpen message
+ - The error message format for the SpacingAfterOpen and SpacingBeforeClose messages has been changed
+ - These used to contain 3 pieces of data, but now only contain 2
+ - If you have customised the error messages of this sniff, please review your ruleset after upgrading
+- Fixed bug #2018 : Generic.Formatting.MultipleStatementAlignment does see PHP close tag as end of statement block
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #2027 : PEAR.NamingConventions.ValidFunctionName error when function name includes double underscore
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.2.3] - 2018-02-21
+### Changed
+- The new phpcs: comment syntax can now be prefixed with an at symbol ( @phpcs: )
+ - This restores the behaviour of the previous syntax where these comments are ignored by doc generators
+- The current PHP version ID is now used to generate cache files
+ - This ensures that only cache files generated by the current PHP version are selected
+ - This change fixes caching issues when using sniffs that produce errors based on the current PHP version
+- A new Tokens::$phpcsCommentTokens array is now available for sniff developers to detect phpcs: comment syntax
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The PEAR.Commenting.FunctionComment.Missing error message now includes the name of the function
+ - Thanks to [Yorman Arias][@cixtor] for the patch
+- The PEAR.Commenting.ClassComment.Missing and Squiz.Commenting.ClassComment.Missing error messages now include the name of the class
+ - Thanks to [Yorman Arias][@cixtor] for the patch
+- PEAR.Functions.FunctionCallSignature now only forces alignment at a specific tab stop while fixing
+ - It was enforcing this during checking, but this meant invalid errors if the OpeningIndent message was being muted
+ - This fixes incorrect errors when using the PSR2 standard with some code blocks
+- Generic.Files.LineLength now ignores lines that only contain phpcs: annotation comments
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Formatting.MultipleStatementAlignment now skips over arrays containing comments
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.Syntax now forces display_errors to ON when linting
+ - Thanks to [Raúl Arellano][@raul338] for the patch
+- PSR2.Namespaces.UseDeclaration has improved syntax error handling and closure detection
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.PHP.CommentedOutCode now has improved comment block detection for improved accuracy
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.PHP.NonExecutableCode could fatal error while fixing file with syntax error
+- Squiz.PHP.NonExecutableCode now detects unreachable code after a goto statement
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.LanguageConstructSpacing has improved syntax error handling while fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Improved phpcs: annotation syntax handling for a number of sniffs
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Improved auto-fixing of files with incomplete comment blocks for various commenting sniffs
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed test suite compatibility with PHPUnit 7
+- Fixed bug #1793 : PSR2 forcing exact indent for function call opening statements
+- Fixed bug #1803 : Squiz.WhiteSpace.ScopeKeywordSpacing removes member var name while fixing if no space after scope keyword
+- Fixed bug #1817 : Blank line not enforced after control structure if comment on same line as closing brace
+- Fixed bug #1827 : A phpcs:enable comment is not tokenized correctly if it is outside a phpcs:disable block
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1828 : Squiz.WhiteSpace.SuperfluousWhiteSpace ignoreBlankLines property ignores whitespace after single line comments
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1840 : When a comment has too many asterisks, phpcbf gives FAILED TO FIX error
+- Fixed bug #1867 : Cant use phpcs:ignore where the next line is HTML
+- Fixed bug #1870 : Invalid warning in multiple assignments alignment with closure or anon class
+- Fixed bug #1890 : Incorrect Squiz.WhiteSpace.ControlStructureSpacing.NoLineAfterClose error between catch and finally statements
+- Fixed bug #1891 : Comment on last USE statement causes false positive for PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse
+ - Thanks to [Matt Coleman][@iammattcoleman], [Daniel Hensby][@dhensby], and [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1901 : Fixed PHPCS annotations in multi-line tab-indented comments + not ignoring whole line for phpcs:set
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.2.2] - 2017-12-20
+### Changed
+- Disabled STDIN detection on Windows
+ - This fixes a problem with IDE plugins (e.g., PHPStorm) hanging on Windows
+
+## [3.2.1] - 2017-12-18
+### Changed
+- Empty diffs are no longer followed by a newline character (request #1781)
+- Generic.Functions.OpeningFunctionBraceKernighanRitchie no longer complains when the open brace is followed by a close tag
+ - This makes the sniff more useful when used in templates
+ - Thanks to [Joseph Zidell][@josephzidell] for the patch
+
+### Fixed
+- Fixed problems with some scripts and plugins waiting for STDIN
+ - This was a notable problem with IDE plugins (e.g., PHPStorm) and build systems
+- Fixed bug #1782 : Incorrect detection of operator in ternary + anonymous function
+
+## [3.2.0] - 2017-12-13
+### Deprecated
+- This release deprecates the @codingStandards comment syntax used for sending commands to PHP_CodeSniffer
+ - The existing syntax will continue to work in all version 3 releases, but will be removed in version 4
+ - The comment formats have been replaced by a shorter syntax:
+ - @codingStandardsIgnoreFile becomes phpcs:ignoreFile
+ - @codingStandardsIgnoreStart becomes phpcs:disable
+ - @codingStandardsIgnoreEnd becomes phpcs:enable
+ - @codingStandardsIgnoreLine becomes phpcs:ignore
+ - @codingStandardsChangeSetting becomes phpcs:set
+ - The new syntax allows for additional developer comments to be added after a -- separator
+ - This is useful for describing why a code block is being ignored, or why a setting is being changed
+ - E.g., phpcs:disable -- This code block must be left as-is.
+ - Comments using the new syntax are assigned new comment token types to allow them to be detected:
+ - phpcs:ignoreFile has the token T_PHPCS_IGNORE_FILE
+ - phpcs:disable has the token T_PHPCS_DISABLE
+ - phpcs:enable has the token T_PHPCS_ENABLE
+ - phpcs:ignore has the token T_PHPCS_IGNORE
+ - phpcs:set has the token T_PHPCS_SET
+
+### Changed
+- The phpcs:disable and phpcs:ignore comments can now selectively ignore specific sniffs (request #604)
+ - E.g., phpcs:disable Generic.Commenting.Todo.Found for a specific message
+ - E.g., phpcs:disable Generic.Commenting.Todo for a whole sniff
+ - E.g., phpcs:disable Generic.Commenting for a whole category of sniffs
+ - E.g., phpcs:disable Generic for a whole standard
+ - Multiple sniff codes can be specified by comma separating them
+ - E.g., phpcs:disable Generic.Commenting.Todo,PSR1.Files
+- @codingStandardsIgnoreLine comments now only ignore the following line if they are on a line by themselves
+ - If they are at the end of an existing line, they will only ignore the line they are on
+ - Stops some lines from accidentally being ignored
+ - Same rule applies for the new phpcs:ignore comment syntax
+- PSR1.Files.SideEffects now respects the new phpcs:disable comment syntax
+ - The sniff will no longer check any code that is between phpcs:disable and phpcs:enable comments
+ - The sniff does not support phpcs:ignore; you must wrap code structures with disable/enable comments
+ - Previously, there was no way to have this sniff ignore parts of a file
+- Fixed a problem where PHPCS would sometimes hang waiting for STDIN, or read incomplete versions of large files
+ - Thanks to [Arne Jørgensen][@arnested] for the patch
+- Array properties specified in ruleset files now have their keys and values trimmed
+ - This saves having to do this in individual sniffs and stops errors introduced by whitespace in rulesets
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added phpcs.xsd to allow validation of ruleset XML files
+ - Thanks to [Renaat De Muynck][@renaatdemuynck] for the contribution
+- File paths specified using --stdin-path can now point to fake file locations (request #1488)
+ - Previously, STDIN files using fake file paths were excluded from checking
+- Setting an empty basepath (--basepath=) on the CLI will now clear a basepath set directly in a ruleset
+ - Thanks to [Xaver Loppenstedt][@xalopp] for the patch
+- Ignore patterns are now checked on symlink target paths instead of symlink source paths
+ - Restores previous behaviour of this feature
+- Metrics were being double counted when multiple sniffs were recording the same metric
+- Added support for bash process substitution
+ - Thanks to [Scott Dutton][@exussum12] for the contribution
+- Files included in the cache file code hash are now sorted to aid in cache file reuse across servers
+- Windows BAT files can now be used outside a PEAR install
+ - You must have the path to PHP set in your PATH environment variable
+ - Thanks to [Joris Debonnet][@JorisDebonnet] for the patch
+- The JS unsigned right shift assignment operator is now properly classified as an assignment operator
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The AbstractVariableSniff abstract sniff now supports anonymous classes and nested functions
+ - Also fixes an issue with Squiz.Scope.MemberVarScope where member vars of anonymous classes were not being checked
+- Added AbstractArraySniff to make it easier to create sniffs that check array formatting
+ - Allows for checking of single and multi line arrays easily
+ - Provides a parsed structure of the array including positions of keys, values, and double arrows
+- Added Generic.Arrays.ArrayIndent to enforce a single tab stop indent for array keys in multi-line arrays
+ - Also ensures the close brace is on a new line and indented to the same level as the original statement
+ - Allows for the indent size to be set using an "indent" property of the sniff
+- Added Generic.PHP.DiscourageGoto to warn about the use of the GOTO language construct
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Generic.Debug.ClosureLinter was not running the gjslint command
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Generic.WhiteSpace.DisallowSpaceIndent now fixes space indents in multi-line block comments
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.WhiteSpace.DisallowSpaceIndent now fixes mixed space/tab indents more accurately
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.WhiteSpace.DisallowTabIndent now fixes tab indents in multi-line block comments
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PEAR.Functions.FunctionDeclaration no longer errors when a function declaration is the first content in a JS file
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PEAR.Functions.FunctionCallSignature now requires the function name to be indented to an exact tab stop
+ - If the function name is not the start of the statement, the opening statement must be indented correctly instead
+ - Added a new fixable error code PEAR.Functions.FunctionCallSignature.OpeningIndent for this error
+- Squiz.Functions.FunctionDeclarationArgumentSpacing is no longer confused about comments in function declarations
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.PHP.NonExecutableCode error messages now indicate which line the code block ending is on
+ - Makes it easier to identify where the code block exited or returned
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.FunctionComment now supports nullable type hints
+- Squiz.Commenting.FunctionCommentThrowTag no longer assigns throw tags inside anon classes to the enclosing function
+- Squiz.WhiteSpace.SemicolonSpacing now ignores semicolons used for empty statements inside FOR conditions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.ControlStructures.ControlSignature now allows configuring the number of spaces before the colon in alternative syntax
+ - Override the 'requiredSpacesBeforeColon' setting in a ruleset.xml file to change
+ - Default remains at 1
+ - Thanks to [Nikola Kovacs][@nkovacs] for the patch
+- The Squiz standard now ensures array keys are indented 4 spaces from the main statement
+ - Previously, this standard aligned keys 1 space from the start of the array keyword
+- The Squiz standard now ensures array end braces are aligned with the main statement
+ - Previously, this standard aligned the close brace with the start of the array keyword
+- The standard for PHP_CodeSniffer itself now enforces short array syntax
+- The standard for PHP_CodeSniffer itself now uses the Generic.Arrays/ArrayIndent sniff rules
+- Improved fixer conflicts and syntax error handling for a number of sniffs
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed bug #1462 : Error processing cyrillic strings in Tokenizer
+- Fixed bug #1573 : Squiz.WhiteSpace.LanguageConstructSpacing does not properly check for tabs and newlines
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #1590 : InlineControlStructure CBF issue while adding braces to an if thats returning a nested function
+- Fixed bug #1718 : Unclosed strings at EOF sometimes tokenized as T_WHITESPACE by the JS tokenizer
+- Fixed bug #1731 : Directory exclusions do not work as expected when a single file name is passed to phpcs
+- Fixed bug #1737 : Squiz.CSS.EmptyStyleDefinition sees comment as style definition and fails to report error
+- Fixed bug #1746 : Very large reports can sometimes become garbled when using the parallel option
+- Fixed bug #1747 : Squiz.Scope.StaticThisUsage incorrectly looking inside closures
+- Fixed bug #1757 : Unknown type hint "object" in Squiz.Commenting.FunctionComment
+- Fixed bug #1758 : PHPCS gets stuck creating file list when processing circular symlinks
+- Fixed bug #1761 : Generic.WhiteSpace.ScopeIndent error on multi-line function call with static closure argument
+- Fixed bug #1762 : Generic.WhiteSpace.Disallow[Space/Tab]Indent not inspecting content before open tag
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1769 : Custom "define" function triggers a warning about declaring new symbols
+- Fixed bug #1776 : Squiz.Scope.StaticThisUsage incorrectly looking inside anon classes
+- Fixed bug #1777 : Generic.WhiteSpace.ScopeIndent incorrect indent errors when self called function proceeded by comment
+
+## [3.1.1] - 2017-10-17
+### Changed
+- Restored preference of non-dist files over dist files for phpcs.xml and phpcs.xml.dist
+ - The order that the files are searched is now: .phpcs.xml, phpcs.xml, .phpcs.xml.dist, phpcs.xml.dist
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Progress output now correctly shows skipped files
+- Progress output now shows 100% when the file list has finished processing (request #1697)
+- Stopped some IDEs complaining about testing class aliases
+ - Thanks to [Vytautas Stankus][@svycka] for the patch
+- Squiz.Commenting.InlineComment incorrectly identified comment blocks in some cases, muting some errors
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+### Fixed
+- Fixed bug #1512 : PEAR.Functions.FunctionCallSignature enforces spaces when no arguments if required spaces is not 0
+- Fixed bug #1522 : Squiz Arrays.ArrayDeclaration and Strings.ConcatenationSpacing fixers causing parse errors with here/ nowdocs
+- Fixed bug #1570 : Squiz.Arrays.ArrayDeclaration fixer removes comments between array keyword and open parentheses
+- Fixed bug #1604 : File::isReference has problems with some bitwise operators and class property references
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1645 : Squiz.Commenting.InlineComment will fail to fix comments at the end of the file
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1656 : Using the --sniffs argument has a problem with case sensitivity
+- Fixed bug #1657 : Uninitialized string offset: 0 when sniffing CSS
+- Fixed bug #1669 : Temporary expression proceeded by curly brace is detected as function call
+- Fixed bug #1681 : Huge arrays are super slow to scan with Squiz.Arrays.ArrayDeclaration sniff
+- Fixed bug #1694 : Squiz.Arrays.ArrayBracketSpacing is removing some comments during fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1702 : Generic.WhiteSpaceDisallowSpaceIndent fixer bug when line only contains superfluous whitespace
+
+## [3.1.0] - 2017-09-20
+### Changed
+- This release includes a change to support newer versions of PHPUnit (versions 4, 5, and 6 are now supported)
+ - The custom PHP_CodeSniffer test runner now requires a bootstrap file
+ - Developers with custom standards using the PHP_CodeSniffer test runner will need to do one of the following:
+ - run your unit tests from the PHP_CodeSniffer root dir so the bootstrap file is included
+ - specify the PHP_CodeSniffer bootstrap file on the command line: phpunit --bootstrap=/path/to/phpcs/tests/bootstrap.php
+ - require the PHP_CodeSniffer bootstrap file from your own bootstrap file
+ - If you don't run PHP_CodeSniffer unit tests, this change will not affect you
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- A phpcs.xml or phpcs.xml.dist file now takes precedence over the default_standard config setting
+ - Thanks to [Björn Fischer][@Fischer-Bjoern] for the patch
+- Both phpcs.xml and phpcs.xml.dist files can now be prefixed with a dot (request #1566)
+ - The order that the files are searched is: .phpcs.xml, .phpcs.xml.dist, phpcs.xml, phpcs.xml.dist
+- The autoloader will now search for files during unit tests runs from the same locations as during normal phpcs runs
+ - Allows for easier unit testing of custom standards that use helper classes or custom namespaces
+- Include patterns for sniffs now use OR logic instead of AND logic
+ - Previously, a file had to be in each of the include patterns to be processed by a sniff
+ - Now, a file has to only be in at least one of the patterns
+ - This change reflects the original intention of the feature
+- PHPCS will now follow symlinks under the list of checked directories
+ - This previously only worked if you specified the path to a symlink on the command line
+- Output from --config-show, --config-set, and --config-delete now includes the path to the loaded config file
+- PHPCS now cleanly exits if its config file is not readable
+ - Previously, a combination of PHP notices and PHPCS errors would be generated
+- Comment tokens that start with /** are now always tokenized as docblocks
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- The PHP-supplied T_YIELD and T_YIELD_FROM token have been replicated for older PHP versions
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Added new Generic.CodeAnalysis.AssignmentInCondition sniff to warn about variable assignments inside conditions
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the contribution
+- Added Generic.Files.OneObjectStructurePerFile sniff to ensure there is a single class/interface/trait per file
+ - Thanks to [Mponos George][@gmponos] for the contribution
+- Function call sniffs now check variable function names and self/static object creation
+ - Specific sniffs are Generic.Functions.FunctionCallArgumentSpacing, PEAR.Functions.FunctionCallSignature, and PSR2.Methods.FunctionCallSignature
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Generic.Files.LineLength can now be configured to ignore all comment lines, no matter their length
+ - Set the ignoreComments property to TRUE (default is FALSE) in your ruleset.xml file to enable this
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.LowerCaseKeyword now checks self, parent, yield, yield from, and closure (function) keywords
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- PEAR.Functions.FunctionDeclaration now removes a blank line if it creates one by moving the curly brace during fixing
+- Squiz.Commenting.FunctionCommentThrowTag now supports PHP 7.1 multi catch exceptions
+- Squiz.Formatting.OperatorBracket no longer throws errors for PHP 7.1 multi catch exceptions
+- Squiz.Commenting.LongConditionClosingComment now supports finally statements
+- Squiz.Formatting.OperatorBracket now correctly fixes pipe separated flags
+- Squiz.Formatting.OperatorBracket now correctly fixes statements containing short array syntax
+- Squiz.PHP.EmbeddedPhp now properly fixes cases where the only content in an embedded PHP block is a comment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.ControlStructureSpacing now ignores comments when checking blank lines at the top of control structures
+- Squiz.WhiteSpace.ObjectOperatorSpacing now detects and fixes spaces around double colons
+ - Thanks to [Julius Šmatavičius][@bondas83] for the patch
+- Squiz.WhiteSpace.MemberVarSpacing can now be configured to check any number of blank lines between member vars
+ - Set the spacing property (default is 1) in your ruleset.xml file to set the spacing
+- Squiz.WhiteSpace.MemberVarSpacing can now be configured to check a different number of blank lines before the first member var
+ - Set the spacingBeforeFirst property (default is 1) in your ruleset.xml file to set the spacing
+- Added a new PHP_CodeSniffer\Util\Tokens::$ooScopeTokens static member var for quickly checking object scope
+ - Includes T_CLASS, T_ANON_CLASS, T_INTERFACE, and T_TRAIT
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PHP_CodeSniffer\Files\File::findExtendedClassName() now supports extended interfaces
+ - Thanks to [Martin Hujer][@mhujer] for the patch
+
+### Fixed
+- Fixed bug #1550 : Squiz.Commenting.FunctionComment false positive when function contains closure
+- Fixed bug #1577 : Generic.InlineControlStructureSniff breaks with a comment between body and condition in do while loops
+- Fixed bug #1581 : Sniffs not loaded when one-standard directories are being registered in installed_paths
+- Fixed bug #1591 : Autoloader failing to load arbitrary files when installed_paths only set via a custom ruleset
+- Fixed bug #1605 : Squiz.WhiteSpace.OperatorSpacing false positive on unary minus after comment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1615 : Uncaught RuntimeException when phpcbf fails to fix files
+- Fixed bug #1637 : Generic.WhiteSpaceScopeIndent closure argument indenting incorrect with multi-line strings
+- Fixed bug #1638 : Squiz.WhiteSpace.ScopeClosingBrace closure argument indenting incorrect with multi-line strings
+- Fixed bug #1640 : Squiz.Strings.DoubleQuoteUsage replaces tabs with spaces when fixing
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.0.2] - 2017-07-18
+### Changed
+- The code report now gracefully handles tokenizer exceptions
+- The phpcs and phpcbf scripts and now the only places that exit() in the code
+ - This allows for easier usage of core PHPCS functions from external scripts
+ - If you are calling Runner::runPHPCS() or Runner::runPHPCBF() directly, you will get back the full range of exit codes
+ - If not, catch the new DeepExitException to get the error message ($e->getMessage()) and exit code ($e->getCode());
+- NOWDOC tokens are now considered conditions, just as HEREDOC tokens are
+ - This makes it easier to find the start and end of a NOWDOC from any token within it
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Custom autoloaders are now only included once in case multiple standards are using the same one
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Improved tokenizing of fallthrough CASE and DEFAULT statements that share a closing statement and use curly braces
+- Improved the error message when Squiz.ControlStructures.ControlSignature detects a newline after the closing parenthesis
+
+### Fixed
+- Fixed a problem where the source report was not printing the correct number of errors found
+- Fixed a problem where the --cache=/path/to/cachefile CLI argument was not working
+- Fixed bug #1465 : Generic.WhiteSpace.ScopeIndent reports incorrect errors when indenting double arrows in short arrays
+- Fixed bug #1478 : Indentation in fallthrough CASE that contains a closure
+- Fixed bug #1497 : Fatal error if composer prepend-autoloader is set to false
+ - Thanks to [Kunal Mehta][@legoktm] for the patch
+- Fixed bug #1503 : Alternative control structure syntax not always recognized as scoped
+- Fixed bug #1523 : Fatal error when using the --suffix argument
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1526 : Use of basepath setting can stop PHPCBF being able to write fixed files
+- Fixed bug #1530 : Generic.WhiteSpace.ScopeIndent can increase indent too much for lines within code blocks
+- Fixed bug #1547 : Wrong token type for backslash in use function
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #1549 : Squiz.PHP.EmbeddedPhp fixer conflict with // comment before PHP close tag
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1560 : Squiz.Commenting.FunctionComment fatal error when fixing additional param comment lines that have no indent
+
+## [3.0.1] - 2017-06-14
+### Security
+- This release contains a fix for a security advisory related to the improper handling of a shell command
+ - A properly crafted filename would allow for arbitrary code execution when using the --filter=gitmodified command line option
+ - All version 3 users are encouraged to upgrade to this version, especially if you are checking 3rd-party code
+ - e.g., you run PHPCS over libraries that you did not write
+ - e.g., you provide a web service that runs PHPCS over user-uploaded files or 3rd-party repositories
+ - e.g., you allow external tool paths to be set by user-defined values
+ - If you are unable to upgrade but you check 3rd-party code, ensure you are not using the Git modified filter
+ - This advisory does not affect PHP_CodeSniffer version 2.
+ - Thanks to [Sergei Morozov][@morozov] for the report and patch
+
+### Changed
+- Arguments on the command line now override or merge with those specified in a ruleset.xml file in all cases
+- PHPCS now stops looking for a phpcs.xml file as soon as one is found, favoring the closest one to the current dir
+- Added missing help text for the --stdin-path CLI option to --help
+- Re-added missing help text for the --file-list and --bootstrap CLI options to --help
+- Runner::runPHPCS() and Runner::runPHPCBF() now return an exit code instead of exiting directly (request #1484)
+- The Squiz standard now enforces short array syntax by default
+- The autoloader is now working correctly with classes created with class_alias()
+- The autoloader will now search for files inside all directories in the installed_paths config var
+ - This allows autoloading of files inside included custom coding standards without manually requiring them
+- You can now specify a namespace for a custom coding standard, used by the autoloader to load non-sniff helper files
+ - Also used by the autoloader to help other standards directly include sniffs for your standard
+ - Set the value to the namespace prefix you are using for sniff files (everything up to \Sniffs\)
+ - e.g., if your namespace format is MyProject\CS\Standard\Sniffs\Category set the namespace to MyProject\CS\Standard
+ - If omitted, the namespace is assumed to be the same as the directory name containing the ruleset.xml file
+ - The namespace is set in the ruleset tag of the ruleset.xml file
+ - e.g., ruleset name="My Coding Standard" namespace="MyProject\CS\Standard"
+- Rulesets can now specify custom autoloaders using the new autoload tag
+ - Autoloaders are included while the ruleset is being processed and before any custom sniffs are included
+ - Allows for very custom autoloading of helper classes well before the boostrap files are included
+- The PEAR standard now includes Squiz.Commenting.DocCommentAlignment
+ - It previously broke comments onto multiple lines, but didn't align them
+
+### Fixed
+- Fixed a problem where excluding a message from a custom standard's own sniff would exclude the whole sniff
+ - This caused some PSR2 errors to be under-reported
+- Fixed bug #1442 : T_NULLABLE detection not working for nullable parameters and return type hints in some cases
+- Fixed bug #1447 : Running the unit tests with a phpunit config file breaks the test suite
+ - Unknown arguments were not being handled correctly, but are now stored in $config->unknown
+- Fixed bug #1449 : Generic.Classes.OpeningBraceSameLine doesn't detect comment before opening brace
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1450 : Coding standard located under an installed_path with the same directory name throws an error
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1451 : Sniff exclusions/restrictions dont work with custom sniffs unless they use the PHP_CodeSniffer NS
+- Fixed bug #1454 : Squiz.WhiteSpace.OperatorSpacing is not checking spacing on either side of a short ternary operator
+ - Thanks to [Mponos George][@gmponos] for the patch
+- Fixed bug #1495 : Setting an invalid installed path breaks all commands
+- Fixed bug #1496 : Squiz.Strings.DoubleQuoteUsage not unescaping dollar sign when fixing
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #1501 : Interactive mode is broken
+- Fixed bug #1504 : PSR2.Namespaces.UseDeclaration hangs fixing use statement with no trailing code
+
+## [2.9.1] - 2017-05-22
+### Fixed
+- Fixed bug #1442 : T_NULLABLE detection not working for nullable parameters and return type hints in some cases
+- Fixed bug #1448 : Generic.Classes.OpeningBraceSameLine doesn't detect comment before opening brace
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+
+## [3.0.0] - 2017-05-04
+### Changed
+- Added an --ignore-annotations command line argument to ignore all @codingStandards annotations in code comments (request #811)
+- This allows you to force errors to be shown that would otherwise be ignored by code comments
+ - Also stop files being able to change sniff properties mid way through processing
+- An error is now reported if no sniffs were registered to be run (request #1129)
+- The autoloader will now search for files inside the directory of any loaded coding standard
+ - This allows autoloading of any file inside a custom coding standard without manually requiring them
+ - Ensure your namespace begins with your coding standard's directory name and follows PSR-4
+ - e.g., StandardName\Sniffs\CategoryName\AbstractHelper or StandardName\Helpers\StringSniffHelper
+- Fixed an error where STDIN was sometimes not checked when using the --parallel CLI option
+- The is_closure index has been removed from the return value of File::getMethodProperties()
+ - This value was always false because T_FUNCTION tokens are never closures
+ - Closures have a token type of T_CLOSURE
+- The File::isAnonymousFunction() method has been removed
+ - This function always returned false because it only accepted T_FUNCTION tokens, which are never closures
+ - Closures have a token type of T_CLOSURE
+- Includes all changes from the 2.9.0 release
+
+### Fixed
+- Fixed bug #834 : PSR2.ControlStructures.SwitchDeclaration does not handle if branches with returns
+ - Thanks to [Fabian Wiget][@fabacino] for the patch
+
+## [3.0.0RC4] - 2017-03-02
+### Security
+- This release contains a fix for a security advisory related to the improper handling of shell commands
+ - Uses of shell_exec() and exec() were not escaping filenames and configuration settings in most cases
+ - A properly crafted filename or configuration option would allow for arbitrary code execution when using some features
+ - All users are encouraged to upgrade to this version, especially if you are checking 3rd-party code
+ - e.g., you run PHPCS over libraries that you did not write
+ - e.g., you provide a web service that runs PHPCS over user-uploaded files or 3rd-party repositories
+ - e.g., you allow external tool paths to be set by user-defined values
+ - If you are unable to upgrade but you check 3rd-party code, ensure you are not using the following features:
+ - The diff report
+ - The notify-send report
+ - The Generic.PHP.Syntax sniff
+ - The Generic.Debug.CSSLint sniff
+ - The Generic.Debug.ClosureLinter sniff
+ - The Generic.Debug.JSHint sniff
+ - The Squiz.Debug.JSLint sniff
+ - The Squiz.Debug.JavaScriptLint sniff
+ - The Zend.Debug.CodeAnalyzer sniff
+ - Thanks to [Klaus Purer][@klausi] for the report
+
+### Changed
+- The indent property of PEAR.Classes.ClassDeclaration has been removed
+ - Instead of calculating the indent of the brace, it just ensures the brace is aligned with the class keyword
+ - Other sniffs can be used to ensure the class itself is indented correctly
+- Invalid exclude rules inside a ruleset.xml file are now ignored instead of potentially causing out of memory errors
+ - Using the -vv command line argument now also shows the invalid exclude rule as XML
+- Includes all changes from the 2.8.1 release
+
+### Fixed
+- Fixed bug #1333 : The new autoloader breaks some frameworks with custom autoloaders
+- Fixed bug #1334 : Undefined offset when explaining standard with custom sniffs
+
+## [3.0.0RC3] - 2017-02-02
+### Changed
+- Added support for ES6 class declarations
+ - Previously, these class were tokenized as JS objects but are now tokenized as normal T_CLASS structures
+- Added support for ES6 method declarations, where the "function" keyword is not used
+ - Previously, these methods were tokenized as JS objects (fixes bug #1251)
+ - The name of the ES6 method is now assigned the T_FUNCTION keyword and treated like a normal function
+ - Custom sniffs that support JS and listen for T_FUNCTION tokens can't assume the token represents the word "function"
+ - Check the contents of the token first, or use $phpcsFile->getDeclarationName($stackPtr) if you just want its name
+ - There is no change for custom sniffs that only check PHP code
+- PHPCBF exit codes have been changed so they are now more useful (request #1270)
+ - Exit code 0 is now used to indicate that no fixable errors were found, and so nothing was fixed
+ - Exit code 1 is now used to indicate that all fixable errors were fixed correctly
+ - Exit code 2 is now used to indicate that PHPCBF failed to fix some of the fixable errors it found
+ - Exit code 3 is now used for general script execution errors
+- Added PEAR.Commenting.FileComment.ParamCommentAlignment to check alignment of multi-line param comments
+- Includes all changes from the 2.8.0 release
+
+### Fixed
+- Fixed an issue where excluding a file using a @codingStandardsIgnoreFile comment would produce errors
+ - For PHPCS, it would show empty files being processed
+ - For PHPCBF, it would produce a PHP error
+- Fixed bug #1233 : Can't set config data inside ruleset.xml file
+- Fixed bug #1241 : CodeSniffer.conf not working with 3.x PHAR file
+
+## [3.0.0RC2] - 2016-11-30
+### Changed
+- Made the Runner class easier to use with wrapper scripts
+- Full usage information is no longer printed when a usage error is encountered (request #1186)
+ - Makes it a lot easier to find and read the error message that was printed
+- Includes all changes from the 2.7.1 release
+
+### Fixed
+- Fixed an undefined var name error that could be produced while running PHPCBF
+- Fixed bug #1167 : 3.0.0RC1 PHAR does not work with PEAR standard
+- Fixed bug #1208 : Excluding files doesn't work when using STDIN with a filename specified
+
+## [3.0.0RC1] - 2016-09-02
+### Changed
+- Progress output now shows E and W in green when a file has fixable errors or warnings
+ - Only supported if colors are enabled
+- PHPCBF no longer produces verbose output by default (request #699)
+ - Use the -v command line argument to show verbose fixing output
+ - Use the -q command line argument to disable verbose information if enabled by default
+- PHPBF now prints a summary report after fixing files
+ - Report shows files that were fixed, how many errors were fixed, and how many remain
+- PHPCBF now supports the -p command line argument to print progress information
+ - Prints a green F for files where fixes occurred
+ - Prints a red E for files that could not be fixed due to an error
+ - Use the -q command line argument to disable progress information if enabled by default
+- Running unit tests using --verbose no longer throws errors
+- Includes all changes from the 2.7.0 release
+
+### Fixed
+- Fixed shell error appearing on some systems when trying to find executable paths
+
+## [3.0.0a1] - 2016-07-20
+### Changed
+- Min PHP version increased from 5.1.2 to 5.4.0
+- Added optional caching of results between runs (request #530)
+ - Enable the cache by using the --cache command line argument
+ - If you want the cache file written somewhere specific, use --cache=/path/to/cacheFile
+ - Use the command "phpcs --config-set cache true" to turn caching on by default
+ - Use the --no-cache command line argument to disable caching if it is being turned on automatically
+- Add support for checking file in parallel (request #421)
+ - Tell PHPCS how many files to check at once using the --parallel command line argument
+ - To check 100 files at once, using --parallel=100
+ - To disable parallel checking if it is being turned on automatically, use --parallel=1
+ - Requires PHP to be compiled with the PCNTL package
+- The default encoding has been changed from iso-8859-1 to utf-8 (request #760)
+ - The --encoding command line argument still works, but you no longer have to set it to process files as utf-8
+ - If encoding is being set to utf-8 in a ruleset or on the CLI, it can be safely removed
+ - If the iconv PHP extension is not installed, standard non-multibyte aware functions will be used
+- Added a new "code" report type to show a code snippet for each error (request #419)
+ - The line containing the error is printed, along with 2 lines above and below it to show context
+ - The location of the errors is underlined in the code snippet if you also use --colors
+ - Use --report=code to generate this report
+- Added support for custom filtering of the file list
+ - Developers can write their own filter classes to perform custom filtering of the list before the run starts
+ - Use the command line arg --filter=/path/to/filter.php to specify a filter to use
+ - Extend \PHP_CodeSniffer\Filters\Filter to also support the core PHPCS extension and path filtering
+ - Extend \PHP_CodeSniffer\Filters\ExactMatch to get the core filtering and the ability to use blacklists and whitelists
+ - The included \PHP_CodeSniffer\Filters\GitModified filter is a good example of an ExactMatch filter
+- Added support for only checking files that have been locally modified or added in a git repo
+ - Use --filter=gitmodified to check these files
+ - You still need to give PHPCS a list of files or directories in which to check
+- Added automatic discovery of executable paths (request #571)
+ - Thanks to [Sergei Morozov][@morozov] for the patch
+- You must now pass "-" on the command line to have PHPCS wait for STDIN
+ - E.g., phpcs --standard=PSR2 -
+ - You can still pipe content via STDIN as normal as PHPCS will see this and process it
+ - But without the "-", PHPCS will throw an error if no content or files are passed to it
+- All PHP errors generated by sniffs are caught, re-thrown as exceptions, and reported in the standard error reports
+ - This should stop bugs inside sniffs causing infinite loops
+ - Also stops invalid reports being produced as errors don't print to the screen directly
+- Sniff codes are no longer optional
+ - If a sniff throws and error or a warning, it must specify an internal code for that message
+- The installed_paths config setting can now point directly to a standard
+ - Previously, it had to always point to the directory in which the standard lives
+- Multiple reports can now be specified using the --report command line argument
+ - Report types are separated by commas
+ - E.g., --report=full,summary,info
+ - Previously, you had to use one argument for each report such as --report=full --report=summary --report=info
+- You can now set the severity, message type, and exclude patterns for and entire sniff, category, or standard
+ - Previously, this was only available for a single message
+- You can now include a single sniff code in a ruleset instead of having to include an entire sniff
+ - Including a sniff code will automatically exclude all other messages from that sniff
+ - If the sniff is already included by an imported standard, set the sniff severity to 0 and include the specific message you want
+- PHPCBF no longer uses patch
+ - Files are now always overwritten
+ - The --no-patch option has been removed
+- Added a --basepath option to strip a directory from the front of file paths in output (request #470)
+ - The basepath is absolute or relative to the current directory
+ - E.g., to output paths relative to current dir in reports, use --basepath=.
+- Ignore rules are now checked when using STDIN (request #733)
+- Added an include-pattern tag to rulesets to include a sniff for specific files and folders only (request #656)
+ - This is the exact opposite of the exclude-pattern tag
+ - This option is only usable within sniffs, not globally like exclude-patterns are
+- Added a new -m option to stop error messages from being recorded, which saves a lot of memory
+ - PHPCBF always uses this setting to reduce memory as it never outputs error messages
+ - Setting the $recordErrors member var inside custom report classes is no longer supported (use -m instead)
+- Exit code 2 is now used to indicate fixable errors were found (request #930)
+ - Exit code 3 is now used for general script execution errors
+ - Exit code 1 is used to indicate that coding standard errors were found, but none are fixable
+ - Exit code 0 is unchanged and continues to mean no coding standard errors found
+
+### Removed
+- The included PHPCS standard has been removed
+ - All rules are now found inside the phpcs.xml.dist file
+ - Running "phpcs" without any arguments from a git clone will use this ruleset
+- The included SVN pre-commit hook has been removed
+ - Hooks for version control systems will no longer be maintained within the PHPCS project
+
+## [2.9.0] - 2017-05-04
+### Changed
+- Added Generic.Debug.ESLint sniff to run ESLint over JS files and report errors
+ - Set eslint path using: phpcs --config-set eslint_path /path/to/eslint
+ - Thanks to [Ryan McCue][@rmccue] for the contribution
+- T_POW is now properly considered an arithmetic operator, and will be checked as such
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- T_SPACESHIP and T_COALESCE are now properly considered comparison operators, and will be checked as such
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHP.DisallowShortOpenTag now warns about possible short open tags even when short_open_tag is set to OFF
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.WhiteSpace.DisallowTabIndent now finds and fixes improper use of spaces anywhere inside the line indent
+ - Previously, only the first part of the indent was used to determine the indent type
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PEAR.Commenting.ClassComment now supports checking of traits as well as classes and interfaces
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.FunctionCommentThrowTag now supports re-throwing exceptions (request #946)
+ - Thanks to [Samuel Levy][@samlev] for the patch
+- Squiz.PHP.DisallowMultipleAssignments now ignores PHP4-style member var assignments
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.FunctionSpacing now ignores spacing above functions when they are preceded by inline comments
+ - Stops conflicts between this sniff and comment spacing sniffs
+- Squiz.WhiteSpace.OperatorSpacing no longer checks the equal sign in declare statements
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added missing error codes for a couple of sniffs so they can now be customised as normal
+
+### Fixed
+- Fixed bug #1266 : PEAR.WhiteSpace.ScopeClosingBrace can throw an error while fixing mixed PHP/HTML
+- Fixed bug #1364 : Yield From values are not recognised as returned values in Squiz FunctionComment sniff
+- Fixed bug #1373 : Error in tab expansion results in white-space of incorrect size
+ - Thanks to [Mark Clements][@MarkMaldaba] for the patch
+- Fixed bug #1381 : Tokenizer: dereferencing incorrectly identified as short array
+- Fixed bug #1387 : Squiz.ControlStructures.ControlSignature does not handle alt syntax when checking space after closing brace
+- Fixed bug #1392 : Scope indent calculated incorrectly when using array destructuring
+- Fixed bug #1394 : integer type hints appearing as TypeHintMissing instead of ScalarTypeHintMissing
+ - PHP 7 type hints were also being shown when run under PHP 5 in some cases
+- Fixed bug #1405 : Squiz.WhiteSpace.ScopeClosingBrace fails to fix closing brace within indented PHP tags
+- Fixed bug #1421 : Ternaries used in constant scalar expression for param default misidentified by tokenizer
+- Fixed bug #1431 : PHPCBF can't fix short open tags when they are not followed by a space
+ - Thanks to [Gonçalo Queirós][@ghunti] for the patch
+- Fixed bug #1432 : PHPCBF can make invalid fixes to inline JS control structures that make use of JS objects
+
+## [2.8.1] - 2017-03-02
+### Security
+- This release contains a fix for a security advisory related to the improper handling of shell commands
+ - Uses of shell_exec() and exec() were not escaping filenames and configuration settings in most cases
+ - A properly crafted filename or configuration option would allow for arbitrary code execution when using some features
+ - All users are encouraged to upgrade to this version, especially if you are checking 3rd-party code
+ - e.g., you run PHPCS over libraries that you did not write
+ - e.g., you provide a web service that runs PHPCS over user-uploaded files or 3rd-party repositories
+ - e.g., you allow external tool paths to be set by user-defined values
+ - If you are unable to upgrade but you check 3rd-party code, ensure you are not using the following features:
+ - The diff report
+ - The notify-send report
+ - The Generic.PHP.Syntax sniff
+ - The Generic.Debug.CSSLint sniff
+ - The Generic.Debug.ClosureLinter sniff
+ - The Generic.Debug.JSHint sniff
+ - The Squiz.Debug.JSLint sniff
+ - The Squiz.Debug.JavaScriptLint sniff
+ - The Zend.Debug.CodeAnalyzer sniff
+ - Thanks to [Klaus Purer][@klausi] for the report
+
+### Changed
+- The PHP-supplied T_COALESCE_EQUAL token has been replicated for PHP versions before 7.2
+- PEAR.Functions.FunctionDeclaration now reports an error for blank lines found inside a function declaration
+- PEAR.Functions.FunctionDeclaration no longer reports indent errors for blank lines in a function declaration
+- Squiz.Functions.MultiLineFunctionDeclaration no longer reports errors for blank lines in a function declaration
+ - It would previously report that only one argument is allowed per line
+- Squiz.Commenting.FunctionComment now corrects multi-line param comment padding more accurately
+- Squiz.Commenting.FunctionComment now properly fixes pipe-separated param types
+- Squiz.Commenting.FunctionComment now works correctly when function return types also contain a comment
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.ControlStructures.InlineIfDeclaration now supports the elvis operator
+ - As this is not a real PHP operator, it enforces no spaces between ? and : when the THEN statement is empty
+- Squiz.ControlStructures.InlineIfDeclaration is now able to fix the spacing errors it reports
+
+### Fixed
+- Fixed bug #1340 : STDIN file contents not being populated in some cases
+ - Thanks to [David Biňovec][@david-binda] for the patch
+- Fixed bug #1344 : PEAR.Functions.FunctionCallSignatureSniff throws error for blank comment lines
+- Fixed bug #1347 : PSR2.Methods.FunctionCallSignature strips some comments during fixing
+ - Thanks to [Algirdas Gurevicius][@uniquexor] for the patch
+- Fixed bug #1349 : Squiz.Strings.DoubleQuoteUsage.NotRequired message is badly formatted when string contains a CR newline char
+ - Thanks to [Algirdas Gurevicius][@uniquexor] for the patch
+- Fixed bug #1350 : Invalid Squiz.Formatting.OperatorBracket error when using namespaces
+- Fixed bug #1369 : Empty line in multi-line function declaration cause infinite loop
+
+## [2.8.0] - 2017-02-02
+### Changed
+- The Internal.NoCodeFound error is no longer generated for content sourced from STDIN
+ - This should stop some Git hooks generating errors because PHPCS is trying to process the refs passed on STDIN
+- Squiz.Commenting.DocCommentAlignment now checks comments on class properties defined using the VAR keyword
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- The getMethodParameters() method now recognises "self" as a valid type hint
+ - The return array now contains a new "content" index containing the raw content of the param definition
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The getMethodParameters() method now supports nullable types
+ - The return array now contains a new "nullable_type" index set to true or false for each method param
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The getMethodParameters() method now supports closures
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added more guard code for JS files with syntax errors (request #1271 and request #1272)
+- Added more guard code for CSS files with syntax errors (request #1304)
+- PEAR.Commenting.FunctionComment fixers now correctly handle multi-line param comments
+- AbstractVariableSniff now supports anonymous classes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.NamingConventions.ConstructorName and PEAR.NamingConventions.ValidVariable now support anonymous classes
+- Generic.NamingConventions.CamelCapsFunctionName and PEAR.NamingConventions.ValidFunctionName now support anonymous classes
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.CodeAnalysis.UnusedFunctionParameter and PEAR.Functions.ValidDefaultValue now support closures
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- PEAR.NamingConventions.ValidClassName and Squiz.Classes.ValidClassName now support traits
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.Functions.FunctionCallArgumentSpacing now supports closures other PHP-provided functions
+ - Thanks to [Algirdas Gurevicius][@uniquexor] for the patch
+- Fixed an error where a nullable type character was detected as an inline then token
+ - A new T_NULLABLE token has been added to represent the ? nullable type character
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Squiz.WhiteSpace.SemicolonSpacing no longer removes comments while fixing the placement of semicolons
+ - Thanks to [Algirdas Gurevicius][@uniquexor] for the patch
+
+### Fixed
+- Fixed bug #1230 : JS tokeniser incorrectly tokenises bitwise shifts as comparison
+ - Thanks to [Ryan McCue][@rmccue] for the patch
+- Fixed bug #1237 : Uninitialized string offset in PHP Tokenizer on PHP 5.2
+- Fixed bug #1239 : Warning when static method name is 'default'
+- Fixed bug #1240 : False positive for function names starting with triple underscore
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1245 : SELF is not recognised as T_SELF token in: return new self
+- Fixed bug #1246 : A mix of USE statements with and without braces can cause the tokenizer to mismatch brace tokens
+ - Thanks to [Michał Bundyra][@michalbundyra] for the patch
+- Fixed bug #1249 : GitBlame report requires a .git directory
+- Fixed bug #1252 : Squiz.Strings.ConcatenationSpacing fix creates syntax error when joining a number to a string
+- Fixed bug #1253 : Generic.ControlStructures.InlineControlStructure fix creates syntax error fixing if-try/catch
+- Fixed bug #1255 : Inconsistent indentation check results when ELSE on new line
+- Fixed bug #1257 : Double dash in CSS class name can lead to "Named colours are forbidden" false positives
+- Fixed bug #1260 : Syntax errors not being shown when error_prepend_string is set
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Fixed bug #1264 : Array return type hint is sometimes detected as T_ARRAY_HINT instead of T_RETURN_TYPE
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #1265 : ES6 arrow function raises unexpected operator spacing errors
+- Fixed bug #1267 : Fixer incorrectly handles filepaths with repeated dir names
+ - Thanks to [Sergey Ovchinnikov][@orx0r] for the patch
+- Fixed bug #1276 : Commenting.FunctionComment.InvalidReturnVoid conditional issue with anonymous classes
+- Fixed bug #1277 : Squiz.PHP.DisallowMultipleAssignments.Found error when var assignment is on the same line as an open tag
+- Fixed bug #1284 : Squiz.Arrays.ArrayBracketSpacing.SpaceBeforeBracket false positive match for short list syntax
+
+## [2.7.1] - 2016-11-30
+### Changed
+- Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis fix now removes unnecessary whitespace
+- Squiz.Formatting.OperatorBracket no longer errors for negative array indexes used within a function call
+- Squiz.PHP.EmbeddedPhp no longer expects a semicolon after statements that are only opening a scope
+- Fixed a problem where the content of T_DOC_COMMENT_CLOSE_TAG tokens could sometimes be (boolean) false
+- Developers of custom standards with custom test runners can now have their standards ignored by the built-in test runner
+ - Set the value of an environment variable called PHPCS_IGNORE_TESTS with a comma separated list of your standard names
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- The unit test runner now loads the test sniff outside of the standard's ruleset so that exclude rules do not get applied
+ - This may have caused problems when testing custom sniffs inside custom standards
+ - Also makes the unit tests runs a little faster
+- The SVN pre-commit hook now works correctly when installed via composer
+ - Thanks to [Sergey][@sserbin] for the patch
+
+### Fixed
+- Fixed bug #1135 : PEAR.ControlStructures.MultiLineCondition.CloseBracketNewLine not detected if preceded by multiline function call
+- Fixed bug #1138 : PEAR.ControlStructures.MultiLineCondition.Alignment not detected if closing brace is first token on line
+- Fixed bug #1141 : Sniffs that check EOF newlines don't detect newlines properly when the last token is a doc block
+- Fixed bug #1150 : Squiz.Strings.EchoedStrings does not properly fix bracketed statements
+- Fixed bug #1156 : Generic.Formatting.DisallowMultipleStatements errors when multiple short echo tags are used on the same line
+ - Thanks to [Nikola Kovacs][@nkovacs] for the patch
+- Fixed bug #1161 : Absolute report path is treated like a relative path if it also exists within the current directory
+- Fixed bug #1170 : Javascript regular expression literal not recognized after comparison operator
+- Fixed bug #1180 : Class constant named FUNCTION is incorrectly tokenized
+- Fixed bug #1181 : Squiz.Operators.IncrementDecrementUsage.NoBrackets false positive when incrementing properties
+ - Thanks to [Jürgen Henge-Ernst][@hernst42] for the patch
+- Fixed bug #1188 : Generic.WhiteSpace.ScopeIndent issues with inline HTML and multi-line function signatures
+- Fixed bug #1190 : phpcbf on if/else with trailing comment generates erroneous code
+- Fixed bug #1191 : Javascript sniffer fails with function called "Function"
+- Fixed bug #1203 : Inconsistent behavior of PHP_CodeSniffer_File::findEndOfStatement
+- Fixed bug #1218 : CASE conditions using class constants named NAMESPACE/INTERFACE/TRAIT etc are incorrectly tokenized
+- Fixed bug #1221 : Indented function call with multiple closure arguments can cause scope indent error
+- Fixed bug #1224 : PHPCBF fails to fix code with heredoc/nowdoc as first argument to a function
+
+## [2.7.0] - 2016-09-02
+### Changed
+- Added --file-list command line argument to allow a list of files and directories to be specified in an external file
+ - Useful is you have a generated list of files to check that would be too long for the command line
+ - File and directory paths are listed one per line
+ - Usage is: phpcs --file-list=/path/to/file-list ...
+ - Thanks to [Blotzu][@andrei-propertyguru] for the patch
+- Values set using @codingStandardsChangeSetting comments can now contain spaces
+- Sniff unit tests can now specify a list of test files instead of letting the runner pick them (request #1078)
+ - Useful if a sniff needs to exclude files based on the environment, or is checking filenames
+ - Override the new getTestFiles() method to specify your own list of test files
+- Generic.Functions.OpeningFunctionBraceKernighanRitchie now ignores spacing for function return types
+ - The sniff code Generic.Functions.OpeningFunctionBraceKernighanRitchie.SpaceAfterBracket has been removed
+ - Replaced by Generic.Functions.OpeningFunctionBraceKernighanRitchie.SpaceBeforeBrace
+ - The new error message is slightly clearer as it indicates that a single space is needed before the brace
+- Squiz.Commenting.LongConditionClosingComment now allows for the length of a code block to be configured
+ - Set the lineLimit property (default is 20) in your ruleset.xml file to set the code block length
+ - When the code block length is reached, the sniff will enforce a closing comment after the closing brace
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.Commenting.LongConditionClosingComment now allows for the end comment format to be configured
+ - Set the commentFormat property (default is "//end %s") in your ruleset.xml file to set the format
+ - The placeholder %s will be replaced with the type of condition opener, e.g., "//end foreach"
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Generic.PHPForbiddenFunctions now allows forbidden functions to have mixed case
+ - Previously, it would only do a strtolower comparison
+ - Error message now shows what case was found in the code and what the correct case should be
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added Generic.Classes.OpeningBraceSameLine to ensure opening brace of class/interface/trait is on the same line as the declaration
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added Generic.PHP.BacktickOperator to ban the use of the backtick operator for running shell commands
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Added Generic.PHP.DisallowAlternativePHPTags to ban the use of alternate PHP tags
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Squiz.WhiteSpace.LanguageConstructSpacing no longer checks for spaces if parenthesis are being used (request #1062)
+ - Makes this sniff more compatible with those that check parenthesis spacing of function calls
+- Squiz.WhiteSpace.ObjectOperatorSpacing now has a setting to ignore newline characters around object operators
+ - Default remains FALSE, so newlines are not allowed
+ - Override the "ignoreNewlines" setting in a ruleset.xml file to change
+ - Thanks to [Alex Howansky][@AlexHowansky] for the patch
+- Squiz.Scope.MethodScope now sniffs traits as well as classes and interfaces
+ - Thanks to [Jesse Donat][@donatj] for the patch
+- PHPCBF is now able to fix Squiz.SelfMemberReference.IncorrectCase errors
+ - Thanks to [Nikola Kovacs][@nkovacs] for the patch
+- PHPCBF is now able to fix Squiz.Commenting.VariableComment.IncorrectVarType
+ - Thanks to [Walt Sorensen][@photodude] for the patch
+- PHPCBF is now able to fix Generic.PHP.DisallowShortOpenTag
+ - Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
+- Improved the formatting of the end brace when auto fixing InlineControlStructure errors (request #1121)
+- Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine fix no longer leaves blank line after brace (request #1085)
+- Generic UpperCaseConstantNameSniff now allows lowercase namespaces in constant definitions
+ - Thanks to [Daniel Schniepp][@dschniepp] for the patch
+- Squiz DoubleQuoteUsageSniff is now more tolerant of syntax errors caused by mismatched string tokens
+- A few sniffs that produce errors based on the current PHP version can now be told to run using a specific PHP version
+ - Set the php_version config var using --config-set, --runtime-set, or in a ruleset to specify a specific PHP version
+ - The format of the PHP version is the same as the PHP_VERSION_ID constant (e.g., 50403 for version 5.4.3)
+ - Supported sniffs are Generic.PHP.DisallowAlternativePHPTags, PSR1.Classes.ClassDeclaration, Squiz.Commenting.FunctionComment
+ - Thanks to [Finlay Beaton][@ofbeaton] for the patch
+
+### Fixed
+- Fixed bug #985 : Duplicate class definition detection generates false-positives in media queries
+ - Thanks to [Raphael Horber][@rhorber] for the patch
+- Fixed bug #1014 : Squiz VariableCommentSniff doesn't always detect a missing comment
+- Fixed bug #1066 : Undefined index: quiet in CLI.php during unit test run with -v command line arg
+- Fixed bug #1072 : Squiz.SelfMemberReference.NotUsed not detected if leading namespace separator is used
+- Fixed bug #1089 : Rulesets cannot be loaded if the path contains urlencoded characters
+- Fixed bug #1091 : PEAR and Squiz FunctionComment sniffs throw errors for some invalid @param line formats
+- Fixed bug #1092 : PEAR.Functions.ValidDefaultValue should not flag type hinted methods with a NULL default argument
+- Fixed bug #1095 : Generic LineEndings sniff replaces tabs with spaces with --tab-width is set
+- Fixed bug #1096 : Squiz FunctionDeclarationArgumentSpacing gives incorrect error/fix when variadic operator is followed by a space
+- Fixed bug #1099 : Group use declarations are incorrectly fixed by the PSR2 standard
+ - Thanks to [Jason McCreary][@jasonmccreary] for the patch
+- Fixed bug #1101 : Incorrect indent errors when breaking out of PHP inside an IF statement
+- Fixed bug #1102 : Squiz.Formatting.OperatorBracket.MissingBrackets faulty bracketing fix
+- Fixed bug #1109 : Wrong scope indent reported in anonymous class
+- Fixed bug #1112 : File docblock not recognized when require_once follows it
+- Fixed bug #1120 : InlineControlStructureSniff does not handle auto-fixing for control structures that make function calls
+- Fixed bug #1124 : Squiz.Operators.ComparisonOperatorUsage does not detect bracketed conditions for inline IF statements
+ - Thanks to [Raphael Horber][@rhorber] for the patch
+
+## [2.6.2] - 2016-07-14
+### Changed
+- Added a new --exclude CLI argument to exclude a list of sniffs from checking and fixing (request #904)
+ - Accepts the same sniff codes as the --sniffs command line argument, but provides the opposite functionality
+- Added a new -q command line argument to disable progress and verbose information from being printed (request #969)
+ - Useful if a coding standard hard-codes progress or verbose output but you want PHPCS to be quiet
+ - Use the command "phpcs --config-set quiet true" to turn quiet mode on by default
+- Generic LineLength sniff no longer errors for comments that cannot be broken out onto a new line (request #766)
+ - A typical case is a comment that contains a very long URL
+ - The comment is ignored if putting the URL on a indented new comment line would be longer than the allowed length
+- Settings extensions in a ruleset no longer causes PHP notices during unit testing
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Version control reports now show which errors are fixable if you are showing sources
+- Added a new sniff to enforce a single space after a NOT operator (request #1051)
+ - Include in a ruleset using the code Generic.Formatting.SpaceAfterNot
+- The Squiz.Commenting.BlockComment sniff now supports tabs for indenting comment lines (request #1056)
+
+### Fixed
+- Fixed bug #790 : Incorrect missing @throws error in methods that use closures
+- Fixed bug #908 : PSR2 standard is not checking that closing brace is on line following the body
+- Fixed bug #945 : Incorrect indent behavior using deep-nested function and arrays
+- Fixed bug #961 : Two anonymous functions passed as function/method arguments cause indentation false positive
+- Fixed bug #1005 : Using global composer vendor autoload breaks PHP lowercase built-in function sniff
+ - Thanks to [Michael Butler][@michaelbutler] for the patch
+- Fixed bug #1007 : Squiz Unreachable code detection is not working properly with a closure inside a case
+- Fixed bug #1023 : PSR2.Classes.ClassDeclaration fails if class extends base class and "implements" is on trailing line
+- Fixed bug #1026 : Arrays in comma delimited class properties cause ScopeIndent to increase indent
+- Fixed bug #1028 : Squiz ArrayDeclaration incorrectly fixes multi-line array where end bracket is not on a new line
+- Fixed bug #1034 : Squiz FunctionDeclarationArgumentSpacing gives incorrect error when first arg is a variadic
+- Fixed bug #1036 : Adjacent assignments aligned analysis statement wrong
+- Fixed bug #1049 : Version control reports can show notices when the report width is very small
+- Fixed bug #21050 : PEAR MultiLineCondition sniff suppresses errors on last condition line
+
+## [2.6.1] - 2016-05-31
+### Changed
+- The PHP-supplied T_COALESCE token has been replicated for PHP versions before 7.0
+- Function return types of self, parent and callable are now tokenized as T_RETURN_TYPE
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- The default_standard config setting now allows multiple standards to be listed, like on the command line
+ - Thanks to [Michael Mayer][@schnittstabil] for the patch
+- Installations done via composer now only include the composer autoloader for PHP 5.3.2+ (request #942)
+- Added a rollbackChangeset() method to the Fixer class to purposely rollback the active changeset
+
+### Fixed
+- Fixed bug #940 : Auto-fixing issue encountered with inconsistent use of braces
+- Fixed bug #943 : Squiz.PHP.InnerFunctions.NotAllowed reported in anonymous classes
+- Fixed bug #944 : PHP warning when running the latest phar
+- Fixed bug #951 : InlineIfDeclaration: invalid error produced with UTF-8 string
+- Fixed bug #957 : Operator spacing sniff errors when plus is used as part of a number
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Fixed bug #959 : Call-time pass-by-reference false positive if there is a square bracket before the ampersand
+ - Thanks to [Konstantin Leboev][@realmfoo] for the patch
+- Fixed bug #962 : Null coalescing operator (??) not detected as a token
+ - Thanks to [Joel Posti][@joelposti] for the patch
+- Fixed bug #973 : Anonymous class declaration and PSR1.Files.SideEffects.FoundWithSymbols
+- Fixed bug #974 : Error when file ends with "function"
+- Fixed bug #979 : Anonymous function with return type hint is not refactored as expected
+- Fixed bug #983 : Squiz.WhiteSpace.MemberVarSpacing.AfterComment fails to fix error when comment is not a docblock
+- Fixed bug #1010 : Squiz NonExecutableCode sniff does not detect boolean OR
+ - Thanks to [Derek Henderson][@2shediac] for the patch
+- Fixed bug #1015 : The Squiz.Commenting.FunctionComment sniff doesn't allow description in @return tag
+ - Thanks to [Alexander Obuhovich][@aik099] for the patch
+- Fixed bug #1022 : Duplicate spaces after opening bracket error with PSR2 standard
+- Fixed bug #1025 : Syntax error in JS file can cause undefined index for parenthesis_closer
+
+## [2.6.0] - 2016-04-04
+### Changed
+- Paths used when setting CLI arguments inside ruleset.xml files are now relative to the ruleset location (request #847)
+ - This change only applies to paths within ARG tags, used to set CLI arguments
+ - Previously, the paths were relative to the directory PHPCS was being run from
+ - Absolute paths are still allowed and work the same way they always have
+ - This change allows ruleset.xml files to be more portable
+- Content passed via STDIN will now be processed even if files are specified on the command line or in a ruleset
+- When passing content via STDIN, you can now specify the file path to use on the command line (request #934)
+ - This allows sniffs that check file paths to work correctly
+ - This is the same functionality provided by the phpcs_input_file line, except it is available on the command line
+- Files processed with custom tokenizers will no longer be skipped if they appear minified (request #877)
+ - If the custom tokenizer wants minified files skipped, it can set a $skipMinified member var to TRUE
+ - See the included JS and CSS tokenizers for an example
+- Config vars set in ruleset.xml files are now processed earlier, allowing them to be used during sniff registration
+ - Among other things, this allows the installed_paths config var to be set in ruleset.xml files
+ - Thanks to [Pieter Frenssen][@pfrenssen] for the patch
+- Improved detection of regular expressions in the JS tokenizer
+- Generic PHP Syntax sniff now uses PHP_BINARY (if available) to determine the path to PHP if no other path is available
+ - You can still manually set php_path to use a specific binary for testing
+ - Thanks to [Andrew Berry][@deviantintegral] for the patch
+- The PHP-supplied T_POW_EQUAL token has been replicated for PHP versions before 5.6
+- Added support for PHP7 use group declarations (request #878)
+ - New tokens T_OPEN_USE_GROUP and T_CLOSE_USE_GROUP are assigned to the open and close curly braces
+- Generic ScopeIndent sniff now reports errors for every line that needs the indent changed (request #903)
+ - Previously, it ignored lines that were indented correctly in the context of their block
+ - This change produces more technically accurate error messages, but is much more verbose
+- The PSR2 and Squiz standards now allow multi-line default values in function declarations (request #542)
+ - Previously, these would automatically make the function a multi-line declaration
+- Squiz InlineCommentSniff now allows docblocks on require(_once) and include(_once) statements
+ - Thanks to [Gary Jones][@GaryJones] for the patch
+- Squiz and PEAR Class and File sniffs no longer assume the first comment in a file is always a file comment
+ - phpDocumentor assigns the comment to the file only if it is not followed by a structural element
+ - These sniffs now follow this same rule
+- Squiz ClassCommentSniff no longer checks for blank lines before class comments
+ - Removes the error Squiz.Commenting.ClassComment.SpaceBefore
+- Renamed Squiz.CSS.Opacity.SpacingAfterPoint to Squiz.CSS.Opacity.DecimalPrecision
+ - Please update your ruleset if you are referencing this error code directly
+- Fixed PHP tokenizer problem that caused an infinite loop when checking a comment with specific content
+- Generic Disallow Space and Tab indent sniffs now detect and fix indents inside embedded HTML chunks (request #882)
+- Squiz CSS IndentationSniff no longer assumes the class opening brace is at the end of a line
+- Squiz FunctionCommentThrowTagSniff now ignores non-docblock comments
+- Squiz ComparisonOperatorUsageSniff now allows conditions like while(true)
+- PEAR FunctionCallSignatureSniff (and the Squiz and PSR2 sniffs that use it) now correctly check the first argument
+ - Further fix for bug #698
+
+### Fixed
+- Fixed bug #791 : codingStandardsChangeSetting settings not working with namespaces
+- Fixed bug #872 : Incorrect detection of blank lines between CSS class names
+- Fixed bug #879 : Generic InlineControlStructureSniff can create parse error when case/if/elseif/else have mixed brace and braceless definitions
+- Fixed bug #883 : PSR2 is not checking for blank lines at the start and end of control structures
+- Fixed bug #884 : Incorrect indentation notice for anonymous classes
+- Fixed bug #887 : Using curly braces for a shared CASE/DEFAULT statement can generate an error in PSR2 SwitchDeclaration
+- Fixed bug #889 : Closure inside catch/else/elseif causes indentation error
+- Fixed bug #890 : Function call inside returned short array value can cause indentation error inside CASE statements
+- Fixed bug #897 : Generic.Functions.CallTimePassByReference.NotAllowed false positive when short array syntax
+- Fixed bug #900 : Squiz.Functions.FunctionDeclarationArgumentSpacing bug when no space between type hint and argument
+- Fixed bug #902 : T_OR_EQUAL and T_POW_EQUAL are not seen as assignment tokens
+- Fixed bug #910 : Unrecognized "extends" and indentation on anonymous classes
+- Fixed bug #915 : JS Tokenizer generates errors when processing some decimals
+- Fixed bug #928 : Endless loop when sniffing a PHP file with a git merge conflict inside a function
+- Fixed bug #937 : Shebang can cause PSR1 SideEffects warning
+ - Thanks to [Clay Loveless][@claylo] for the patch
+- Fixed bug #938 : CallTimePassByReferenceSniff ignores functions with return value
+
+## [2.5.1] - 2016-01-20
+### Changed
+- The PHP-supplied T_SPACESHIP token has been replicated for PHP versions before 7.0
+- T_SPACESHIP is now correctly identified as an operator
+ - Thanks to [Alexander Obuhovich][@aik099] for the patch
+- Generic LowerCaseKeyword now ensures array type hints are lowercase as well
+ - Thanks to [Mathieu Rochette][@mathroc] for the patch
+- Squiz ComparisonOperatorUsageSniff no longer hangs on JS FOR loops that don't use semicolons
+- PHP_CodesSniffer now includes the composer autoload.php file, if there is one
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Added error Squiz.Commenting.FunctionComment.ScalarTypeHintMissing for PHP7 only (request #858)
+ - These errors were previously reported as Squiz.Commenting.FunctionComment.TypeHintMissing on PHP7
+ - Disable this error message in a ruleset.xml file if your code needs to run on both PHP5 and PHP7
+- The PHP 5.6 __debugInfo magic method no longer produces naming convention errors
+ - Thanks to [Michael Nowack][@syranez] for the patch
+- PEAR and Squiz FunctionComment sniffs now support variadic functions (request #841)
+
+### Fixed
+- Fixed bug #622 : Wrong detection of Squiz.CSS.DuplicateStyleDefinition with media queries
+- Fixed bug #752 : The missing exception error is reported in first found DocBlock
+- Fixed bug #794 : PSR2 MultiLineFunctionDeclaration forbids comments after opening parenthesis of a multiline call
+- Fixed bug #820 : PEAR/PSR2 FunctionCallSignature sniffs suggest wrong indent when there are multiple arguments on a line
+- Fixed bug #822 : Ruleset hard-coded file paths are not used if not running from the same directory as the ruleset
+- Fixed bug #825 : FunctionCallArgumentSpacing sniff complains about more than one space before comment in multi-line function call
+- Fixed bug #828 : Null classname is tokenized as T_NULL instead of T_STRING
+- Fixed bug #829 : Short array argument not fixed correctly when multiple function arguments are on the same line
+- Fixed bug #831 : PHPCS freezes in an infinite loop under Windows if no standard is passed
+- Fixed bug #832 : Tokenizer does not support context sensitive parsing
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #835 : PEAR.Functions.FunctionCallSignature broken when closure uses return types
+- Fixed bug #838 : CSS indentation fixer changes color codes
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Fixed bug #839 : "__()" method is marked as not camel caps
+ - Thanks to [Tim Bezhashvyly][@tim-bezhashvyly] for the patch
+- Fixed bug #852 : Generic.Commenting.DocComment not finding errors when long description is omitted
+- Fixed bug #854 : Return typehints in interfaces are not reported as T_RETURN_TYPE
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #855 : Capital letter detection for multibyte strings doesn't work correctly
+- Fixed bug #857 : PSR2.ControlStructure.SwitchDeclaration shouldn't check indent of curly brace closers
+- Fixed bug #859 : Switch statement indention issue when returning function call with closure
+- Fixed bug #861 : Single-line arrays and function calls can generate incorrect indentation errors
+- Fixed bug #867 : Squiz.Strings.DoubleQuoteUsage broken for some escape codes
+ - Thanks to [Jack Blower][@ElvenSpellmaker] for the help with the fix
+- Fixed bug #21005 : Incorrect indent detection when multiple properties are initialized to arrays
+- Fixed bug #21010 : Incorrect missing colon detection in CSS when first style is not on new line
+- Fixed bug #21011 : Incorrect error message text when newline found after opening brace
+
+## [2.5.0] - 2015-12-11
+### Changed
+- PHPCS will now look for a phpcs.xml file in parent directories as well as the current directory (request #626)
+- PHPCS will now use a phpcs.xml file even if files are specified on the command line
+ - This file is still only used if no standard is specified on the command line
+- Added support for a phpcs.xml.dist file (request #583)
+ - If both a phpcs.xml and phpcs.xml.dist file are present, the phpcs.xml file will be used
+- Added support for setting PHP ini values in ruleset.xml files (request #560)
+ - Setting the value of the new ini tags to name="memory_limit" value="32M" is the same as -d memory_limit=32M
+- Added support for one or more bootstrap files to be run before processing begins
+ - Use the --bootstrap=file,file,file command line argument to include bootstrap files
+ - Useful if you want to override some of the high-level settings of PHPCS or PHPCBF
+ - Thanks to [John Maguire][@johnmaguire] for the patch
+- Added additional verbose output for CSS tokenizing
+- Squiz ComparisonOperatorUsageSniff now checks FOR, WHILE and DO-WHILE statements
+ - Thanks to [Arnout Boks][@aboks] for the patch
+
+### Fixed
+- Fixed bug #660 : Syntax checks can fail on Windows with PHP5.6
+- Fixed bug #784 : $this->trait is seen as a T_TRAIT token
+- Fixed bug #786 : Switch indent issue with short array notation
+- Fixed bug #787 : SpacingAfterDefaultBreak confused by multi-line statements
+- Fixed bug #797 : Parsing CSS url() value breaks further parsing
+- Fixed bug #805 : Squiz.Commenting.FunctionComment.InvalidTypeHint on Scalar types on PHP7
+- Fixed bug #807 : Cannot fix line endings when open PHP tag is not on the first line
+- Fixed bug #808 : JS tokeniser incorrectly setting some function and class names to control structure tokens
+- Fixed bug #809 : PHPCBF can break a require_once statement with a space before the open parenthesis
+- Fixed bug #813 : PEAR FunctionCallSignature checks wrong indent when first token on line is part of a multi-line string
+
+## [2.4.0] - 2015-11-24
+### Changed
+- Added support for PHP 7 anonymous classes
+ - Anonymous classes are now tokenized as T_ANON_CLASS and ignored by normal class sniffs
+- Added support for PHP 7 function return type declarations
+ - Return types are now tokenized as T_RETURN_TYPE
+- Fixed tokenizing of the XOR operator, which was incorrectly identified as a power operator (bug #765)
+ - The T_POWER token has been removed and replaced by the T_BITWISE_XOR token
+ - The PHP-supplied T_POW token has been replicated for PHP versions before 5.6
+- Traits are now tokenized in PHP versions before 5.4 to make testing easier
+- Improved regular expression detection in JS files
+- PEAR FunctionCallSignatureSniff now properly detects indents in more mixed HTML/PHP code blocks
+- Full report now properly indents lines when newlines are found inside error messages
+- Generating documentation without specifying a standard now uses the default standard instead
+ - Thanks to [Ken Guest][@kenguest] for the patch
+- Generic InlineControlStructureSniff now supports braceless do/while loops in JS
+ - Thanks to [Pieter Frenssen][@pfrenssen] for the patch
+- Added more guard code for function declarations with syntax errors
+ - Thanks to Yun Young-jin for the patch
+- Added more guard code for foreach declarations with syntax errors
+ - Thanks to [Johan de Ruijter][@johanderuijter] for the patch
+- Added more guard code for class declarations with syntax errors
+- Squiz ArrayDeclarationSniff now has guard code for arrays with syntax errors
+- Generic InlineControlStructureSniff now correctly fixes ELSEIF statements
+
+### Fixed
+- Fixed bug #601 : Expected type hint int[]; found array in Squiz FunctionCommentSniff
+ - Thanks to [Scato Eggen][@scato] for the patch
+- Fixed bug #625 : Consider working around T_HASHBANG in HHVM 3.5.x and 3.6.x
+ - Thanks to [Kunal Mehta][@legoktm] for the patch
+- Fixed bug #692 : Comment tokenizer can break when using mbstring function overloading
+- Fixed bug #694 : Long sniff codes can cause PHP warnings in source report when showing error codes
+- Fixed bug #698 : PSR2.Methods.FunctionCallSignature.Indent forces exact indent of ternary operator parameters
+- Fixed bug #704 : ScopeIndent can fail when an opening parenthesis is on a line by itself
+- Fixed bug #707 : Squiz MethodScopeSniff doesn't handle nested functions
+- Fixed bug #709 : Squiz.Sniffs.Whitespace.ScopeClosingBraceSniff marking indented endif in mixed inline HTML blocks
+- Fixed bug #711 : Sniffing from STDIN shows Generic.Files.LowercasedFilename.NotFound error
+- Fixed bug #714 : Fixes suppression of errors using docblocks
+ - Thanks to [Andrzej Karmazyn][@akarmazyn] for the patch
+- Fixed bug #716 : JSON report is invalid when messages contain newlines or tabs
+ - Thanks to [Pieter Frenssen][@pfrenssen] for the patch
+- Fixed bug #723 : ScopeIndent can fail when multiple array closers are on the same line
+- Fixed bug #730 : ScopeIndent can fail when a short array opening square bracket is on a line by itself
+- Fixed bug #732 : PHP Notice if @package name is made up of all invalid characters
+ - Adds new error code PEAR.Commenting.FileComment.InvalidPackageValue
+- Fixed bug #748 : Auto fix for Squiz.Commenting.BlockComment.WrongEnd is incorrect
+ - Thanks to [J.D. Grimes][@JDGrimes] for the patch
+- Fixed bug #753 : PSR2 standard shouldn't require space after USE block when next code is a closing tag
+- Fixed bug #768 : PEAR FunctionCallSignature sniff forbids comments after opening parenthesis of a multiline call
+- Fixed bug #769 : Incorrect detection of variable reference operator when used with short array syntax
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Fixed bug #772 : Syntax error when using PHPCBF on alternative style foreach loops
+- Fixed bug #773 : Syntax error when stripping trailing PHP close tag and previous statement has no semicolon
+- Fixed bug #778 : PHPCBF creates invalid PHP for inline FOREACH containing multiple control structures
+- Fixed bug #781 : Incorrect checking for PHP7 return types on multi-line function declarations
+- Fixed bug #782 : Conditional function declarations cause fixing conflicts in Squiz standard
+ - Squiz.ControlStructures.ControlSignature no longer enforces a single newline after open brace
+ - Squiz.WhiteSpace.ControlStructureSpacing can be used to check spacing at the start/end of control structures
+
+## [2.3.4] - 2015-09-09
+### Changed
+- JSON report format now includes the fixable status for each error message and the total number of fixable errors
+- Added more guard code for function declarations with syntax errors
+- Added tokenizer support for the PHP declare construct
+ - Thanks to [Andy Blyler][@ablyler] for the patch
+- Generic UnnecessaryStringConcatSniff can now allow strings concatenated over multiple lines
+ - Set the allowMultiline property to TRUE (default is FALSE) in your ruleset.xml file to enable this
+ - By default, concat used only for getting around line length limits still generates an error
+ - Thanks to [Stefan Lenselink][@stefanlenselink] for the contribution
+- Invalid byte sequences no longer throw iconv_strlen() errors (request #639)
+ - Thanks to [Willem Stuursma][@willemstuursma] for the patch
+- Generic TodoSniff and FixmeSniff are now better at processing strings with invalid characters
+- PEAR FunctionCallSignatureSniff now ignores indentation of inline HTML content
+- Squiz ControlSignatureSniff now supports control structures with only inline HTML content
+
+### Fixed
+- Fixed bug #636 : Some class names cause CSS tokenizer to hang
+- Fixed bug #638 : VCS blame reports output error content from the blame commands for files not under VC
+- Fixed bug #642 : Method params incorrectly detected when default value uses short array syntax
+ - Thanks to [Josh Davis][@joshdavis11] for the patch
+- Fixed bug #644 : PEAR ScopeClosingBrace sniff does not work with mixed HTML/PHP
+- Fixed bug #645 : FunctionSignature and ScopeIndent sniffs don't detect indents correctly when PHP open tag is not on a line by itself
+- Fixed bug #648 : Namespace not tokenized correctly when followed by multiple use statements
+- Fixed bug #654 : Comments affect indent check for BSDAllman brace style
+- Fixed bug #658 : Squiz.Functions.FunctionDeclarationSpacing error for multi-line declarations with required spaces greater than zero
+ - Thanks to [J.D. Grimes][@JDGrimes] for the patch
+- Fixed bug #663 : No space after class name generates: Class name "" is not in camel caps format
+- Fixed bug #667 : Scope indent check can go into infinite loop due to some parse errors
+- Fixed bug #670 : Endless loop in PSR1 SideEffects sniffer if no semicolon after last statement
+ - Thanks to [Thomas Jarosch][@thomasjfox] for the patch
+- Fixed bug #672 : Call-time pass-by-reference false positive
+- Fixed bug #683 : Comments are incorrectly reported by PSR2.ControlStructures.SwitchDeclaration sniff
+- Fixed bug #687 : ScopeIndent does not check indent correctly for method prefixes like public and abstract
+- Fixed bug #689 : False error on some comments after class closing brace
+
+## [2.3.3] - 2015-06-24
+### Changed
+- Improved the performance of the CSS tokenizer, especially on very large CSS files (thousands of lines)
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Defined tokens for lower PHP versions are now phpcs-specific strings instead of ints
+ - Stops conflict with other projects, like PHP_CodeCoverage
+- Added more guard code for syntax errors to various sniffs
+- Improved support for older HHVM versions
+ - Thanks to [Kunal Mehta][@legoktm] for the patch
+- Squiz ValidLogicalOperatorsSniff now ignores XOR as type casting is different when using the ^ operator (request #567)
+- Squiz CommentedOutCodeSniff is now better at ignoring URLs inside comments
+- Squiz ControlSignatureSniff is now better at checking embedded PHP code
+- Squiz ScopeClosingBraceSniff is now better at checking embedded PHP code
+
+### Fixed
+- Fixed bug #584 : Squiz.Arrays.ArrayDeclaration sniff gives incorrect NoComma error for multiline string values
+- Fixed bug #589 : PEAR.Functions.FunctionCallSignature sniff not checking all function calls
+- Fixed bug #592 : USE statement tokenising can sometimes result in mismatched scopes
+- Fixed bug #594 : Tokenizer issue on closure that returns by reference
+- Fixed bug #595 : Colons in CSS selectors within media queries throw false positives
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Fixed bug #598 : PHPCBF can break function/use closure brace placement
+- Fixed bug #603 : Squiz ControlSignatureSniff hard-codes opener type while fixing
+- Fixed bug #605 : Auto report-width specified in ruleset.xml ignored
+- Fixed bug #611 : Invalid numeric literal on CSS files under PHP7
+- Fixed bug #612 : Multi-file diff generating incorrectly if files do not end with EOL char
+- Fixed bug #615 : Squiz OperatorBracketSniff incorrectly reports and fixes operations using self::
+- Fixed bug #616 : Squiz DisallowComparisonAssignmentSniff inconsistent errors with inline IF statements
+- Fixed bug #617 : Space after switch keyword in PSR-2 is not being enforced
+- Fixed bug #621 : PSR2 SwitchDeclaration sniff doesn't detect, or correctly fix, case body on same line as statement
+
+## [2.3.2] - 2015-04-29
+### Changed
+- The error message for PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase is now clearer (request #579)
+
+### Fixed
+- Fixed bug #545 : Long list of CASE statements can cause tokenizer to reach a depth limit
+- Fixed bug #565 : Squiz.WhiteSpace.OperatorSpacing reports negative number in short array
+ - Thanks to [Vašek Purchart][@VasekPurchart] for the patch
+ - Same fix also applied to Squiz.Formatting.OperatorBracket
+- Fixed bug #569 : Generic ScopeIndentSniff throws PHP notices in JS files
+- Fixed bug #570 : Phar class fatals in PHP less than 5.3
+
+## [2.3.1] - 2015-04-23
+### Changed
+- PHPCS can now exit with 0 even if errors are found
+ - Set the ignore_errors_on_exit config variable to 1 to set this behaviour
+ - Use with the ignore_warnings_on_exit config variable to never return a non-zero exit code
+- Added Generic DisallowLongArraySyntaxSniff to enforce the use of the PHP short array syntax (request #483)
+ - Thanks to [Xaver Loppenstedt][@xalopp] for helping with tests
+- Added Generic DisallowShortArraySyntaxSniff to ban the use of the PHP short array syntax (request #483)
+ - Thanks to [Xaver Loppenstedt][@xalopp] for helping with tests
+- Generic ScopeIndentSniff no longer does exact checking for content inside parenthesis (request #528)
+ - Only applies to custom coding standards that set the "exact" flag to TRUE
+- Squiz ConcatenationSpacingSniff now has a setting to ignore newline characters around operators (request #511)
+ - Default remains FALSE, so newlines are not allowed
+ - Override the "ignoreNewlines" setting in a ruleset.xml file to change
+- Squiz InlineCommentSniff no longer checks the last char of a comment if the first char is not a letter (request #505)
+- The Squiz standard has increased the max padding for statement alignment from 12 to 20
+
+### Fixed
+- Fixed bug #479 : Yielded values are not recognised as returned values in Squiz FunctionComment sniff
+- Fixed bug #512 : Endless loop whilst parsing mixture of control structure styles
+- Fixed bug #515 : Spaces in JS block incorrectly flagged as indentation error
+- Fixed bug #523 : Generic ScopeIndent errors for IF in FINALLY
+- Fixed bug #527 : Closure inside IF statement is not tokenized correctly
+- Fixed bug #529 : Squiz.Strings.EchoedStrings gives false positive when echo'ing using an inline condition
+- Fixed bug #537 : Using --config-set is breaking phpcs.phar
+- Fixed bug #543 : SWITCH with closure in condition generates inline control structure error
+- Fixed bug #551 : Multiple catch blocks not checked in Squiz.ControlStructures.ControlSignature sniff
+- Fixed bug #554 : ScopeIndentSniff causes errors when encountering an unmatched parenthesis
+- Fixed bug #558 : PHPCBF adds brace for ELSE IF split over multiple lines
+- Fixed bug #564 : Generic MultipleStatementAlignment sniff reports incorrect errors for multiple assignments on a single line
+
+## [2.3.0] - 2015-03-04
+### Changed
+- The existence of the main config file is now cached to reduce is_file() calls when it doesn't exist (request #486)
+- Abstract classes inside the Sniffs directory are now ignored even if they are named [Name]Sniff.php (request #476)
+ - Thanks to [David Vernet][@Decave] for the patch
+- PEAR and Squiz FileComment sniffs no longer have @ in their error codes
+ - e.g., PEAR.Commenting.FileComment.Duplicate@categoryTag becomes PEAR.Commenting.FileComment.DuplicateCategoryTag
+ - e.g., Squiz.Commenting.FileComment.Missing@categoryTag becomes Squiz.Commenting.FileComment.MissingCategoryTag
+- PEAR MultiLineConditionSniff now allows comment lines inside multi-line IF statement conditions
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Generic ForbiddenFunctionsSniff now supports setting null replacements in ruleset files (request #263)
+- Generic opening function brace sniffs now support checking of closures
+ - Set the checkClosures property to TRUE (default is FALSE) in your ruleset.xml file to enable this
+ - Can also set the checkFunctions property to FALSE (default is TRUE) in your ruleset.xml file to only check closures
+ - Affects OpeningFunctionBraceBsdAllmanSniff and OpeningFunctionBraceKernighanRitchieSniff
+- Generic OpeningFunctionBraceKernighanRitchieSniff can now fix all the errors it finds
+- Generic OpeningFunctionBraceKernighanRitchieSniff now allows empty functions with braces next to each other
+- Generic OpeningFunctionBraceBsdAllmanSniff now allows empty functions with braces next to each other
+- Improved auto report width for the "full" report
+- Improved conflict detection during auto fixing
+- Generic ScopeIndentSniff is no longer confused by empty closures
+- Squiz ControlSignatureSniff now always ignores comments (fixes bug #490)
+ - Include the Squiz.Commenting.PostStatementComment sniff in your ruleset.xml to ban these comments again
+- Squiz OperatorSpacingSniff no longer throws errors for code in the form ($foo || -1 === $bar)
+- Fixed errors tokenizing T_ELSEIF tokens on HHVM 3.5
+- Squiz ArrayDeclarationSniff is no longer tricked by comments after array values
+- PEAR IncludingFileSniff no longer produces invalid code when removing parenthesis from require/include statements
+
+### Fixed
+- Fixed bug #415 : The @codingStandardsIgnoreStart has no effect during fixing
+- Fixed bug #432 : Properties of custom sniffs cannot be configured
+- Fixed bug #453 : PSR2 standard does not allow closing tag for mixed PHP/HTML files
+- Fixed bug #457 : FunctionCallSignature sniffs do not support here/nowdoc syntax and can cause syntax error when fixing
+- Fixed bug #466 : PropertyLabelSpacing JS fixer issue when there is no space after colon
+- Fixed bug #473 : Writing a report for an empty folder to existing file includes the existing contents
+- Fixed bug #485 : PHP notice in Squiz.Commenting.FunctionComment when checking malformed @throws comment
+- Fixed bug #491 : Generic InlineControlStructureSniff can correct with missing semicolon
+ - Thanks to [Jesse Donat][@donatj] for the patch
+- Fixed bug #492 : Use statements don't increase the scope indent
+- Fixed bug #493 : PSR1_Sniffs_Methods_CamelCapsMethodNameSniff false positives for some magic method detection
+ - Thanks to [Andreas Möller][@localheinz] for the patch
+- Fixed bug #496 : Closures in PSR2 are not checked for a space after the function keyword
+- Fixed bug #497 : Generic InlineControlStructureSniff does not support alternative SWITCH syntax
+- Fixed bug #500 : Functions not supported as values in Squiz ArrayDeclaration sniff
+- Fixed bug #501 : ScopeClosingBrace and ScopeIndent conflict with closures used as array values
+ - Generic ScopeIndentSniff may now report fewer errors for closures, but perform the same fixes
+- Fixed bug #502 : PSR1 SideEffectsSniff sees declare() statements as side effects
+
+## [2.2.0] - 2015-01-22
+### Changed
+- Added (hopefully) tastefully used colors to report and progress output for the phpcs command
+ - Use the --colors command line argument to use colors in output
+ - Use the command "phpcs --config-set colors true" to turn colors on by default
+ - Use the --no-colors command line argument to turn colors off when the config value is set
+- Added support for using the full terminal width for report output
+ - Use the --report-width=auto command line argument to auto-size the reports
+ - Use the command "phpcs --config-set report_width auto" to use auto-sizing by default
+- Reports will now size to fit inside the report width setting instead of always using padding to fill the space
+- If no files or standards are specified, PHPCS will now look for a phpcs.xml file in the current directory
+ - This file has the same format as a standard ruleset.xml file
+ - The phpcs.xml file should specify (at least) files to process and a standard/sniffs to use
+ - Useful for running the phpcs and phpcbf commands without any arguments at the top of a repository
+- Default file paths can now be specified in a ruleset.xml file using the "file" tag
+ - File paths are only processed if no files were specified on the command line
+- Extensions specified on the CLI are now merged with those set in ruleset.xml files
+ - Previously, the ruleset.xml file setting replaced the CLI setting completely
+- Squiz coding standard now requires lowercase PHP constants (true, false and null)
+ - Removed Squiz.NamingConventions.ConstantCase sniff as the rule is now consistent across PHP and JS files
+- Squiz FunctionOpeningBraceSpaceSniff no longer does additional checks for JS functions
+ - PHP and JS functions and closures are now treated the same way
+- Squiz MultiLineFunctionDeclarationSniff now supports JS files
+- Interactive mode no longer breaks if you also specify a report type on the command line
+- PEAR InlineCommentSniff now fixes the Perl-style comments that it finds (request #375)
+- PSR2 standard no longer fixes the placement of docblock open tags as comments are excluded from this standard
+- PSR2 standard now sets a default tab width of 4 spaces
+- Generic DocCommentSniff now only disallows lowercase letters at the start of a long/short comment (request #377)
+ - All non-letter characters are now allowed, including markdown special characters and numbers
+- Generic DisallowMultipleStatementsSniff now allows multiple open/close tags on the same line (request #423)
+- Generic CharacterBeforePHPOpeningTagSniff now only checks the first PHP tag it finds (request #423)
+- Generic CharacterBeforePHPOpeningTagSniff now allows a shebang line at the start of the file (request #20481)
+- Generic InlineHTMLUnitTest now allows a shebang line at the start of the file (request #20481)
+- PEAR ObjectOperatorIndentSniff now only checks object operators at the start of a line
+- PEAR FileComment and ClassComment sniffs no longer have @ in their error codes
+ - E.g., PEAR.Commenting.FileComment.Missing@categoryTag becomes PEAR.Commenting.FileComment.MissingCategoryTag
+ - Thanks to [Grzegorz Rygielski][@grzr] for the patch
+- Squiz ControlStructureSpacingSniff no longer enforces a blank line before CATCH statements
+- Squiz FunctionCommentSniff now fixes the return type in the @return tag (request #392)
+- Squiz BlockCommentSniff now only disallows lowercase letters at the start of the comment
+- Squiz InlineCommentSniff now only disallows lowercase letters at the start of the comment
+- Squiz OperatorSpacingSniff now has a setting to ignore newline characters around operators (request #348)
+ - Default remains FALSE, so newlines are not allowed
+ - Override the "ignoreNewlines" setting in a ruleset.xml file to change
+- PSR2 ControlStructureSpacingSniff now checks for, and fixes, newlines after the opening parenthesis
+- Added a markdown document generator (--generator=markdown to use)
+ - Thanks to [Stefano Kowalke][@Konafets] for the contribution
+
+### Fixed
+- Fixed bug #379 : Squiz.Arrays.ArrayDeclaration.NoCommaAfterLast incorrectly detects comments
+- Fixed bug #382 : JS tokenizer incorrect for inline conditionally created immediately invoked anon function
+- Fixed bug #383 : Squiz.Arrays.ArrayDeclaration.ValueNoNewline incorrectly detects nested arrays
+- Fixed bug #386 : Undefined offset in Squiz.FunctionComment sniff when param has no comment
+- Fixed bug #390 : Indentation of non-control structures isn't adjusted when containing structure is fixed
+- Fixed bug #400 : InlineControlStructureSniff fails to fix when statement has no semicolon
+- Fixed bug #401 : PHPCBF no-patch option shows an error when there are no fixable violations in a file
+- Fixed bug #405 : The "Squiz.WhiteSpace.FunctionSpacing" sniff removes class "}" during fixing
+- Fixed bug #407 : PEAR.ControlStructures.MultiLineCondition doesn't account for comments at the end of lines
+- Fixed bug #410 : The "Squiz.WhiteSpace.MemberVarSpacing" not respecting "var"
+- Fixed bug #411 : Generic.WhiteSpace.ScopeIndent.Incorrect - false positive with multiple arrays in argument list
+- Fixed bug #412 : PSR2 multi-line detection doesn't work for inline IF and string concats
+- Fixed bug #414 : Squiz.WhiteSpace.MemberVarSpacing - inconsistent checking of member vars with comment
+- Fixed bug #433 : Wrong detection of Squiz.Arrays.ArrayDeclaration.KeyNotAligned when key contains space
+- Fixed bug #434 : False positive for spacing around "=>" in inline array within foreach
+- Fixed bug #452 : Ruleset exclude-pattern for specific sniff code ignored when using CLI --ignore option
+- Fixed bug #20482 : Scope indent sniff can get into infinite loop when processing a parse error
+
+## [2.1.0] - 2014-12-18
+### Changed
+- Time and memory output is now shown if progress information is also shown (request #335)
+- A tilde can now be used to reference a user's home directory in a path to a standard (request #353)
+- Added PHP_CodeSniffer_File::findStartOfStatement() to find the first non-whitespace token in a statement
+ - Possible alternative for code using PHP_CodeSniffer_File::findPrevious() with the local flag set
+- Added PHP_CodeSniffer_File::findEndOfStatement() to find the last non-whitespace token in a statement
+ - Possible alternative for code using PHP_CodeSniffer_File::findNext() with the local flag set
+- Generic opening function brace sniffs now ensure the opening brace is the last content on the line
+ - Affects OpeningFunctionBraceBsdAllmanSniff and OpeningFunctionBraceKernighanRitchieSniff
+ - Also enforced in PEAR FunctionDeclarationSniff and Squiz MultiLineFunctionDeclarationSniff
+- Generic DisallowTabIndentSniff now replaces tabs everywhere it finds them, except in strings and here/now docs
+- Generic EmptyStatementSniff error codes now contain the type of empty statement detected (request #314)
+ - All messages generated by this sniff are now errors (empty CATCH was previously a warning)
+ - Message code Generic.CodeAnalysis.EmptyStatement.NotAllowed has been removed
+ - Message code Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning has been removed
+ - New message codes have the format Generic.CodeAnalysis.EmptyStatement.Detected[TYPE]
+ - Example code is Generic.CodeAnalysis.EmptyStatement.DetectedCATCH
+ - You can now use a custom ruleset to change messages to warnings and to exclude them
+- PEAR and Squiz FunctionCommentSniffs no longer ban @return tags for constructors and destructors
+ - Removed message PEAR.Commenting.FunctionComment.ReturnNotRequired
+ - Removed message Squiz.Commenting.FunctionComment.ReturnNotRequired
+ - Change initiated by request #324 and request #369
+- Squiz EmptyStatementSniff has been removed
+ - Squiz standard now includes Generic EmptyStatementSniff and turns off the empty CATCH error
+- Squiz ControlSignatureSniff fixes now retain comments between the closing parenthesis and open brace
+- Squiz SuperfluousWhitespaceSniff now checks for extra blank lines inside closures
+ - Thanks to [Sertan Danis][@sertand] for the patch
+- Squiz ArrayDeclarationSniff now skips function calls while checking multi-line arrays
+
+### Fixed
+- Fixed bug #337 : False positive with anonymous functions in Generic_Sniffs_WhiteSpace_ScopeIndentSniff
+- Fixed bug #339 : reformatting brace location can result in broken code
+- Fixed bug #342 : Nested ternary operators not tokenized correctly
+- Fixed bug #345 : Javascript regex not tokenized when inside array
+- Fixed bug #346 : PHP path can't be determined in some cases in "phpcs.bat" (on Windows XP)
+- Fixed bug #358 : False positives for Generic_Sniffs_WhiteSpace_ScopeIndentSniff
+- Fixed bug #361 : Sniff-specific exclude patterns don't work for Windows
+- Fixed bug #364 : Don't interpret "use function" as declaration
+- Fixed bug #366 : phpcbf with PSR2 errors on control structure alternative syntax
+- Fixed bug #367 : Nested Anonymous Functions Causing False Negative
+- Fixed bug #371 : Shorthand binary cast causes tokenizer errors
+ - New token T_BINARY_CAST added for the b"string" cast format (the 'b' is the T_BINARY_CAST token)
+- Fixed bug #372 : phpcbf parse problem, wrong brace placement for inline IF
+- Fixed bug #373 : Double quote usage fix removing too many double quotes
+- Fixed bug #20196 : 1.5.2 breaks scope_closer position
+
+## [2.0.0] - 2014-12-05
+### Changed
+- JS tokenizer now sets functions as T_CLOSUREs if the function is anonymous
+- JS tokenizer now sets all objects to T_OBJECT
+ - Object end braces are set to a new token T_CLOSE_OBJECT
+ - T_OBJECT tokens no longer act like scopes; i.e., they have no condition/opener/closer
+ - T_PROPERTY tokens no longer act like scopes; i.e., they have no condition/opener/closer
+ - T_OBJECT tokens have a bracket_closer instead, which can be used to find the ending
+ - T_CLOSE_OBJECT tokens have a bracket_opener
+- Improved regular expression detection in the JS tokenizer
+- You can now get PHP_CodeSniffer to ignore a single line by putting @codingStandardsIgnoreLine in a comment
+ - When the comment is found, the comment line and the following line will be ignored
+ - Thanks to [Andy Bulford][@abulford] for the contribution
+- PHPCBF now prints output when it is changing into directories
+- Improved conflict detection during auto fixing
+- The -vvv command line argument will now output the current file content for each loop during fixing
+- Generic ScopeIndentSniff now checks that open/close PHP tags are aligned to the correct column
+- PEAR FunctionCallSignatureSniff now checks indent of closing parenthesis even if it is not on a line by itself
+- PEAR FunctionCallSignatureSniff now supports JS files
+- PEAR MultiLineConditionSniff now supports JS files
+- Squiz DocCommentAlignmentSniff now supports JS files
+- Fixed a problem correcting the closing brace line in Squiz ArrayDeclarationSniff
+- Fixed a problem auto-fixing the Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose error
+- Squiz EmbeddedPhpSniff no longer reports incorrect alignment of tags when they are not on new lines
+- Squiz EmbeddedPhpSniff now aligns open tags correctly when moving them onto a new line
+- Improved fixing of arrays with multiple values in Squiz ArrayDeclarationSniff
+- Improved detection of function comments in Squiz FunctionCommentSpacingSniff
+- Improved fixing of lines after cases statements in Squiz SwitchDeclarationSniff
+
+### Fixed
+- Fixed bug #311 : Suppression of function prototype breaks checking of lines within function
+- Fixed bug #320 : Code sniffer indentation issue
+- Fixed bug #333 : Nested ternary operators causing problems
+
+## [1.5.6] - 2014-12-05
+### Changed
+- JS tokenizer now detects xor statements correctly
+- The --config-show command now pretty-prints the config values
+ - Thanks to [Ken Guest][@kenguest] for the patch
+- Setting and removing config values now catches exceptions if the config file is not writable
+ - Thanks to [Ken Guest][@kenguest] for the patch
+- Setting and removing config values now prints a message to confirm the action and show old values
+- You can now get PHP_CodeSniffer to ignore a single line by putting @codingStandardsIgnoreLine in a comment
+ - When the comment is found, the comment line and the following line will be ignored
+ - Thanks to [Andy Bulford][@abulford] for the contribution
+- Generic ConstructorNameSniff no longer errors for PHP4 style constructors when __construct() is present
+ - Thanks to [Thibaud Fabre][@fabre-thibaud] for the patch
+
+### Fixed
+- Fixed bug #280 : The --config-show option generates error when there is no config file
+- Fixed bug #306 : File containing only a namespace declaration raises undefined index notice
+- Fixed bug #308 : Squiz InlineIfDeclarationSniff fails on ternary operators inside closure
+- Fixed bug #310 : Variadics not recognized by tokenizer
+- Fixed bug #311 : Suppression of function prototype breaks checking of lines within function
+
+## [2.0.0RC4] - 2014-11-07
+### Changed
+- JS tokenizer now detects xor statements correctly
+- Improved detection of properties and objects in the JS tokenizer
+- Generic ScopeIndentSniff can now fix indents using tabs instead of spaces
+ - Set the tabIndent property to TRUE in your ruleset.xml file to enable this
+ - It is important to also set a tab-width setting, either in the ruleset or on the command line, for accuracy
+- Generic ScopeIndentSniff now checks and auto-fixes JS files
+- Generic DisallowSpaceIndentSniff is now able to replace space indents with tab indents during fixing
+- Support for phpcs-only and phpcbf-only attributes has been added to all ruleset.xml elements
+ - Allows parts of the ruleset to only apply when using a specific tool
+ - Useful for doing things like excluding indent fixes but still reporting indent errors
+- Unit tests can now set command line arguments during a test run
+ - Override getCliValues() and pass an array of CLI arguments for each file being tested
+- File-wide sniff properties can now be set using T_INLINE_HTML content during unit test runs
+ - Sniffs that start checking at the open tag can only, normally, have properties set using a ruleset
+- Generic ConstructorNameSniff no longer errors for PHP4 style constructors when __construct() is present
+ - Thanks to [Thibaud Fabre][@fabre-thibaud] for the patch
+- Generic DocCommentSniff now checks that the end comment tag is on a new line
+- Generic MultipleStatementAlignmentSniff no longer skips assignments for closures
+- Squiz DocCommentAlignment sniff now has better checking for single line doc block
+- Running unit tests with the -v CLI argument no longer generates PHP errors
+
+### Fixed
+- Fixed bug #295 : ScopeIndentSniff hangs when processing nested closures
+- Fixed bug #298 : False positive in ScopeIndentSniff when anonymous functions are used with method chaining
+- Fixed bug #302 : Fixing code in Squiz InlineComment sniff can remove some comment text
+- Fixed bug #303 : Open and close tag on same line can cause a PHP notice checking scope indent
+- Fixed bug #306 : File containing only a namespace declaration raises undefined index notice
+- Fixed bug #307 : Conditional breaks in case statements get incorrect indentations
+- Fixed bug #308 : Squiz InlineIfDeclarationSniff fails on ternary operators inside closure
+- Fixed bug #310 : Variadics not recognized by tokenizer
+
+## [2.0.0RC3] - 2014-10-16
+### Changed
+- Improved default output for PHPCBF and removed the options to print verbose and progress output
+- If a .fixed file is supplied for a unit test file, the auto fixes will be checked against it during testing
+ - See Generic ScopeIndentUnitTest.inc and ScopeIndentUnitTest.inc.fixed for an example
+- Fixer token replacement methods now return TRUE if the change was accepted and FALSE if rejected
+- The --config-show command now pretty-prints the config values
+ - Thanks to [Ken Guest][@kenguest] for the patch
+- Setting and removing config values now catches exceptions if the config file is not writable
+ - Thanks to [Ken Guest][@kenguest] for the patch
+- Setting and removing config values now prints a message to confirm the action and show old values
+- Generic ScopeIndentSniff has been completely rewritten to improve fixing and embedded PHP detection
+- Generic DisallowTabIndent and DisallowSpaceIndent sniffs now detect indents at the start of block comments
+- Generic DisallowTabIndent and DisallowSpaceIndent sniffs now detect indents inside multi-line strings
+- Generic DisallowTabIndentSniff now replaces tabs inside doc block comments
+- Squiz ControlStructureSpacingSniff error codes have been corrected; they were reversed
+- Squiz EmbeddedPhpSniff now checks open and close tag indents and fixes some errors
+- Squiz FileCommentSniff no longer throws incorrect blank line before comment errors in JS files
+- Squiz ClassDeclarationSniff now has better checking for blank lines after a closing brace
+- Removed error Squiz.Classes.ClassDeclaration.NoNewlineAfterCloseBrace (request #285)
+ - Already handled by Squiz.Classes.ClassDeclaration.CloseBraceSameLine
+
+### Fixed
+- Fixed bug #280 : The --config-show option generates error when there is no config file
+
+## [2.0.0RC2] - 2014-09-26
+### Changed
+- Minified JS and CSS files are now detected and skipped (fixes bug #252 and bug #19899)
+ - A warning will be added to the file so it can be found in the report and ignored in the future
+- Fixed incorrect length of JS object operator tokens
+- PHP tokenizer no longer converts class/function names to special tokens types
+ - Class/function names such as parent and true would become special tokens such as T_PARENT and T_TRUE
+- PHPCS can now exit with 0 if only warnings were found (request #262)
+ - Set the ignore_warnings_on_exit config variable to 1 to set this behaviour
+ - Default remains at exiting with 0 only if no errors and no warnings were found
+ - Also changes return value of PHP_CodeSniffer_Reporting::printReport()
+- Rulesets can now set associative array properties
+ - property name="[property]" type="array" value="foo=>bar,baz=>qux"
+- Generic ForbiddenFunctionsSniff now has a public property called forbiddenFunctions (request #263)
+ - Override the property in a ruleset.xml file to define forbidden functions and their replacements
+ - A replacement of NULL indicates that no replacement is available
+ - e.g., value="delete=>unset,print=>echo,create_function=>null"
+ - Custom sniffs overriding this one will need to change the visibility of their member var
+- Improved closure support in Generic ScopeIndentSniff
+- Improved indented PHP tag support in Generic ScopeIndentSniff
+- Improved fixing of mixed line indents in Generic ScopeIndentSniff
+- Added conflict detection to the file fixer
+ - If 2 sniffs look to be conflicting, one change will be ignored to allow a fix to occur
+- Generic CamelCapsFunctionNameSniff now ignores a single leading underscore
+ - Thanks to [Alex Slobodiskiy][@xt99] for the patch
+- Standards can now be located within hidden directories (further fix for bug #20323)
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Sniff ignore patterns now replace Win dir separators like file ignore patterns already did
+- Exclude patterns now use backtick delimiters, allowing all special characters to work correctly again
+ - Thanks to [Jeremy Edgell][@jedgell] for the patch
+- Errors converted to warnings in a ruleset (and vice versa) now retain their fixable status
+ - Thanks to [Alexander Obuhovich][@aik099] for the patch
+- Squiz ConcatenationSpacingSniff now has a setting to specify how many spaces there should around concat operators
+ - Default remains at 0
+ - Override the "spacing" setting in a ruleset.xml file to change
+- Added auto-fixes for Squiz InlineCommentSniff
+- Generic DocCommentSniff now correctly fixes additional blank lines at the end of a comment
+- Squiz OperatorBracketSniff now correctly fixes operations that include arrays
+- Zend ClosingTagSniff fix now correctly leaves closing tags when followed by HTML
+- Added Generic SyntaxSniff to check for syntax errors in PHP files
+ - Thanks to [Blaine Schmeisser][@bayleedev] for the contribution
+- Added Generic OneTraitPerFileSniff to check that only one trait is defined in each file
+ - Thanks to [Alexander Obuhovich][@aik099] for the contribution
+- Squiz DiscouragedFunctionsSniff now warns about var_dump()
+- PEAR ValidFunctionNameSniff no longer throws an error for _()
+- Squiz and PEAR FunctionCommentSniffs now support _()
+- Generic DisallowTabIndentSniff now checks for, and fixes, mixed indents again
+- Generic UpperCaseConstantSniff and LowerCaseConstantSniff now ignore function names
+
+### Fixed
+- Fixed bug #243 : Missing DocBlock not detected
+- Fixed bug #248 : FunctionCommentSniff expects ampersand on param name
+- Fixed bug #265 : False positives with type hints in ForbiddenFunctionsSniff
+- Fixed bug #20373 : Inline comment sniff tab handling way
+- Fixed bug #20377 : Error when trying to execute phpcs with report=json
+- Fixed bug #20378 : Report appended to existing file if no errors found in run
+- Fixed bug #20381 : Invalid "Comment closer must be on a new line"
+ - Thanks to [Brad Kent][@bkdotcom] for the patch
+- Fixed bug #20402 : SVN pre-commit hook fails due to unknown argument error
+
+## [1.5.5] - 2014-09-25
+### Changed
+- PHP tokenizer no longer converts class/function names to special tokens types
+ - Class/function names such as parent and true would become special tokens such as T_PARENT and T_TRUE
+- Improved closure support in Generic ScopeIndentSniff
+- Improved indented PHP tag support in Generic ScopeIndentSniff
+- Generic CamelCapsFunctionNameSniff now ignores a single leading underscore
+ - Thanks to [Alex Slobodiskiy][@xt99] for the patch
+- Standards can now be located within hidden directories (further fix for bug #20323)
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Added Generic SyntaxSniff to check for syntax errors in PHP files
+ - Thanks to [Blaine Schmeisser][@bayleedev] for the contribution
+- Squiz DiscouragedFunctionsSniff now warns about var_dump()
+- PEAR ValidFunctionNameSniff no longer throws an error for _()
+- Squiz and PEAR FunctionCommentSnif now support _()
+- Generic UpperCaseConstantSniff and LowerCaseConstantSniff now ignore function names
+
+### Fixed
+- Fixed bug #248 : FunctionCommentSniff expects ampersand on param name
+- Fixed bug #265 : False positives with type hints in ForbiddenFunctionsSniff
+- Fixed bug #20373 : Inline comment sniff tab handling way
+- Fixed bug #20378 : Report appended to existing file if no errors found in run
+- Fixed bug #20381 : Invalid "Comment closer must be on a new line"
+ - Thanks to [Brad Kent][@bkdotcom] for the patch
+- Fixed bug #20386 : Squiz.Commenting.ClassComment.SpacingBefore thrown if first block comment
+
+## [2.0.0RC1] - 2014-08-06
+### Changed
+- PHPCBF will now fix incorrect newline characters in a file
+- PHPCBF now exists cleanly when there are no errors to fix
+- Added phpcbf.bat file for Windows
+- Verbose option no longer errors when using a phar file with a space in the path
+- Fixed a reporting error when using HHVM
+ - Thanks to [Martins Sipenko][@martinssipenko] for the patch
+- addFixableError() and addFixableWarning() now only return true if the fixer is enabled
+ - Saves checking ($phpcsFile->fixer->enabled === true) before every fix
+- Added addErrorOnLine() and addWarningOnLine() to add a non-fixable violation to a line at column 1
+ - Useful if you are generating errors using an external tool or parser and only know line numbers
+ - Thanks to [Ondřej Mirtes][@ondrejmirtes] for the patch
+- CSS tokenizer now identifies embedded PHP code using the new T_EMBEDDED_PHP token type
+ - The entire string of PHP is contained in a single token
+- PHP tokenizer contains better detection of short array syntax
+- Unit test runner now also test any standards installed under the installed_paths config var
+- Exclude patterns now use {} delimiters, allowing the | special character to work correctly again
+- The filtering component of the --extensions argument is now ignored again when passing filenames
+ - Can still be used to specify a custom tokenizer for each extension when passing filenames
+ - If no tokenizer is specified, default values will be used for common file extensions
+- Diff report now produces relative paths on Windows, where possible (further fix for bug #20234)
+- If a token's content has been modified by the tab-width setting, it will now have an orig_content in the tokens array
+- Generic DisallowSpaceIndent and DisallowTabIndent sniffs now check original indent content even when tab-width is set
+ - Previously, setting --tab-width would force both to check the indent as spaces
+- Fixed a problem where PHPCBF could replace tabs with too many spaces when changing indents
+- Fixed a problem that could occur with line numbers when using HHVM to check files with Windows newline characters
+- Removed use of sys_get_temp_dir() as this is not supported by the min PHP version
+- Squiz ArrayDeclarationSniff now supports short array syntax
+- Squiz ControlSignatureSniff no longer uses the Abstract Pattern sniff
+ - If you are extending this sniff, you'll need to rewrite your code
+ - The rewrite allows this sniff to fix all control structure formatting issues it finds
+- The installed_paths config var now accepts relative paths
+ - The paths are relative to the PHP_CodeSniffer install directory
+ - Thanks to [Weston Ruter][@westonruter] for the patch
+- Generic ScopeIndentSniff now accounts for different open tag indents
+- PEAR FunctionDeclarationSniff now ignores short arrays when checking indent
+ - Thanks to [Daniel Tschinder][@danez] for the patch
+- PSR2 FunctionCallSignatureSniff now treats multi-line strings as a single-line argument, like arrays and closures
+ - Thanks to [Dawid Nowak][@MacDada] for the patch
+- PSR2 UseDeclarationSniff now checks for a single space after the USE keyword
+- Generic ForbiddenFunctionsSniff now detects calls to functions in the global namespace
+ - Thanks to [Ole Martin Handeland][@olemartinorg] for the patch
+- Generic LowerCaseConstantSniff and UpperCaseConstantSniff now ignore namespaces beginning with TRUE/FALSE/NULL
+ - Thanks to [Renan Gonçalves][@renan] for the patch
+- Squiz InlineCommentSniff no longer requires a blank line after post-statement comments (request #20299)
+- Squiz SelfMemberReferenceSniff now works correctly with namespaces
+- Squiz FunctionCommentSniff is now more relaxed when checking namespaced type hints
+- Tab characters are now encoded in abstract pattern errors messages
+ - Thanks to [Blaine Schmeisser][@bayleedev] for the patch
+- Invalid sniff codes passed to --sniffs now show a friendly error message (request #20313)
+- Generic LineLengthSniff now shows a warning if the iconv module is disabled (request #20314)
+- Source report no longer shows errors if category or sniff names ends in an uppercase error
+ - Thanks to [Jonathan Marcil][@jmarcil] for the patch
+
+### Fixed
+- Fixed bug #20261 : phpcbf has an endless fixing loop
+- Fixed bug #20268 : Incorrect documentation titles in PEAR documentation
+- Fixed bug #20296 : new array notion in function comma check fails
+- Fixed bug #20297 : phar does not work when renamed it to phpcs
+- Fixed bug #20307 : PHP_CodeSniffer_Standards_AbstractVariableSniff analyze traits
+- Fixed bug #20308 : Squiz.ValidVariableNameSniff - wrong variable usage
+- Fixed bug #20309 : Use "member variable" term in sniff "processMemberVar" method
+- Fixed bug #20310 : PSR2 does not check for space after function name
+- Fixed bug #20322 : Display rules set to type=error even when suppressing warnings
+- Fixed bug #20323 : PHPCS tries to load sniffs from hidden directories
+- Fixed bug #20346 : Fixer endless loop with Squiz.CSS sniffs
+- Fixed bug #20355 : No sniffs are registered with PHAR on Windows
+
+## [1.5.4] - 2014-08-06
+### Changed
+- Removed use of sys_get_temp_dir() as this is not supported by the min PHP version
+- The installed_paths config var now accepts relative paths
+ - The paths are relative to the PHP_CodeSniffer install directory
+ - Thanks to [Weston Ruter][@westonruter] for the patch
+- Generic ScopeIndentSniff now accounts for different open tag indents
+- PEAR FunctionDeclarationSniff now ignores short arrays when checking indent
+ - Thanks to [Daniel Tschinder][@danez] for the patch
+- PSR2 FunctionCallSignatureSniff now treats multi-line strings as a single-line argument, like arrays and closures
+ - Thanks to [Dawid Nowak][@MacDada] for the patch
+- Generic ForbiddenFunctionsSniff now detects calls to functions in the global namespace
+ - Thanks to [Ole Martin Handeland][@olemartinorg] for the patch
+- Generic LowerCaseConstantSniff and UpperCaseConstantSniff now ignore namespaces beginning with TRUE/FALSE/NULL
+ - Thanks to [Renan Gonçalves][@renan] for the patch
+- Squiz InlineCommentSniff no longer requires a blank line after post-statement comments (request #20299)
+- Squiz SelfMemberReferenceSniff now works correctly with namespaces
+- Tab characters are now encoded in abstract pattern errors messages
+ - Thanks to [Blaine Schmeisser][@bayleedev] for the patch
+- Invalid sniff codes passed to --sniffs now show a friendly error message (request #20313)
+- Generic LineLengthSniff now shows a warning if the iconv module is disabled (request #20314)
+- Source report no longer shows errors if category or sniff names ends in an uppercase error
+ - Thanks to [Jonathan Marcil][@jmarcil] for the patch
+
+### Fixed
+- Fixed bug #20268 : Incorrect documentation titles in PEAR documentation
+- Fixed bug #20296 : new array notion in function comma check fails
+- Fixed bug #20307 : PHP_CodeSniffer_Standards_AbstractVariableSniff analyze traits
+- Fixed bug #20308 : Squiz.ValidVariableNameSniff - wrong variable usage
+- Fixed bug #20309 : Use "member variable" term in sniff "processMemberVar" method
+- Fixed bug #20310 : PSR2 does not check for space after function name
+- Fixed bug #20322 : Display rules set to type=error even when suppressing warnings
+- Fixed bug #20323 : PHPCS tries to load sniffs from hidden directories
+
+## [2.0.0a2] - 2014-05-01
+### Changed
+- Added report type --report=info to show information about the checked code to make building a standard easier
+ - Checks a number of things, such as what line length you use, and spacing are brackets, but not everything
+ - Still highly experimental
+- Generic LineLengthSniff now shows warnings for long lines referring to licence and VCS information
+ - It previously ignored these lines, but at the expense of performance
+- Generic DisallowTabIndent and DisallowSpaceIndent sniffs no longer error when detecting mixed indent types
+ - Only the first type of indent found on a line (space or indent) is considered
+- Lots of little performance improvements that can add up to a substantial saving over large code bases
+ - Added a "length" array index to tokens so you don't need to call strlen() of them, or deal with encoding
+ - Can now use isset() to find tokens inside the PHP_CodeSniffer_Tokens static vars instead of in_array()
+- Custom reports can now specify a $recordErrors member var; this previously only worked for built-in reports
+ - When set to FALSE, error messages will not be recorded and only totals will be returned
+ - This can save significant memory while processing a large code base
+- Removed dependence on PHP_Timer
+- PHP tokenizer now supports DEFAULT statements opened with a T_SEMICOLON
+- The Squiz and PHPCS standards have increased the max padding for statement alignment from 8 to 12
+- Squiz EchoedStringsSniff now supports statements without a semicolon, such as PHP embedded in HTML
+- Squiz DoubleQuoteUsageSniff now properly replaces escaped double quotes when fixing a doubled quoted string
+- Improved detection of nested IF statements that use the alternate IF/ENDIF syntax
+- PSR1 CamelCapsMethodNameSniff now ignores magic methods
+ - Thanks to [Eser Ozvataf][@eser] for the patch
+- PSR1 SideEffectsSniff now ignores methods named define()
+- PSR1 and PEAR ClassDeclarationSniffs now support traits (request #20208)
+- PSR2 ControlStructureSpacingSniff now allows newlines before/after parentheses
+ - Thanks to [Maurus Cuelenaere][@mcuelenaere] for the patch
+- PSR2 ControlStructureSpacingSniff now checks TRY and CATCH statements
+- Squiz SuperfluousWhitespaceSniff now detects whitespace at the end of block comment lines
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Squiz LowercasePHPFunctionsSniff no longer reports errors for namespaced functions
+ - Thanks to [Max Galbusera][@maxgalbu] for the patch
+- Squiz SwitchDeclarationSniff now allows exit() as a breaking statement for case/default
+- Squiz ValidVariableNameSniff and Zend ValidVariableNameSniff now ignore additional PHP reserved vars
+ - Thanks to Mikuláš Dítě and Adrian Crepaz for the patch
+- Sniff code Squiz.WhiteSpace.MemberVarSpacing.After changed to Squiz.WhiteSpace.MemberVarSpacing.Incorrect (request #20241)
+
+### Fixed
+- Fixed bug #20200 : Invalid JSON produced with specific error message
+- Fixed bug #20204 : Ruleset exclude checks are case sensitive
+- Fixed bug #20213 : Invalid error, Inline IF must be declared on single line
+- Fixed bug #20225 : array_merge() that takes more than one line generates error
+- Fixed bug #20230 : Squiz ControlStructureSpacing sniff assumes specific condition formatting
+- Fixed bug #20234 : phpcbf patch command absolute paths
+- Fixed bug #20240 : Squiz block comment sniff fails when newline present
+- Fixed bug #20247 : The Squiz.WhiteSpace.ControlStructureSpacing sniff and do-while
+ - Thanks to [Alexander Obuhovich][@aik099] for the patch
+- Fixed bug #20248 : The Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff sniff and empty scope
+- Fixed bug #20252 : Unitialized string offset when package name starts with underscore
+
+## [1.5.3] - 2014-05-01
+### Changed
+- Improved detection of nested IF statements that use the alternate IF/ENDIF syntax
+- PHP tokenizer now supports DEFAULT statements opened with a T_SEMICOLON
+- PSR1 CamelCapsMethodNameSniff now ignores magic methods
+ - Thanks to [Eser Ozvataf][@eser] for the patch
+- PSR1 SideEffectsSniff now ignores methods named define()
+- PSR1 and PEAR ClassDeclarationSniffs now support traits (request #20208)
+- PSR2 ControlStructureSpacingSniff now allows newlines before/after parentheses
+ - Thanks to [Maurus Cuelenaere][@mcuelenaere] for the patch
+- Squiz LowercasePHPFunctionsSniff no longer reports errors for namespaced functions
+ - Thanks to [Max Galbusera][@maxgalbu] for the patch
+- Squiz SwitchDeclarationSniff now allows exit() as a breaking statement for case/default
+- Squiz ValidVariableNameSniff and Zend ValidVariableNameSniff now ignore additional PHP reserved vars
+ - Thanks to Mikuláš Dítě and Adrian Crepaz for the patch
+- Sniff code Squiz.WhiteSpace.MemberVarSpacing.After changed to Squiz.WhiteSpace.MemberVarSpacing.Incorrect (request #20241)
+
+### Fixed
+- Fixed bug #20200 : Invalid JSON produced with specific error message
+- Fixed bug #20204 : Ruleset exclude checks are case sensitive
+- Fixed bug #20213 : Invalid error, Inline IF must be declared on single line
+- Fixed bug #20225 : array_merge() that takes more than one line generates error
+- Fixed bug #20230 : Squiz ControlStructureSpacing sniff assumes specific condition formatting
+- Fixed bug #20240 : Squiz block comment sniff fails when newline present
+- Fixed bug #20247 : The Squiz.WhiteSpace.ControlStructureSpacing sniff and do-while
+ - Thanks to [Alexander Obuhovich][@aik099] for the patch
+- Fixed bug #20248 : The Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff sniff and empty scope
+- Fixed bug #20252 : Uninitialized string offset when package name starts with underscore
+
+## [2.0.0a1] - 2014-02-05
+### Changed
+- Added the phpcbf script to automatically fix many errors found by the phpcs script
+- Added report type --report=diff to show suggested changes to fix coding standard violations
+- The --report argument now allows for custom reports to be used
+ - Use the full path to your custom report class as the report name
+- The --extensions argument is now respected when passing filenames; not just with directories
+- The --extensions argument now allows you to specify the tokenizer for each extension
+ - e.g., --extensions=module/php,es/js
+- Command line arguments can now be set in ruleset files
+ - e.g., arg name="report" value="summary" (print summary report; same as --report=summary)
+ - e.g., arg value="sp" (print source and progress information; same as -sp)
+ - The -vvv, --sniffs, --standard and -l command line arguments cannot be set in this way
+- Sniff process() methods can not optionally return a token to ignore up to
+ - If returned, the sniff will not be executed again until the passed token is reached in the file
+ - Useful if you are looking for tokens like T_OPEN_TAG but only want to process the first one
+- Removed the comment parser classes and replaced it with a simple comment tokenizer
+ - T_DOC_COMMENT tokens are now tokenized into T_DOC_COMMENT_* tokens so they can be used more easily
+ - This change requires a significant rewrite of sniffs that use the comment parser
+ - This change requires minor changes to sniffs that listen for T_DOC_COMMENT tokens directly
+- Added Generic DocCommentSniff to check generic doc block formatting
+ - Removed doc block formatting checks from PEAR ClassCommentSniff
+ - Removed doc block formatting checks from PEAR FileCommentSniff
+ - Removed doc block formatting checks from PEAR FunctionCommentSniff
+ - Removed doc block formatting checks from Squiz ClassCommentSniff
+ - Removed doc block formatting checks from Squiz FileCommentSniff
+ - Removed doc block formatting checks from Squiz FunctionCommentSniff
+ - Removed doc block formatting checks from Squiz VariableCommentSniff
+- Squiz DocCommentAlignmentSniff has had its error codes changed
+ - NoSpaceBeforeTag becomes NoSpaceAfterStar
+ - SpaceBeforeTag becomes SpaceAfterStar
+ - SpaceBeforeAsterisk becomes SpaceBeforeStar
+- Generic MultipleStatementAlignment now aligns assignments within a block so they fit within their max padding setting
+ - The sniff previously requested the padding as 1 space if max padding was exceeded
+ - It now aligns the assignment with surrounding assignments if it can
+ - Removed property ignoreMultiline as multi-line assignments are now handled correctly and should not be ignored
+- Squiz FunctionClosingBraceSpaceSniff now requires a blank line before the brace in all cases except function args
+- Added error Squiz.Commenting.ClassComment.SpacingAfter to ensure there are no blank lines after a class comment
+- Added error Squiz.WhiteSpace.MemberVarSpacing.AfterComment to ensure there are no blank lines after a member var comment
+ - Fixes have also been corrected to not strip the member var comment or indent under some circumstances
+ - Thanks to [Mark Scherer][@dereuromark] for help with this fix
+- Added error Squiz.Commenting.FunctionCommentThrowTag.Missing to ensure a throw is documented
+- Removed error Squiz.Commenting.FunctionCommentThrowTag.WrongType
+- Content passed via STDIN can now specify the filename to use so that sniffs can run the correct filename checks
+ - Ensure the first line of the content is: phpcs_input_file: /path/to/file
+- Squiz coding standard now enforces no closing PHP tag at the end of a pure PHP file
+- Squiz coding standard now enforces a single newline character at the end of the file
+- Squiz ClassDeclarationSniff no longer checks for a PHP ending tag after a class definition
+- Squiz ControlStructureSpacingSniff now checks TRY and CATCH statements as well
+- Removed MySource ChannelExceptionSniff
+
+## [1.5.2] - 2014-02-05
+### Changed
+- Improved support for the PHP 5.5. classname::class syntax
+ - PSR2 SwitchDeclarationSniff no longer throws errors when this syntax is used in CASE conditions
+- Improved support for negative checks of instanceOf in Squiz ComparisonOperatorUsageSniff
+ - Thanks to [Martin Winkel][@storeman] for the patch
+- Generic FunctionCallArgumentSpacingSniff now longer complains about space before comma when using here/nowdocs
+ - Thanks to [Richard van Velzen][@rvanvelzen] for the patch
+- Generic LowerCaseConstantSniff and UpperCaseConstantSniff now ignore class constants
+ - Thanks to [Kristopher Wilson][@mrkrstphr] for the patch
+- PEAR FunctionCallSignatureSniff now has settings to specify how many spaces should appear before/after parentheses
+ - Override the 'requiredSpacesAfterOpen' and 'requiredSpacesBeforeClose' settings in a ruleset.xml file to change
+ - Default remains at 0 for both
+ - Thanks to [Astinus Eberhard][@Astinus-Eberhard] for the patch
+- PSR2 ControlStructureSpacingSniff now has settings to specify how many spaces should appear before/after parentheses
+ - Override the 'requiredSpacesAfterOpen' and 'requiredSpacesBeforeClose' settings in a ruleset.xml file to change
+ - Default remains at 0 for both
+ - Thanks to [Astinus Eberhard][@Astinus-Eberhard] for the patch
+- Squiz ForEachLoopDeclarationSniff now has settings to specify how many spaces should appear before/after parentheses
+ - Override the 'requiredSpacesAfterOpen' and 'requiredSpacesBeforeClose' settings in a ruleset.xml file to change
+ - Default remains at 0 for both
+ - Thanks to [Astinus Eberhard][@Astinus-Eberhard] for the patch
+- Squiz ForLoopDeclarationSniff now has settings to specify how many spaces should appear before/after parentheses
+ - Override the 'requiredSpacesAfterOpen' and 'requiredSpacesBeforeClose' settings in a ruleset.xml file to change
+ - Default remains at 0 for both
+ - Thanks to [Astinus Eberhard][@Astinus-Eberhard] for the patch
+- Squiz FunctionDeclarationArgumentSpacingSniff now has settings to specify how many spaces should appear before/after parentheses
+ - Override the 'requiredSpacesAfterOpen' and 'requiredSpacesBeforeClose' settings in a ruleset.xml file to change
+ - Default remains at 0 for both
+ - Thanks to [Astinus Eberhard][@Astinus-Eberhard] for the patch
+- Removed UnusedFunctionParameter, CyclomaticComplexity and NestingLevel from the Squiz standard
+- Generic FixmeSniff and TodoSniff now work correctly with accented characters
+
+### Fixed
+- Fixed bug #20145 : Custom ruleset preferences directory over installed standard
+- Fixed bug #20147 : phpcs-svn-pre-commit - no more default error report
+- Fixed bug #20151 : Problem handling "if(): ... else: ... endif;" syntax
+- Fixed bug #20190 : Invalid regex in Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff
+
+## [1.5.1] - 2013-12-12
+### Changed
+- Config values can now be set at runtime using the command line argument [--runtime-set key value]
+ - Runtime values are the same as config values, but are not written to the main config file
+ - Thanks to [Wim Godden][@wimg] for the patch
+- Config values can now be set in ruleset files
+ - e.g., config name="zend_ca_path" value="/path/to/ZendCodeAnalyzer"
+ - Can not be used to set config values that override command line values, such as show_warnings
+ - Thanks to [Jonathan Marcil][@jmarcil] for helping with the patch
+- Added a new installed_paths config value to allow for the setting of directories that contain standards
+ - By default, standards have to be installed into the CodeSniffer/Standards directory to be considered installed
+ - New config value allows a list of paths to be set in addition to this internal path
+ - Installed standards appear when using the -i arg, and can be referenced in rulesets using only their name
+ - Set paths by running: phpcs --config-set installed_paths /path/one,/path/two,...
+- PSR2 ClassDeclarationSniff now allows a list of extended interfaces to be split across multiple lines
+- Squiz DoubleQuoteUsageSniff now allows \b in double quoted strings
+- Generic ForbiddenFunctionsSniff now ignores object creation
+ - This is a further fix for bug #20100 : incorrect Function mysql() has been deprecated report
+
+### Fixed
+- Fixed bug #20136 : Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff and Traits
+- Fixed bug #20138 : Protected property underscore and camel caps issue (in trait with Zend)
+ - Thanks to [Gaetan Rousseau][@Naelyth] for the patch
+- Fixed bug #20139 : No report file generated on success
+
+## [1.5.0] - 2013-11-28
+### Changed
+- Doc generation is now working again for installed standards
+ - Includes a fix for limiting the docs to specific sniffs
+- Generic ScopeIndentSniff now allows for ignored tokens to be set via ruleset.xml files
+ - E.g., to ignore comments, override a property using:
+ - name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"
+- PSR2 standard now ignores comments when checking indentation rules
+- Generic UpperCaseConstantNameSniff no longer reports errors where constants are used (request #20090)
+ - It still reports errors where constants are defined
+- Individual messages can now be excluded in ruleset.xml files using the exclude tag (request #20091)
+ - Setting message severity to 0 continues to be supported
+- Squiz OperatorSpacingSniff no longer throws errors for the ?: short ternary operator
+ - Thanks to [Antoine Musso][@hashar] for the patch
+- Comment parser now supports non-English characters when splitting comment lines into words
+ - Thanks to [Nik Sun][@CandySunPlus] for the patch
+- Exit statements are now recognised as valid closers for CASE and DEFAULT blocks
+ - Thanks to [Maksim Kochkin][@ksimka] for the patch
+- PHP_CodeSniffer_CLI::process() can now be passed an incomplete array of CLI values
+ - Missing values will be set to the CLI defaults
+ - Thanks to [Maksim Kochkin][@ksimka] for the patch
+
+### Fixed
+- Fixed bug #20093 : Bug with ternary operator token
+- Fixed bug #20097 : CLI.php throws error in php 5.2
+- Fixed bug #20100 : incorrect Function mysql() has been deprecated report
+- Fixed bug #20119 : PHP warning: invalid argument to str_repeat() in SVN blame report with -s
+- Fixed bug #20123 : PSR2 complains about an empty second statement in for-loop
+- Fixed bug #20131 : PHP errors in svnblame report, if there are files not under version control
+- Fixed bug #20133 : Allow "HG: hg_id" as value for @version tag
+
+## [1.4.8] - 2013-11-26
+### Changed
+- Generic ScopeIndentSniff now allows for ignored tokens to be set via ruleset.xml files
+ - E.g., to ignore comments, override a property using:
+ - name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"
+- PSR2 standard now ignores comments when checking indentation rules
+- Squiz OperatorSpacingSniff no longer throws errors for the ?: short ternary operator
+ - Thanks to [Antoine Musso][@hashar] for the patch
+- Comment parser now supports non-English characters when splitting comment lines into words
+ - Thanks to [Nik Sun][@CandySunPlus] for the patch
+- Exit statements are now recognised as valid closers for CASE and DEFAULT blocks
+ - Thanks to [Maksim Kochkin][@ksimka] for the patch
+- PHP_CodeSniffer_CLI::process() can now be passed an incomplete array of CLI values
+ - Missing values will be set to the CLI defaults
+ - Thanks to [Maksim Kochkin][@ksimka] for the patch
+
+### Fixed
+- Fixed bug #20097 : CLI.php throws error in php 5.2
+- Fixed bug #20100 : incorrect Function mysql() has been deprecated report
+- Fixed bug #20119 : PHP warning: invalid argument to str_repeat() in SVN blame report with -s
+- Fixed bug #20123 : PSR2 complains about an empty second statement in for-loop
+- Fixed bug #20131 : PHP errors in svnblame report, if there are files not under version control
+- Fixed bug #20133 : Allow "HG: hg_id" as value for @version tag
+
+## [1.5.0RC4] - 2013-09-26
+### Changed
+- You can now restrict violations to individual sniff codes using the --sniffs command line argument
+ - Previously, this only restricted violations to an entire sniff and not individual messages
+ - If you have scripts calling PHP_CodeSniffer::process() or creating PHP_CodeSniffer_File objects, you must update your code
+ - The array of restrictions passed to PHP_CodeSniffer::process() must now be an array of sniff codes instead of class names
+ - The PHP_CodeSniffer_File::__construct() method now requires an array of restrictions to be passed
+- Doc generation is now working again
+- Progress information now shows the percentage complete at the end of each line
+- Added report type --report=junit to show the error list in a JUnit compatible format
+ - Thanks to [Oleg Lobach][@bladeofsteel] for the contribution
+- Added support for the PHP 5.4 callable type hint
+- Fixed problem where some file content could be ignored when checking STDIN
+- Version information is now printed when installed via composer or run from a Git clone (request #20050)
+- Added Squiz DisallowBooleanStatementSniff to ban boolean operators outside of control structure conditions
+- The CSS tokenizer is now more reliable when encountering 'list' and 'break' strings
+- Coding standard ignore comments can now appear instead doc blocks as well as inline comments
+ - Thanks to [Stuart Langley][@sjlangley] for the patch
+- Generic LineLengthSniff now ignores SVN URL and Head URL comments
+ - Thanks to [Karl DeBisschop][@kdebisschop] for the patch
+- PEAR MultiLineConditionSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- PEAR MultiLineAssignmentSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- PEAR FunctionDeclarationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- Squiz SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- Squiz CSS IndentationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Hugo Fonseca][@fonsecas72] for the patch
+- Squiz and MySource File and Function comment sniffs now allow all tags and don't require a particular licence
+- Squiz standard now allows lines to be 120 characters long before warning; up from 85
+- Squiz LowercaseStyleDefinitionSniff no longer throws errors for class names in nested style definitions
+- Squiz ClassFileNameSniff no longer throws errors when checking STDIN
+- Squiz CSS sniffs no longer generate errors for IE filters
+- Squiz CSS IndentationSniff no longer sees comments as blank lines
+- Squiz LogicalOperatorSpacingSniff now ignores whitespace at the end of a line
+- Squiz.Scope.MethodScope.Missing error message now mentions 'visibility' instead of 'scope modifier'
+ - Thanks to [Renat Akhmedyanov][@r3nat] for the patch
+- Added support for the PSR2 multi-line arguments errata
+- The PSR2 standard no longer throws errors for additional spacing after a type hint
+- PSR UseDeclarationSniff no longer throws errors for USE statements inside TRAITs
+
+### Fixed
+- Fixed cases where code was incorrectly assigned the T_GOTO_LABEL token when used in a complex CASE condition
+- Fixed bug #20026 : Check for multi-line arrays that should be single-line is slightly wrong
+ - Adds new error message for single-line arrays that end with a comma
+- Fixed bug #20029 : ForbiddenFunction sniff incorrectly recognizes methods in USE clauses
+- Fixed bug #20043 : Mis-interpretation of Foo::class
+- Fixed bug #20044 : PSR1 camelCase check does not ignore leading underscores
+- Fixed bug #20045 : Errors about indentation for closures with multi-line 'use' in functions
+- Fixed bug #20051 : Undefined index: scope_opener / scope_closer
+ - Thanks to [Anthon Pang][@robocoder] for the patch
+
+## [1.4.7] - 2013-09-26
+### Changed
+- Added report type --report=junit to show the error list in a JUnit compatible format
+ - Thanks to [Oleg Lobach][@bladeofsteel] for the contribution
+- Added support for the PHP 5.4 callable type hint
+- Fixed problem where some file content could be ignored when checking STDIN
+- Version information is now printed when installed via composer or run from a Git clone (request #20050)
+- The CSS tokenizer is now more reliable when encountering 'list' and 'break' strings
+- Coding standard ignore comments can now appear instead doc blocks as well as inline comments
+ - Thanks to [Stuart Langley][@sjlangley] for the patch
+- Generic LineLengthSniff now ignores SVN URL and Head URL comments
+ - Thanks to [Karl DeBisschop][@kdebisschop] for the patch
+- PEAR MultiLineConditionSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- PEAR MultiLineAssignmentSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- PEAR FunctionDeclarationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- Squiz SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Szabolcs Sulik][@blerou] for the patch
+- Squiz CSS IndentationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the 'indent' setting in a ruleset.xml file to change
+ - Thanks to [Hugo Fonseca][@fonsecas72] for the patch
+- Squiz and MySource File and Function comment sniffs now allow all tags and don't require a particular licence
+- Squiz LowercaseStyleDefinitionSniff no longer throws errors for class names in nested style definitions
+- Squiz ClassFileNameSniff no longer throws errors when checking STDIN
+- Squiz CSS sniffs no longer generate errors for IE filters
+- Squiz CSS IndentationSniff no longer sees comments as blank lines
+- Squiz LogicalOperatorSpacingSniff now ignores whitespace at the end of a line
+- Squiz.Scope.MethodScope.Missing error message now mentions 'visibility' instead of 'scope modifier'
+ - Thanks to [Renat Akhmedyanov][@r3nat] for the patch
+- Added support for the PSR2 multi-line arguments errata
+- The PSR2 standard no longer throws errors for additional spacing after a type hint
+- PSR UseDeclarationSniff no longer throws errors for USE statements inside TRAITs
+
+### Fixed
+- Fixed bug #20026 : Check for multi-line arrays that should be single-line is slightly wrong
+ - Adds new error message for single-line arrays that end with a comma
+- Fixed bug #20029 : ForbiddenFunction sniff incorrectly recognizes methods in USE clauses
+- Fixed bug #20043 : Mis-interpretation of Foo::class
+- Fixed bug #20044 : PSR1 camelCase check does not ignore leading underscores
+- Fixed bug #20045 : Errors about indentation for closures with multi-line 'use' in functions
+
+## [1.5.0RC3] - 2013-07-25
+### Changed
+- Added report type --report=json to show the error list and total counts for all checked files
+ - Thanks to [Jeffrey Fisher][@jeffslofish] for the contribution
+- PHP_CodeSniffer::isCamelCaps now allows for acronyms at the start of a string if the strict flag is FALSE
+ - acronyms are defined as at least 2 uppercase characters in a row
+ - e.g., the following is now valid camel caps with strict set to FALSE: XMLParser
+- The PHP tokenizer now tokenizes goto labels as T_GOTO_LABEL instead of T_STRING followed by T_COLON
+- The JS tokenizer now has support for the T_THROW token
+- Symlinked directories inside CodeSniffer/Standards and in ruleset.xml files are now supported
+ - Only available since PHP 5.2.11 and 5.3.1
+ - Thanks to [Maik Penz][@goatherd] for the patch
+- The JS tokenizer now correctly identifies T_INLINE_ELSE tokens instead of leaving them as T_COLON
+ - Thanks to [Arnout Boks][@aboks] for the patch
+- Explaining a standard (phpcs -e) that uses namespaces now works correctly
+- Restricting a check to specific sniffs (phpcs --sniffs=...) now works correctly with namespaced sniffs
+ - Thanks to [Maik Penz][@goatherd] for the patch
+- Docs added for the entire Generic standard, and many sniffs from other standards are now documented as well
+ - Thanks to [Spencer Rinehart][@nubs] for the contribution
+- Clearer error message for when the sniff class name does not match the directory structure
+- Generated HTML docs now correctly show the open PHP tag in code comparison blocks
+- Added Generic InlineHTMLSniff to ensure a file only contains PHP code
+- Added Squiz ShorthandSizeSniff to check that CSS sizes are using shorthand notation only when 1 or 2 values are used
+- Added Squiz ForbiddenStylesSniff to ban the use of some deprecated browser-specific styles
+- Added Squiz NamedColoursSniff to ban the use of colour names
+- PSR2 standard no longer enforces no whitespace between the closing parenthesis of a function call and the semicolon
+- PSR2 ClassDeclarationSniff now ignores empty classes when checking the end brace position
+- PSR2 SwitchDeclarationSniff no longer reports errors for empty lines between CASE statements
+- PEAR ObjectOperatorIndentSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the indent setting in a ruleset.xml file to change
+ - Thanks to [Andrey Mindubaev][@covex-nn] for the patch
+- Squiz FileExtensionSniff now supports traits
+ - Thanks to [Lucas Green][@mythril] for the patch
+- Squiz ArrayDeclarationSniff no longer reports errors for no comma at the end of a line that contains a function call
+- Squiz SwitchDeclarationSniff now supports T_CONTINUE and T_THROW as valid case/default breaking statements
+- Squiz CommentedOutCodeSniff is now better at ignoring commented out HTML, XML and regular expressions
+- Squiz DisallowComparisonAssignmentSniff no longer throws errors for the third expression in a FOR statement
+- Squiz ColourDefinitionSniff no longer throws errors for some CSS class names
+- Squiz ControlStructureSpacingSniff now supports all types of CASE/DEFAULT breaking statements
+- Generic CallTimePassByReferenceSniff now reports errors for functions called using a variable
+ - Thanks to [Maik Penz][@goatherd] for the patch
+- Generic ConstructorNameSniff no longer throws a notice for abstract constructors inside abstract classes
+ - Thanks to [Spencer Rinehart][@nubs] for the patch
+- Squiz ComparisonOperatorUsageSniff now checks inside elseif statements
+ - Thanks to [Arnout Boks][@aboks] for the patch
+- Squiz OperatorSpacingSniff now reports errors for no spacing around inline then and else tokens
+ - Thanks to [Arnout Boks][@aboks] for the patch
+
+### Fixed
+- Fixed bug #19811 : Comments not ignored in all cases in AbstractPatternSniff
+ - Thanks to [Erik Wiffin][@erikwiffin] for the patch
+- Fixed bug #19892 : ELSE with no braces causes incorrect SWITCH break statement indentation error
+- Fixed bug #19897 : Indenting warnings in templates not consistent
+- Fixed bug #19908 : PEAR MultiLineCondition Does Not Apply elseif
+- Fixed bug #19930 : option --report-file generate an empty file
+- Fixed bug #19935 : notify-send reports do not vanish in gnome-shell
+ - Thanks to [Christian Weiske][@cweiske] for the patch
+- Fixed bug #19944 : docblock squiz sniff "return void" trips over return in lambda function
+- Fixed bug #19953 : PSR2 - Spaces before interface name for abstract class
+- Fixed bug #19956 : phpcs warns for Type Hint missing Resource
+- Fixed bug #19957 : Does not understand trait method aliasing
+- Fixed bug #19968 : Permission denied on excluded directory
+- Fixed bug #19969 : Sniffs with namespace not recognized in reports
+- Fixed bug #19997 : Class names incorrectly detected as constants
+
+## [1.4.6] - 2013-07-25
+### Changed
+- Added report type --report=json to show the error list and total counts for all checked files
+ - Thanks to [Jeffrey Fisher][@jeffslofish] for the contribution
+- The JS tokenizer now has support for the T_THROW token
+- Symlinked directories inside CodeSniffer/Standards and in ruleset.xml files are now supported
+ - Only available since PHP 5.2.11 and 5.3.1
+ - Thanks to [Maik Penz][@goatherd] for the patch
+- The JS tokenizer now correctly identifies T_INLINE_ELSE tokens instead of leaving them as T_COLON
+ - Thanks to [Arnout Boks][@aboks] for the patch
+- Explaining a standard (phpcs -e) that uses namespaces now works correctly
+- Restricting a check to specific sniffs (phpcs --sniffs=...) now works correctly with namespaced sniffs
+ - Thanks to [Maik Penz][@goatherd] for the patch
+- Docs added for the entire Generic standard, and many sniffs from other standards are now documented as well
+ - Thanks to [Spencer Rinehart][@nubs] for the contribution
+- Clearer error message for when the sniff class name does not match the directory structure
+- Generated HTML docs now correctly show the open PHP tag in code comparison blocks
+- Added Generic InlineHTMLSniff to ensure a file only contains PHP code
+- Added Squiz ShorthandSizeSniff to check that CSS sizes are using shorthand notation only when 1 or 2 values are used
+- Added Squiz ForbiddenStylesSniff to ban the use of some deprecated browser-specific styles
+- Added Squiz NamedColoursSniff to ban the use of colour names
+- PSR2 standard no longer enforces no whitespace between the closing parenthesis of a function call and the semicolon
+- PSR2 ClassDeclarationSniff now ignores empty classes when checking the end brace position
+- PSR2 SwitchDeclarationSniff no longer reports errors for empty lines between CASE statements
+- PEAR ObjectOperatorIndentSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the indent setting in a ruleset.xml file to change
+ - Thanks to [Andrey Mindubaev][@covex-nn] for the patch
+- Squiz FileExtensionSniff now supports traits
+ - Thanks to [Lucas Green][@mythril] for the patch
+- Squiz ArrayDeclarationSniff no longer reports errors for no comma at the end of a line that contains a function call
+- Squiz SwitchDeclarationSniff now supports T_CONTINUE and T_THROW as valid case/default breaking statements
+- Squiz CommentedOutCodeSniff is now better at ignoring commented out HTML, XML and regular expressions
+- Squiz DisallowComparisonAssignmentSniff no longer throws errors for the third expression in a FOR statement
+- Squiz ColourDefinitionSniff no longer throws errors for some CSS class names
+- Squiz ControlStructureSpacingSniff now supports all types of CASE/DEFAULT breaking statements
+- Generic CallTimePassByReferenceSniff now reports errors for functions called using a variable
+ - Thanks to [Maik Penz][@goatherd] for the patch
+- Generic ConstructorNameSniff no longer throws a notice for abstract constructors inside abstract classes
+ - Thanks to [Spencer Rinehart][@nubs] for the patch
+- Squiz ComparisonOperatorUsageSniff now checks inside elseif statements
+ - Thanks to [Arnout Boks][@aboks] for the patch
+- Squiz OperatorSpacingSniff now reports errors for no spacing around inline then and else tokens
+ - Thanks to [Arnout Boks][@aboks] for the patch
+
+### Fixed
+- Fixed bug #19811 : Comments not ignored in all cases in AbstractPatternSniff
+ - Thanks to [Erik Wiffin][@erikwiffin] for the patch
+- Fixed bug #19892 : ELSE with no braces causes incorrect SWITCH break statement indentation error
+- Fixed bug #19897 : Indenting warnings in templates not consistent
+- Fixed bug #19908 : PEAR MultiLineCondition Does Not Apply elseif
+- Fixed bug #19913 : Running phpcs in interactive mode causes warnings
+ - Thanks to [Harald Franndorfer][pear-gemineye] for the patch
+- Fixed bug #19935 : notify-send reports do not vanish in gnome-shell
+ - Thanks to [Christian Weiske][@cweiske] for the patch
+- Fixed bug #19944 : docblock squiz sniff "return void" trips over return in lambda function
+- Fixed bug #19953 : PSR2 - Spaces before interface name for abstract class
+- Fixed bug #19956 : phpcs warns for Type Hint missing Resource
+- Fixed bug #19957 : Does not understand trait method aliasing
+- Fixed bug #19968 : Permission denied on excluded directory
+- Fixed bug #19969 : Sniffs with namespace not recognized in reports
+- Fixed bug #19997 : Class names incorrectly detected as constants
+
+## [1.5.0RC2] - 2013-04-04
+### Changed
+- Ruleset processing has been rewritten to be more predictable
+ - Provides much better support for relative paths inside ruleset files
+ - May mean that sniffs that were previously ignored are now being included when importing external rulesets
+ - Ruleset processing output can be seen by using the -vv command line argument
+ - Internal sniff registering functions have all changed, so please review custom scripts
+- You can now pass multiple coding standards on the command line, comma separated (request #19144)
+ - Works with built-in or custom standards and rulesets, or a mix of both
+- You can now exclude directories or whole standards in a ruleset XML file (request #19731)
+ - e.g., exclude "Generic.Commenting" or just "Generic"
+ - You can also pass in a path to a directory instead, if you know it
+- Added Generic LowerCaseKeywordSniff to ensure all PHP keywords are defined in lowercase
+ - The PSR2 and Squiz standards now use this sniff
+- Added Generic SAPIUsageSniff to ensure the PHP_SAPI constant is used instead of php_sapi_name() (request #19863)
+- Squiz FunctionSpacingSniff now has a setting to specify how many lines there should between functions (request #19843)
+ - Default remains at 2
+ - Override the "spacing" setting in a ruleset.xml file to change
+- Squiz LowercasePHPFunctionSniff no longer throws errors for the limited set of PHP keywords it was checking
+ - Add a rule for Generic.PHP.LowerCaseKeyword to your ruleset to replicate this functionality
+- Added support for the PHP 5.4 T_CALLABLE token so it can be used in lower PHP versions
+- Generic EndFileNoNewlineSniff now supports checking of CSS and JS files
+- PSR2 SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the indent setting in a ruleset.xml file to change
+ - Thanks to [Asher Snyder][@asnyder] for the patch
+- Generic ScopeIndentSniff now has a setting to specify a list of tokens that should be ignored
+ - The first token on the line is checked and the whole line is ignored if the token is in the array
+ - Thanks to [Eloy Lafuente][@stronk7] for the patch
+- Squiz LowercaseClassKeywordsSniff now checks for the TRAIT keyword
+ - Thanks to [Anthon Pang][@robocoder] for the patch
+- If you create your own PHP_CodeSniffer object, PHPCS will no longer exit when an unknown argument is found
+ - This allows you to create wrapper scripts for PHPCS more easily
+- PSR2 MethodDeclarationSniff no longer generates a notice for methods named "_"
+ - Thanks to [Bart S][@zBart] for the patch
+- Squiz BlockCommentSniff no longer reports that a blank line between a scope closer and block comment is invalid
+- Generic DuplicateClassNameSniff no longer reports an invalid error if multiple PHP open tags exist in a file
+- Generic DuplicateClassNameSniff no longer reports duplicate errors if multiple PHP open tags exist in a file
+
+### Fixed
+- Fixed bug #19819 : Freeze with syntax error in use statement
+- Fixed bug #19820 : Wrong message level in Generic_Sniffs_CodeAnalysis_EmptyStatementSniff
+- Fixed bug #19859 : CodeSniffer::setIgnorePatterns API changed
+- Fixed bug #19871 : findExtendedClassName doesn't return FQCN on namespaced classes
+- Fixed bug #19879 : bitwise and operator interpreted as reference by value
+
+## [1.4.5] - 2013-04-04
+### Changed
+- Added Generic LowerCaseKeywordSniff to ensure all PHP keywords are defined in lowercase
+ - The PSR2 and Squiz standards now use this sniff
+- Added Generic SAPIUsageSniff to ensure the PHP_SAPI constant is used instead of php_sapi_name() (request #19863)
+- Squiz FunctionSpacingSniff now has a setting to specify how many lines there should between functions (request #19843)
+ - Default remains at 2
+ - Override the "spacing" setting in a ruleset.xml file to change
+- Squiz LowercasePHPFunctionSniff no longer throws errors for the limited set of PHP keywords it was checking
+ - Add a rule for Generic.PHP.LowerCaseKeyword to your ruleset to replicate this functionality
+- Added support for the PHP 5.4 T_CALLABLE token so it can be used in lower PHP versions
+- Generic EndFileNoNewlineSniff now supports checking of CSS and JS files
+- PSR2 SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented
+ - Default remains at 4; override the indent setting in a ruleset.xml file to change
+ - Thanks to [Asher Snyder][@asnyder] for the patch
+- Generic ScopeIndentSniff now has a setting to specify a list of tokens that should be ignored
+ - The first token on the line is checked and the whole line is ignored if the token is in the array
+ - Thanks to [Eloy Lafuente][@stronk7] for the patch
+- Squiz LowercaseClassKeywordsSniff now checks for the TRAIT keyword
+ - Thanks to [Anthon Pang][@robocoder] for the patch
+- If you create your own PHP_CodeSniffer object, PHPCS will no longer exit when an unknown argument is found
+ - This allows you to create wrapper scripts for PHPCS more easily
+- PSR2 MethodDeclarationSniff no longer generates a notice for methods named "_"
+ - Thanks to [Bart S][@zBart] for the patch
+- Squiz BlockCommentSniff no longer reports that a blank line between a scope closer and block comment is invalid
+- Generic DuplicateClassNameSniff no longer reports an invalid error if multiple PHP open tags exist in a file
+- Generic DuplicateClassNameSniff no longer reports duplicate errors if multiple PHP open tags exist in a file
+
+### Fixed
+- Fixed bug #19819 : Freeze with syntax error in use statement
+- Fixed bug #19820 : Wrong message level in Generic_Sniffs_CodeAnalysis_EmptyStatementSniff
+- Fixed bug #19859 : CodeSniffer::setIgnorePatterns API changed
+- Fixed bug #19871 : findExtendedClassName doesn't return FQCN on namespaced classes
+- Fixed bug #19879 : bitwise and operator interpreted as reference by value
+
+## [1.5.0RC1] - 2013-02-08
+### Changed
+- Reports have been completely rewritten to consume far less memory
+ - Each report is incrementally written to the file system during a run and then printed out when the run ends
+ - There is no longer a need to keep the list of errors and warnings in memory during a run
+- Multi-file sniff support has been removed because they are too memory intensive
+ - If you have a custom multi-file sniff, you can convert it into a standard sniff quite easily
+ - See CodeSniffer/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php for an example
+
+## [1.4.4] - 2013-02-07
+### Changed
+- Ignored lines no longer cause the summary report to show incorrect error and warning counts
+ - Thanks to [Bert Van Hauwaert][@becoded] for the patch
+- Added Generic CSSLintSniff to run CSSLint over a CSS file and report warnings
+ - Set full command to run CSSLint using phpcs --config-set csslint_path /path/to/csslint
+ - Thanks to [Roman Levishchenko][@index0h] for the contribution
+- Added PSR2 ControlStructureSpacingSniff to ensure there are no spaces before and after parenthesis in control structures
+ - Fixes bug #19732 : PSR2: some control structures errors not reported
+- Squiz commenting sniffs now support non-English characters when checking for capital letters
+ - Thanks to [Roman Levishchenko][@index0h] for the patch
+- Generic EndFileNewlineSniff now supports JS and CSS files
+ - Thanks to [Denis Ryabkov][@dryabkov] for the patch
+- PSR1 SideEffectsSniff no longer reports constant declarations as side effects
+- Notifysend report now supports notify-send versions before 0.7.3
+ - Thanks to [Ken Guest][@kenguest] for the patch
+- PEAR and Squiz FunctionCommentSniffs no longer report errors for misaligned argument comments when they are blank
+ - Thanks to [Thomas Peterson][@boonkerz] for the patch
+- Squiz FunctionDeclarationArgumentSpacingSniff now works correctly for equalsSpacing values greater than 0
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Squiz SuperfluousWhitespaceSniff no longer throws errors for CSS files with no newline at the end
+- Squiz SuperfluousWhitespaceSniff now allows a single newline at the end of JS and CSS files
+
+### Fixed
+- Fixed bug #19755 : Token of T_CLASS type has no scope_opener and scope_closer keys
+- Fixed bug #19759 : Squiz.PHP.NonExecutableCode fails for return function()...
+- Fixed bug #19763 : Use statements for traits not recognised correctly for PSR2 code style
+- Fixed bug #19764 : Instead of for traits throws uppercase constant name errors
+- Fixed bug #19772 : PSR2_Sniffs_Namespaces_UseDeclarationSniff does not properly recognize last use
+- Fixed bug #19775 : False positive in NonExecutableCode sniff when not using curly braces
+- Fixed bug #19782 : Invalid found size functions in loop when using object operator
+- Fixed bug #19799 : config folder is not created automatically
+- Fixed bug #19804 : JS Tokenizer wrong /**/ parsing
+
+## [1.4.3] - 2012-12-04
+### Changed
+- Added support for the PHP 5.5 T_FINALLY token to detect try/catch/finally statements
+- Added empty CodeSniffer.conf to enable config settings for Composer installs
+- Added Generic EndFileNoNewlineSniff to ensure there is no newline at the end of a file
+- Autoloader can now load PSR-0 compliant classes
+ - Thanks to [Maik Penz][@goatherd] for the patch
+- Squiz NonExecutableCodeSniff no longer throws error for multi-line RETURNs inside CASE statements
+ - Thanks to [Marc Ypes][@ceeram] for the patch
+- Squiz OperatorSpacingSniff no longer reports errors for negative numbers inside inline THEN statements
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Squiz OperatorSpacingSniff no longer reports errors for the assignment of operations involving negative numbers
+- Squiz SelfMemberReferenceSniff can no longer get into an infinite loop when checking a static call with a namespace
+ - Thanks to [Andy Grunwald][@andygrunwald] for the patch
+
+### Fixed
+- Fixed bug #19699 : Generic.Files.LineLength giving false positives when tab-width is used
+- Fixed bug #19726 : Wrong number of spaces expected after instanceof static
+- Fixed bug #19727 : PSR2: no error reported when using } elseif {
+
+## [1.4.2] - 2012-11-09
+### Changed
+- PHP_CodeSniffer can now be installed using Composer
+ - Require squizlabs/php_codesniffer in your composer.json file
+ - Thanks to [Rob Bast][@alcohol], [Stephen Rees-Carter][@valorin], [Stefano Kowalke][@Konafets] and [Ivan Habunek][@ihabunek] for help with this
+- Squiz BlockCommentSniff and InlineCommentSniff no longer report errors for trait block comments
+- Squiz SelfMemberReferenceSniff now supports namespaces
+ - Thanks to [Andy Grunwald][@andygrunwald] for the patch
+- Squiz FileCommentSniff now uses tag names inside the error codes for many messages
+ - This allows you to exclude specific missing, out of order etc., tags
+- Squiz SuperfluousWhitespaceSniff now has an option to ignore blank lines
+ - This will stop errors being reported for lines that contain only whitespace
+ - Set the ignoreBlankLines property to TRUE in your ruleset.xml file to enable this
+- PSR2 no longer reports errors for whitespace at the end of blank lines
+
+### Fixed
+- Fixed gitblame report not working on Windows
+ - Thanks to [Rogerio Prado de Jesus][@rogeriopradoj]
+- Fixed an incorrect error in Squiz OperatorSpacingSniff for default values inside a closure definition
+- Fixed bug #19691 : SubversionPropertiesSniff fails to find missing properties
+ - Thanks to [Kevin Winahradsky][pear-kwinahradsky] for the patch
+- Fixed bug #19692 : DisallowMultipleAssignments is triggered by a closure
+- Fixed bug #19693 : exclude-patterns no longer work on specific messages
+- Fixed bug #19694 : Squiz.PHP.LowercasePHPFunctions incorrectly matches return by ref functions
+
+## [1.4.1] - 2012-11-02
+### Changed
+- All ignore patterns have been reverted to being checked against the absolute path of a file
+ - Patterns can be specified to be relative in a ruleset.xml file, but nowhere else
+ - e.g., [exclude-pattern type="relative"]^tests/*[/exclude-pattern] (with angle brackets, not square brackets)
+- Added support for PHP tokenizing of T_INLINE_ELSE colons, so this token type is now available
+ - Custom sniffs that rely on looking for T_COLON tokens inside inline if statements must be changed to use the new token
+ - Fixes bug #19666 : PSR1.Files.SideEffects throws a notice Undefined index: scope_closer
+- Messages can now be changed from errors to warnings (and vice versa) inside ruleset.xml files
+ - As you would with "message" and "severity", specify a "type" tag under a "rule" tag and set the value to "error" or "warning"
+- PHP_CodeSniffer will now generate a warning on files that it detects have mixed line endings
+ - This warning has the code Internal.LineEndings.Mixed and can be overridden in a ruleset.xml file
+ - Thanks to [Vit Brunner][@tasuki] for help with this
+- Sniffs inside PHP 5.3 namespaces are now supported, along with the existing underscore-style emulated namespaces
+ - For example: namespace MyStandard\Sniffs\Arrays; class ArrayDeclarationSniff implements \PHP_CodeSniffer_Sniff { ...
+ - Thanks to [Till Klampaeckel][@till] for the patch
+- Generic DuplicateClassNameSniff is no longer a multi-file sniff, so it won't max out your memory
+ - Multi-file sniff support should be considered deprecated as standard sniffs can now do the same thing
+- Added Generic DisallowSpaceIndent to check that files are indented using tabs
+- Added Generic OneClassPerFileSniff to check that only one class is defined in each file
+ - Thanks to [Andy Grunwald][@andygrunwald] for the contribution
+- Added Generic OneInterfacePerFileSniff to check that only one interface is defined in each file
+ - Thanks to [Andy Grunwald][@andygrunwald] for the contribution
+- Added Generic LowercasedFilenameSniff to check that filenames are lowercase
+ - Thanks to [Andy Grunwald][@andygrunwald] for the contribution
+- Added Generic ClosingPHPTagSniff to check that each open PHP tag has a corresponding close tag
+ - Thanks to [Andy Grunwald][@andygrunwald] for the contribution
+- Added Generic CharacterBeforePHPOpeningTagSniff to check that the open PHP tag is the first content in a file
+ - Thanks to [Andy Grunwald][@andygrunwald] for the contribution
+- Fixed incorrect errors in Squiz OperatorBracketSniff and OperatorSpacingSniff for negative numbers in CASE statements
+ - Thanks to [Arnout Boks][@aboks] for the patch
+- Generic CamelCapsFunctionNameSniff no longer enforces exact case matching for PHP magic methods
+- Generic CamelCapsFunctionNameSniff no longer throws errors for overridden SOAPClient methods prefixed with double underscores
+ - Thanks to [Dorian Villet][@gnutix] for the patch
+- PEAR ValidFunctionNameSniff now supports traits
+- PSR1 ClassDeclarationSniff no longer throws an error for non-namespaced code if PHP version is less than 5.3.0
+
+### Fixed
+- Fixed bug #19616 : Nested switches cause false error in PSR2
+- Fixed bug #19629 : PSR2 error for inline comments on multi-line argument lists
+- Fixed bug #19644 : Alternative syntax, e.g. if/endif triggers Inline Control Structure error
+- Fixed bug #19655 : Closures reporting as multi-line when they are not
+- Fixed bug #19675 : Improper indent of nested anonymous function bodies in a call
+- Fixed bug #19685 : PSR2 catch-22 with empty third statement in for loop
+- Fixed bug #19687 : Anonymous functions inside arrays marked as indented incorrectly in PSR2
+
+## [1.4.0] - 2012-09-26
+### Changed
+- Added PSR1 and PSR2 coding standards that can be used to check your code against these guidelines
+- PHP 5.4 short array syntax is now detected and tokens are assigned to the open and close characters
+ - New tokens are T_OPEN_SHORT_ARRAY and T_CLOSE_SHORT_ARRAY as PHP does not define its own
+- Added the ability to explain a coding standard by listing the sniffs that it includes
+ - The sniff list includes all imported and native sniffs
+ - Explain a standard by using the -e and --standard=[standard] command line arguments
+ - E.g., phpcs -e --standard=Squiz
+ - Thanks to [Ben Selby][@benmatselby] for the idea
+- Added report to show results using notify-send
+ - Use --report=notifysend to generate the report
+ - Thanks to [Christian Weiske][@cweiske] for the contribution
+- The JS tokenizer now recognises RETURN as a valid closer for CASE and DEFAULT inside switch statements
+- AbstractPatternSniff now sets the ignoreComments option using a public var rather than through the constructor
+ - This allows the setting to be overwritten in ruleset.xml files
+ - Old method remains for backwards compatibility
+- Generic LowerCaseConstantSniff and UpperCaseConstantSniff no longer report errors on classes named True, False or Null
+- PEAR ValidFunctionNameSniff no longer enforces exact case matching for PHP magic methods
+- Squiz SwitchDeclarationSniff now allows RETURN statements to close a CASE or DEFAULT statement
+- Squiz BlockCommentSniff now correctly reports an error for blank lines before blocks at the start of a control structure
+
+### Fixed
+- Fixed a PHP notice generated when loading custom array settings from a ruleset.xml file
+- Fixed bug #17908 : CodeSniffer does not recognise optional @params
+ - Thanks to [Pete Walker][pear-pete] for the patch
+- Fixed bug #19538 : Function indentation code sniffer checks inside short arrays
+- Fixed bug #19565 : Non-Executable Code Sniff Broken for Case Statements with both return and break
+- Fixed bug #19612 : Invalid @package suggestion
+
+## [1.3.6] - 2012-08-08
+### Changed
+- Memory usage has been dramatically reduced when using the summary report
+ - Reduced memory is only available when displaying a single summary report to the screen
+ - PHP_CodeSniffer will not generate any messages in this case, storing only error counts instead
+ - Impact is most notable with very high error and warning counts
+- Significantly improved the performance of Squiz NonExecutableCodeSniff
+- Ignore patterns now check the relative path of a file based on the dir being checked
+ - Allows ignore patterns to become more generic as the path to the code is no longer included when checking
+ - Thanks to [Kristof Coomans][@kristofser] for the patch
+- Sniff settings can now be changed by specifying a special comment format inside a file
+ - e.g., // @codingStandardsChangeSetting PEAR.Functions.FunctionCallSignature allowMultipleArguments false
+ - If you change a setting, don't forget to change it back
+- Added Generic EndFileNewlineSniff to ensure PHP files end with a newline character
+- PEAR FunctionCallSignatureSniff now includes a setting to force one argument per line in multi-line calls
+ - Set allowMultipleArguments to false
+- Squiz standard now enforces one argument per line in multi-line function calls
+- Squiz FunctionDeclarationArgumentSpacingSniff now supports closures
+- Squiz OperatorSpacingSniff no longer throws an error for negative values inside an inline THEN statement
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Squiz FunctionCommentSniff now throws an error for not closing a comment with */
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Summary report no longer shows two lines of PHP_Timer output when showing sources
+
+### Fixed
+- Fixed undefined variable error in PEAR FunctionCallSignatureSniff for lines with no indent
+- Fixed bug #19502 : Generic.Files.LineEndingsSniff fails if no new-lines in file
+- Fixed bug #19508 : switch+return: Closing brace indented incorrectly
+- Fixed bug #19532 : The PSR-2 standard don't recognize Null in class names
+- Fixed bug #19546 : Error thrown for __call() method in traits
+
+## [1.3.5] - 2012-07-12
+### Changed
+- Added Generic CamelCapsFunctionNameSniff to just check if function and method names use camel caps
+ - Does not allow underscore prefixes for private/protected methods
+ - Defaults to strict checking, where two uppercase characters can not be next to each other
+ - Strict checking can be disabled in a ruleset.xml file
+- Squiz FunctionDeclarationArgumentSpacing now has a setting to specify how many spaces should surround equals signs
+ - Default remains at 0
+ - Override the equalsSpacing setting in a ruleset.xml file to change
+- Squiz ClassDeclarationSniff now throws errors for > 1 space before extends/implements class name with ns separator
+- Squiz standard now warns about deprecated functions using Generic DeprecatedFunctionsSniff
+- PEAR FunctionDeclarationSniff now reports an error for multiple spaces after the FUNCTION keyword and around USE
+- PEAR FunctionDeclarationSniff now supports closures
+- Squiz MultiLineFunctionDeclarationSniff now supports closures
+- Exclude rules written for Unix systems will now work correctly on Windows
+ - Thanks to [Walter Tamboer][@waltertamboer] for the patch
+- The PHP tokenizer now recognises T_RETURN as a valid closer for T_CASE and T_DEFAULT inside switch statements
+
+### Fixed
+- Fixed duplicate message codes in Generic OpeningFunctionBraceKernighanRitchieSniff
+- Fixed bug #18651 : PHPunit Test cases for custom standards are not working on Windows
+- Fixed bug #19416 : Shorthand arrays cause bracket spacing errors
+- Fixed bug #19421 : phpcs doesn't recognize ${x} as equivalent to $x
+- Fixed bug #19428 : PHPCS Report "hgblame" doesn't support windows paths
+ - Thanks to [Justin Rovang][@rovangju] for the patch
+- Fixed bug #19448 : Problem with detecting remote standards
+- Fixed bug #19463 : Anonymous functions incorrectly being flagged by NonExecutableCodeSniff
+- Fixed bug #19469 : PHP_CodeSniffer_File::getMemberProperties() sets wrong scope
+- Fixed bug #19471 : phpcs on Windows, when using Zend standard, doesn't catch problems
+ - Thanks to [Ivan Habunek][@ihabunek] for the patch
+- Fixed bug #19478 : Incorrect indent detection in PEAR standard
+ - Thanks to [Shane Auckland][@shanethehat] for the patch
+- Fixed bug #19483 : Blame Reports fail with space in directory name
+
+## [1.3.4] - 2012-05-17
+### Changed
+- Added missing package.xml entries for new Generic FixmeSniff
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Expected indents for PEAR ScopeClosingBraceSniff and FunctionCallSignatureSniff can now be set in ruleset files
+ - Both sniffs use a variable called "indent"
+ - Thanks to [Thomas Despoix][pear-tomdesp] for the patch
+- Standards designed to be installed in the PHPCS Standards dir will now work outside this dir as well
+ - In particular, allows the Drupal CS to work without needing to symlink it into the PHPCS install
+ - Thanks to [Peter Philipp][@das-peter] for the patch
+- Rule references for standards, directories and specific sniffs can now be relative in ruleset.xml files
+ - For example: ref="../MyStandard/Sniffs/Commenting/DisallowHashCommentsSniff.php"
+- Symlinked standards now work correctly, allowing aliasing of installed standards (request #19417)
+ - Thanks to [Tom Klingenberg][@ktomk] for the patch
+- Squiz ObjectInstantiationSniff now allows objects to be returned without assigning them to a variable
+- Added Squiz.Commenting.FileComment.MissingShort error message for file comments that only contains tags
+ - Also stops undefined index errors being generated for these comments
+- Debug option -vv now shows tokenizer status for CSS files
+- Added support for new gjslint error formats
+ - Thanks to [Meck][@yesmeck] for the patch
+- Generic ScopeIndentSniff now allows comment indents to not be exact even if the exact flag is set
+ - The start of the comment is still checked for exact indentation as normal
+- Fixed an issue in AbstractPatternSniff where comments were not being ignored in some cases
+- Fixed an issue in Zend ClosingTagSniff where the closing tag was not always being detected correctly
+ - Thanks to [Jonathan Robson][@jnrbsn] for the patch
+- Fixed an issue in Generic FunctionCallArgumentSpacingSniff where closures could cause incorrect errors
+- Fixed an issue in Generic UpperCaseConstantNameSniff where errors were incorrectly reported on goto statements
+ - Thanks to [Tom Klingenberg][@ktomk] for the patch
+- PEAR FileCommentSniff and ClassCommentSniff now support author emails with a single character in the local part
+ - E.g., a@me.com
+ - Thanks to Denis Shapkin for the patch
+
+### Fixed
+- Fixed bug #19290 : Generic indent sniffer fails for anonymous functions
+- Fixed bug #19324 : Setting show_warnings configuration option does not work
+- Fixed bug #19354 : Not recognizing references passed to method
+- Fixed bug #19361 : CSS tokenizer generates errors when PHP embedded in CSS file
+- Fixed bug #19374 : HEREDOC/NOWDOC Indentation problems
+- Fixed bug #19381 : traits and indentations in traits are not handled properly
+- Fixed bug #19394 : Notice in NonExecutableCodeSniff
+- Fixed bug #19402 : Syntax error when executing phpcs on Windows with parens in PHP path
+ - Thanks to [Tom Klingenberg][@ktomk] for the patch
+- Fixed bug #19411 : magic method error on __construct()
+ - The fix required a rewrite of AbstractScopeSniff, so please test any sniffs that extend this class
+- Fixed bug #19412 : Incorrect error about assigning objects to variables when inside inline IF
+- Fixed bug #19413 : php_cs thinks I haven't used a parameter when I have
+- Fixed bug #19414 : php_cs seems to not track variables correctly in heredocs
+
+## [1.3.3] - 2012-02-07
+### Changed
+- Added new Generic FixmeSniff that shows error messages for all FIXME comments left in your code
+ - Thanks to [Sam Graham][@illusori] for the contribution
+- The maxPercentage setting in the Squiz CommentedOutCodeSniff can now be overridden in a ruleset.xml file
+ - Thanks to [Volker Dusch][@edorian] for the patch
+- The Checkstyle and XML reports now use XMLWriter
+ - Only change in output is that empty file tags are no longer produced for files with no violations
+ - Thanks to [Sebastian Bergmann][@sebastianbergmann] for the patch
+- Added PHP_CodeSniffer_Tokens::$bracketTokens to give sniff writers fast access to open and close bracket tokens
+- Fixed an issue in AbstractPatternSniff where EOL tokens were not being correctly checked in some cases
+- PHP_CodeSniffer_File::getTokensAsString() now detects incorrect length value (request #19313)
+
+### Fixed
+- Fixed bug #19114 : CodeSniffer checks extension even for single file
+- Fixed bug #19171 : Show sniff codes option is ignored by some report types
+ - Thanks to [Dominic Scheirlinck][@dominics] for the patch
+- Fixed bug #19188 : Lots of PHP Notices when analyzing the Symfony framework
+ - First issue was list-style.. lines in CSS files not properly adjusting open/close bracket positions
+ - Second issue was notices caused by bug #19137
+- Fixed bug #19208 : UpperCaseConstantName reports class members
+ - Was also a problem with LowerCaseConstantName as well
+- Fixed bug #19256 : T_DOC_COMMENT in CSS files breaks ClassDefinitionNameSpacingSniff
+ - Thanks to [Klaus Purer][@klausi] for the patch
+- Fixed bug #19264 : Squiz.PHP.NonExecutableCode does not handle RETURN in CASE without BREAK
+- Fixed bug #19270 : DuplicateClassName does not handle namespaces correctly
+- Fixed bug #19283 : CSS @media rules cause false positives
+ - Thanks to [Klaus Purer][@klausi] for the patch
+
+## [1.3.2] - 2011-12-01
+### Changed
+- Added Generic JSHintSniff to run jshint.js over a JS file and report warnings
+ - Set jshint path using phpcs --config-set jshint_path /path/to/jshint-rhino.js
+ - Set rhino path using phpcs --config-set rhino_path /path/to/rhino
+ - Thanks to Alexander Weiß for the contribution
+- Nowdocs are now tokenized using PHP_CodeSniffer specific T_NOWDOC tokens for easier identification
+- Generic UpperCaseConstantNameSniff no longer throws errors for namespaces
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Squiz NonExecutableCodeSniff now detects code after thrown exceptions
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Squiz OperatorSpacingSniff now ignores references
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Squiz FunctionCommentSniff now reports a missing function comment if it finds a standard code comment instead
+- Squiz FunctionCommentThrownTagSniff no longer reports errors if it can't find a function comment
+
+### Fixed
+- Fixed unit tests not running under Windows
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #18964 : "$stackPtr must be of type T_VARIABLE" on heredocs and nowdocs
+- Fixed bug #18973 : phpcs is looking for variables in a nowdoc
+- Fixed bug #18974 : Blank line causes "Multi-line function call not indented correctly"
+ - Adds new error message to ban empty lines in multi-line function calls
+- Fixed bug #18975 : "Closing parenthesis must be on a line by itself" also causes indentation error
+
+## 1.3.1 - 2011-11-03
+### Changed
+- All report file command line arguments now work with relative paths (request #17240)
+- The extensions command line argument now supports multi-part file extensions (request #17227)
+- Added report type --report=hgblame to show number of errors/warnings committed by authors in a Mercurial repository
+ - Has the same functionality as the svnblame report
+ - Thanks to [Ben Selby][@benmatselby] for the patch
+- Added T_BACKTICK token type to make detection of backticks easier (request #18799)
+- Added pattern matching support to Generic ForbiddenFunctionsSniff
+ - If you are extending it and overriding register() or addError() you will need to review your sniff
+- Namespaces are now recognised as scope openers, although they do not require braces (request #18043)
+- Added new ByteOrderMarkSniff to Generic standard (request #18194)
+ - Throws an error if a byte order mark is found in any PHP file
+ - Thanks to [Piotr Karas][pear-ryba] for the contribution
+- PHP_Timer output is no longer included in reports when being written to a file (request #18252)
+ - Also now shown for all report types if nothing is being printed to the screen
+- Generic DeprecatedFunctionSniff now reports functions as deprecated and not simply forbidden (request #18288)
+- PHPCS now accepts file contents from STDIN (request #18447)
+ - Example usage: cat temp.php | phpcs [options] -OR- phpcs [options] < temp.php
+ - Not every sniff will work correctly due to the lack of a valid file path
+- PHP_CodeSniffer_Exception no longer extends PEAR_Exception (request #18483)
+ - PEAR_Exception added a requirement that PEAR had to be installed
+ - PHP_CodeSniffer is not used as a library, so unlikely to have any impact
+- PEAR FileCommentSniff now allows GIT IDs in the version tag (request #14874)
+- AbstractVariableSniff now supports heredocs
+ - Also includes some variable detection fixes
+ - Thanks to [Sam Graham][@illusori] for the patch
+- Squiz FileCommentSniff now enforces rule that package names cannot start with the word Squiz
+- MySource AssignThisSniff now allows "this" to be assigned to the private var _self
+- PEAR ClassDeclaration sniff now supports indentation checks when using the alternate namespace syntax
+ - PEAR.Classes.ClassDeclaration.SpaceBeforeBrace message now contains 2 variables instead of 1
+ - Sniff allows overriding of the default indent level, which is set to 4
+ - Fixes bug #18933 : Alternative namespace declaration syntax confuses scope sniffs
+
+### Fixed
+- Fixed issue in Squiz FileCommentSniff where suggested package name was the same as the incorrect package name
+- Fixed some issues with Squiz ArrayDeclarationSniff when using function calls in array values
+- Fixed doc generation so it actually works again
+ - Also now works when being run from an SVN checkout as well as when installed as a PEAR package
+ - Should fix bug #18949 : Call to private method from static
+- Fixed bug #18465 : "self::" does not work in lambda functions
+ - Also corrects conversion of T_FUNCTION tokens to T_CLOSURE, which was not fixing token condition arrays
+- Fixed bug #18543 : CSS Tokenizer deletes too many #
+- Fixed bug #18624 : @throws namespace problem
+ - Thanks to [Gavin Davies][pear-boxgav] for the patch
+- Fixed bug #18628 : Generic.Files.LineLength gives incorrect results with Windows line-endings
+- Fixed bug #18633 : CSS Tokenizer doesn't replace T_LIST tokens inside some styles
+- Fixed bug #18657 : anonymous functions wrongly indented
+- Fixed bug #18670 : UpperCaseConstantNameSniff fails on dynamic retrieval of class constant
+- Fixed bug #18709 : Code sniffer sniffs file if even if it's in --ignore
+ - Thanks to [Artem Lopata][@biozshock] for the patch
+- Fixed bug #18762 : Incorrect handling of define and constant in UpperCaseConstantNameSniff
+ - Thanks to [Thomas Baker][pear-bakert] for the patch
+- Fixed bug #18769 : CSS Tokenizer doesn't replace T_BREAK tokens inside some styles
+- Fixed bug #18835 : Unreachable errors of inline returns of closure functions
+ - Thanks to [Patrick Schmidt][pear-woellchen] for the patch
+- Fixed bug #18839 : Fix miscount of warnings in AbstractSniffUnitTest.php
+ - Thanks to [Sam Graham][@illusori] for the patch
+- Fixed bug #18844 : Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff with empty body
+ - Thanks to [Dmitri Medvedev][pear-dvino] for the patch
+- Fixed bug #18847 : Running Squiz_Sniffs_Classes_ClassDeclarationSniff results in PHP notice
+- Fixed bug #18868 : jslint+rhino: errors/warnings not detected
+ - Thanks to [Christian Weiske][@cweiske] for the patch
+- Fixed bug #18879 : phpcs-svn-pre-commit requires escapeshellarg
+ - Thanks to [Bjorn Katuin][pear-bjorn] for the patch
+- Fixed bug #18951 : weird behaviour with closures and multi-line use () params
+
+## 1.3.0 - 2011-03-17
+### Changed
+- Add a new token T_CLOSURE that replaces T_FUNCTION if the function keyword is anonymous
+- Many Squiz sniffs no longer report errors when checking closures; they are now ignored
+- Fixed some error messages in PEAR MultiLineConditionSniff that were not using placeholders for message data
+- AbstractVariableSniff now correctly finds variable names wrapped with curly braces inside double quoted strings
+- PEAR FunctionDeclarationSniff now ignores arrays in argument default values when checking multi-line declarations
+
+### Fixed
+- Fixed bug #18200 : Using custom named ruleset file as standard no longer works
+- Fixed bug #18196 : PEAR MultiLineCondition.SpaceBeforeOpenBrace not consistent with newline chars
+- Fixed bug #18204 : FunctionCommentThrowTag picks wrong exception type when throwing function call
+- Fixed bug #18222 : Add __invoke method to PEAR standard
+- Fixed bug #18235 : Invalid error generation in Squiz.Commenting.FunctionCommentThrowTag
+- Fixed bug #18250 : --standard with relative path skips Standards' "implicit" sniffs
+- Fixed bug #18274 : Multi-line IF and function call indent rules conflict
+- Fixed bug #18282 : Squiz doesn't handle final keyword before function comments
+ - Thanks to [Dave Perrett][pear-recurser] for the patch
+- Fixed bug #18336 : Function isUnderscoreName gives php notices
+
+## 1.3.0RC2 - 2011-01-14
+### Changed
+- You can now print multiple reports for each run and print each to the screen or a file (request #12434)
+ - Format is --report-[report][=file] (e.g., --report-xml=out.xml)
+ - Printing to screen is done by leaving [file] empty (e.g., --report-xml)
+ - Multiple reports can be specified in this way (e.g., --report-summary --report-xml=out.xml)
+ - The standard --report and --report-file command line arguments are unchanged
+- Added -d command line argument to set php.ini settings while running (request #17244)
+ - Usage is: phpcs -d memory_limit=32M -d ...
+ - Thanks to [Ben Selby][@benmatselby] for the patch
+- Added -p command line argument to show progress during a run
+ - Dot means pass, E means errors found, W means only warnings found and S means skipped file
+ - Particularly good for runs where you are checking more than 100 files
+ - Enable by default with --config-set show_progress 1
+ - Will not print anything if you are already printing verbose output
+ - This has caused a big change in the way PHP_CodeSniffer processes files (API changes around processing)
+- You can now add exclude rules for individual sniffs or error messages (request #17903)
+ - Only available when using a ruleset.xml file to specify rules
+ - Uses the same exclude-pattern tags as normal but allows them inside rule tags
+- Using the -vvv option will now print a list of sniffs executed for each file and how long they took to process
+- Added Generic ClosureLinterSniff to run Google's gjslint over your JS files
+- The XML and CSV reports now include the severity of the error (request #18165)
+ - The Severity column in the CSV report has been renamed to Type, and a new Severity column added for this
+- Fixed issue with Squiz FunctionCommentSniff reporting incorrect type hint when default value uses namespace
+ - Thanks to Anti Veeranna for the patch
+- Generic FileLengthSniff now uses iconv_strlen to check line length if an encoding is specified (request #14237)
+- Generic UnnecessaryStringConcatSniff now allows strings to be combined to form a PHP open or close tag
+- Squiz SwitchDeclarationSniff no longer reports indentation errors for BREAK statements inside IF conditions
+- Interactive mode now always prints the full error report (ignores command line)
+- Improved regular expression detection in JavaScript files
+ - Added new T_TYPEOF token that can be used to target the typeof JS operator
+ - Fixes bug #17611 : Regular expression tokens not recognised
+- Squiz ScopeIndentSniff removed
+ - Squiz standard no longer requires additional indents between ob_* methods
+ - Also removed Squiz OutputBufferingIndentSniff that was checking the same thing
+- PHP_CodeSniffer_File::getMemberProperties() performance improved significantly
+ - Improves performance of Squiz ValidVariableNameSniff significantly
+- Squiz OperatorSpacingSniff performance improved significantly
+- Squiz NonExecutableCodeSniff performance improved significantly
+ - Will throw duplicate errors in some cases now, but these should be rare
+- MySource IncludeSystemSniff performance improved significantly
+- MySource JoinStringsSniff no longer reports an error when using join() on a named JS array
+- Warnings are now reported for each file when they cannot be opened instead of stopping the script
+ - Hide warnings with the -n command line argument
+ - Can override the warnings using the code Internal.DetectLineEndings
+
+### Fixed
+- Fixed bug #17693 : issue with pre-commit hook script with filenames that start with v
+- Fixed bug #17860 : isReference function fails with references in array
+ - Thanks to [Lincoln Maskey][pear-ljmaskey] for the patch
+- Fixed bug #17902 : Cannot run tests when tests are symlinked into tests dir
+ - Thanks to [Matt Button][@BRMatt] for the patch
+- Fixed bug #17928 : Improve error message for Generic_Sniffs_PHP_UpperCaseConstantSniff
+ - Thanks to [Stefano Kowalke][@Konafets] for the patch
+- Fixed bug #18039 : JS Tokenizer crash when ] is last character in file
+- Fixed bug #18047 : Incorrect handling of namespace aliases as constants
+ - Thanks to [Dmitri Medvedev][pear-dvino] for the patch
+- Fixed bug #18072 : Impossible to exclude path from processing when symlinked
+- Fixed bug #18073 : Squiz.PHP.NonExecutableCode fault
+- Fixed bug #18117 : PEAR coding standard: Method constructor not sniffed as a function
+- Fixed bug #18135 : Generic FunctionCallArgumentSpacingSniff reports function declaration errors
+- Fixed bug #18140 : Generic scope indent in exact mode: strange expected/found values for switch
+- Fixed bug #18145 : Sniffs are not loaded for custom ruleset file
+ - Thanks to [Scott McCammon][pear-mccammos] for the patch
+- Fixed bug #18152 : While and do-while with AbstractPatternSniff
+- Fixed bug #18191 : Squiz.PHP.LowercasePHPFunctions does not work with new Date()
+- Fixed bug #18193 : CodeSniffer doesn't reconize CR (\r) line endings
+
+## 1.3.0RC1 - 2010-09-03
+### Changed
+- Added exclude pattern support to ruleset.xml file so you can specify ignore patterns in a standard (request #17683)
+ - Use new exclude-pattern tags to include the ignore rules into your ruleset.xml file
+ - See CodeSniffer/Standards/PHPCS/ruleset.xml for an example
+- Added new --encoding command line argument to specify the encoding of the files being checked
+ - When set to utf-8, stops the XML-based reports from double-encoding
+ - When set to something else, helps the XML-based reports encode to utf-8
+ - Default value is iso-8859-1 but can be changed with --config-set encoding [value]
+- The report is no longer printed to screen when using the --report-file command line option (request #17467)
+ - If you want to print it to screen as well, use the -v command line argument
+- The SVN and GIT blame reports now also show percentage of reported errors per author (request #17606)
+ - Thanks to [Ben Selby][@benmatselby] for the patch
+- Updated the SVN pre-commit hook to work with the new severity levels feature
+- Generic SubversionPropertiesSniff now allows properties to have NULL values (request #17682)
+ - A null value indicates that the property should exist but the value should not be checked
+- Generic UpperCaseConstantName Sniff now longer complains about the PHPUnit_MAIN_METHOD constant (request #17798)
+- Squiz FileComment sniff now checks JS files as well as PHP files
+- Squiz FunctionCommentSniff now supports namespaces in type hints
+
+### Fixed
+- Fixed a problem in Squiz OutputBufferingIndentSniff where block comments were reported as not indented
+- Fixed bug #17092 : Problems with utf8_encode and htmlspecialchars with non-ascii chars
+ - Use the new --encoding=utf-8 command line argument if your files are utf-8 encoded
+- Fixed bug #17629 : PHP_CodeSniffer_Tokens::$booleanOperators missing T_LOGICAL_XOR
+ - Thanks to [Matthew Turland][@elazar] for the patch
+- Fixed bug #17699 : Fatal error generating code coverage with PHPUnit 5.3.0RC1
+- Fixed bug #17718 : Namespace 'use' statement: used global class name is recognized as constant
+- Fixed bug #17734 : Generic SubversionPropertiesSniff complains on non SVN files
+- Fixed bug #17742 : EmbeddedPhpSniff reacts negatively to file without closing php tag
+- Fixed bug #17823 : Notice: Please no longer include PHPUnit/Framework.php
+
+## 1.3.0a1 - 2010-07-15
+### Changed
+- All CodingStandard.php files have been replaced by ruleset.xml files
+ - Custom standards will need to be converted over to this new format to continue working
+- You can specify a path to your own custom ruleset.xml file by using the --standard command line arg
+ - e.g., phpcs --standard=/path/to/my/ruleset.xml
+- Added a new report type --report=gitblame to show how many errors and warnings were committed by each author
+ - Has the same functionality as the svnblame report
+ - Thanks to [Ben Selby][@benmatselby] for the patch
+- A new token type T_DOLLAR has been added to allow you to sniff for variable variables (feature request #17095)
+ - Thanks to [Ian Young][pear-youngian] for the patch
+- JS tokenizer now supports T_POWER (^) and T_MOD_EQUAL (%=) tokens (feature request #17441)
+- If you have PHP_Timer installed, you'll now get a time/memory summary at the end of a script run
+ - Only happens when printing reports that are designed to be read on the command line
+- Added Generic DeprecatedFunctionsSniff to warn about the use of deprecated functions (feature request #16694)
+ - Thanks to [Sebastian Bergmann][@sebastianbergmann] for the patch
+- Added Squiz LogicalOperatorSniff to ensure that logical operators are surrounded by single spaces
+- Added MySource ChannelExceptionSniff to ensure action files only throw ChannelException
+- Added new method getClassProperties() for sniffs to use to determine if a class is abstract and/or final
+ - Thanks to [Christian Kaps][@akkie] for the patch
+- Generic UpperCaseConstantSniff no longer throws errors about namespaces
+ - Thanks to [Christian Kaps][@akkie] for the patch
+- Squiz OperatorBracketSniff now correctly checks value assignments in arrays
+- Squiz LongConditionClosingCommentSniff now requires a comment for long CASE statements that use curly braces
+- Squiz LongConditionClosingCommentSniff now requires an exact comment match on the brace
+- MySource IncludeSystemSniff now ignores DOMDocument usage
+- MySource IncludeSystemSniff no longer requires inclusion of systems that are being implemented
+- Removed found and expected messages from Squiz ConcatenationSpacingSniff because they were messy and not helpful
+
+### Fixed
+- Fixed a problem where Generic CodeAnalysisSniff could show warnings if checking multi-line strings
+- Fixed error messages in Squiz ArrayDeclarationSniff reporting incorrect number of found and expected spaces
+- Fixed bug #17048 : False positive in Squiz_WhiteSpace_ScopeKeywordSpacingSniff
+- Fixed bug #17054 : phpcs more strict than PEAR CS regarding function parameter spacing
+- Fixed bug #17096 : Notice: Undefined index: scope_condition in ScopeClosingBraceSniff.php
+ - Moved PEAR.Functions.FunctionCallArgumentSpacing to Generic.Functions.FunctionCallArgumentSpacing
+- Fixed bug #17144 : Deprecated: Function eregi() is deprecated
+- Fixed bug #17236 : PHP Warning due to token_get_all() in DoubleQuoteUsageSniff
+- Fixed bug #17243 : Alternate Switch Syntax causes endless loop of Notices in SwitchDeclaration
+- Fixed bug #17313 : Bug with switch case structure
+- Fixed bug #17331 : Possible parse error: interfaces may not include member vars
+- Fixed bug #17337 : CSS tokenizer fails on quotes urls
+- Fixed bug #17420 : Uncaught exception when comment before function brace
+- Fixed bug #17503 : closures formatting is not supported
+
+## 1.2.2 - 2010-01-27
+### Changed
+- The core PHP_CodeSniffer_File methods now understand the concept of closures (feature request #16866)
+ - Thanks to [Christian Kaps][@akkie] for the sample code
+- Sniffs can now specify violation codes for each error and warning they add
+ - Future versions will allow you to override messages and severities using these codes
+ - Specifying a code is optional, but will be required if you wish to support overriding
+- All reports have been broken into separate classes
+ - Command line usage and report output remains the same
+ - Thanks to Gabriele Santini for the patch
+- Added an interactive mode that can be enabled using the -a command line argument
+ - Scans files and stops when it finds a file with errors
+ - Waits for user input to recheck the file (hopefully you fixed the errors) or skip the file
+ - Useful for very large code bases where full rechecks take a while
+- The reports now show the correct number of errors and warnings found
+- The isCamelCaps method now allows numbers in class names
+- The JS tokenizer now correctly identifies boolean and bitwise AND and OR tokens
+- The JS tokenizer now correctly identifies regular expressions used in conditions
+- PEAR ValidFunctionNameSniff now ignores closures
+- Squiz standard now uses the PEAR setting of 85 chars for LineLengthSniff
+- Squiz ControlStructureSpacingSniff now ensure there are no spaces around parentheses
+- Squiz LongConditionClosingCommentSniff now checks for comments at the end of try/catch statements
+- Squiz LongConditionClosingCommentSniff now checks validity of comments for short structures if they exist
+- Squiz IncrementDecrementUsageSniff now has better checking to ensure it only looks at simple variable assignments
+- Squiz PostStatementCommentSniff no longer throws errors for end function comments
+- Squiz InlineCommentSniff no longer throws errors for end function comments
+- Squiz OperatorBracketSniff now allows simple arithmetic operations in SWITCH conditions
+- Squiz ValidFunctionNameSniff now ignores closures
+- Squiz MethodScopeSniff now ignores closures
+- Squiz ClosingDeclarationCommentSniff now ignores closures
+- Squiz GlobalFunctionSniff now ignores closures
+- Squiz DisallowComparisonAssignmentSniff now ignores the assigning of arrays
+- Squiz DisallowObjectStringIndexSniff now allows indexes that contain dots and reserved words
+- Squiz standard now throws nesting level and cyclomatic complexity errors at much higher levels
+- Squiz CommentedOutCodeSniff now ignores common comment framing characters
+- Squiz ClassCommentSniff now ensures the open comment tag is the only content on the first line
+- Squiz FileCommentSniff now ensures the open comment tag is the only content on the first line
+- Squiz FunctionCommentSniff now ensures the open comment tag is the only content on the first line
+- Squiz VariableCommentSniff now ensures the open comment tag is the only content on the first line
+- Squiz NonExecutableCodeSniff now warns about empty return statements that are not required
+- Removed ForbiddenStylesSniff from Squiz standard
+ - It is now in in the MySource standard as BrowserSpecificStylesSniff
+ - New BrowserSpecificStylesSniff ignores files with browser-specific suffixes
+- MySource IncludeSystemSniff no longer throws errors when extending the Exception class
+- MySource IncludeSystemSniff no longer throws errors for the abstract widget class
+- MySource IncludeSystemSniff and UnusedSystemSniff now allow includes inside IF statements
+- MySource IncludeSystemSniff no longer throws errors for included widgets inside methods
+- MySource GetRequestDataSniff now throws errors for using $_FILES
+- MySource CreateWidgetTypeCallbackSniff now allows return statements in nested functions
+- MySource DisallowSelfActionsSniff now ignores abstract classes
+
+### Fixed
+- Fixed a problem with the SVN pre-commit hook for PHP versions without vertical whitespace regex support
+- Fixed bug #16740 : False positives for heredoc strings and unused parameter sniff
+- Fixed bug #16794 : ValidLogicalOperatorsSniff doesn't report operators not in lowercase
+- Fixed bug #16804 : Report filename is shortened too much
+- Fixed bug #16821 : Bug in Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #16836 : Notice raised when using semicolon to open case
+- Fixed bug #16855 : Generic standard sniffs incorrectly for define() method
+- Fixed bug #16865 : Two bugs in Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #16902 : Inline If Declaration bug
+- Fixed bug #16960 : False positive for late static binding in Squiz/ScopeKeywordSpacingSniff
+ - Thanks to [Jakub Tománek][pear-thezero] for the patch
+- Fixed bug #16976 : The phpcs attempts to process symbolic links that don't resolve to files
+- Fixed bug #17017 : Including one file in the files sniffed alters errors reported for another file
+
+## 1.2.1 - 2009-11-17
+### Changed
+- Added a new report type --report=svnblame to show how many errors and warnings were committed by each author
+ - Also shows the percentage of their code that are errors and warnings
+ - Requires you to have the SVN command in your path
+ - Make sure SVN is storing usernames and passwords (if required) or you will need to enter them for each file
+ - You can also use the -s command line argument to see the different types of errors authors are committing
+ - You can use the -v command line argument to see all authors, even if they have no errors or warnings
+- Added a new command line argument --report-width to allow you to set the column width of screen reports
+ - Reports wont accept values less than 70 or else they get too small
+ - Can also be set via a config var: phpcs --config-set report_width 100
+- You can now get PHP_CodeSniffer to ignore a whole file by adding @codingStandardsIgnoreFile in the content
+ - If you put it in the first two lines the file wont even be tokenized, so it will be much quicker
+- Reports now print their file lists in alphabetical order
+- PEAR FunctionDeclarationSniff now reports error for incorrect closing bracket placement in multi-line definitions
+- Added Generic CallTimePassByReferenceSniff to prohibit the passing of variables into functions by reference
+ - Thanks to Florian Grandel for the contribution
+- Added Squiz DisallowComparisonAssignmentSniff to ban the assignment of comparison values to a variable
+- Added Squiz DuplicateStyleDefinitionSniff to check for duplicate CSS styles in a single class block
+- Squiz ArrayDeclarationSniff no longer checks the case of array indexes because that is not its job
+- Squiz PostStatementCommentSniff now allows end comments for class member functions
+- Squiz InlineCommentSniff now supports the checking of JS files
+- MySource CreateWidgetTypeCallbackSniff now allows the callback to be passed to another function
+- MySource CreateWidgetTypeCallbackSniff now correctly ignores callbacks used inside conditions
+- Generic MultipleStatementAlignmentSniff now enforces a single space before equals sign if max padding is reached
+- Fixed a problem in the JS tokenizer where regular expressions containing \// were not converted correctly
+- Fixed a problem tokenizing CSS files where multiple ID targets on a line would look like comments
+- Fixed a problem tokenizing CSS files where class names containing a colon looked like style definitions
+- Fixed a problem tokenizing CSS files when style statements had empty url() calls
+- Fixed a problem tokenizing CSS colours with the letter E in first half of the code
+- Squiz ColonSpacingSniff now ensures it is only checking style definitions in CSS files and not class names
+- Squiz DisallowComparisonAssignmentSniff no longer reports errors when assigning the return value of a function
+- CSS tokenizer now correctly supports multi-line comments
+- When only the case of var names differ for function comments, the error now indicates the case is different
+
+### Fixed
+- Fixed an issue with Generic UnnecessaryStringConcatSniff where it incorrectly suggested removing a concat
+- Fixed bug #16530 : ScopeIndentSniff reports false positive
+- Fixed bug #16533 : Duplicate errors and warnings
+- Fixed bug #16563 : Check file extensions problem in phpcs-svn-pre-commit
+ - Thanks to [Kaijung Chen][pear-et3w503] for the patch
+- Fixed bug #16592 : Object operator indentation incorrect when first operator is on a new line
+- Fixed bug #16641 : Notice output
+- Fixed bug #16682 : Squiz_Sniffs_Strings_DoubleQuoteUsageSniff reports string "\0" as invalid
+- Fixed bug #16683 : Typing error in PHP_CodeSniffer_CommentParser_AbstractParser
+- Fixed bug #16684 : Bug in Squiz_Sniffs_PHP_NonExecutableCodeSniff
+- Fixed bug #16692 : Spaces in paths in Squiz_Sniffs_Debug_JavaScriptLintSniff
+ - Thanks to [Jaroslav Hanslík][@kukulich] for the patch
+- Fixed bug #16696 : Spelling error in MultiLineConditionSniff
+- Fixed bug #16697 : MultiLineConditionSniff incorrect result with inline IF
+- Fixed bug #16698 : Notice in JavaScript Tokenizer
+- Fixed bug #16736 : Multi-files sniffs aren't processed when FILE is a single directory
+ - Thanks to [Alexey Shein][pear-conf] for the patch
+- Fixed bug #16792 : Bug in Generic_Sniffs_PHP_ForbiddenFunctionsSniff
+
+## 1.2.0 - 2009-08-17
+### Changed
+- Installed standards are now favoured over custom standards when using the cmd line arg with relative paths
+- Unit tests now use a lot less memory while running
+- Squiz standard now uses Generic EmptyStatementSniff but throws errors instead of warnings
+- Squiz standard now uses Generic UnusedFunctionParameterSniff
+- Removed unused ValidArrayIndexNameSniff from the Squiz standard
+
+### Fixed
+- Fixed bug #16424 : SubversionPropertiesSniff print PHP Warning
+- Fixed bug #16450 : Constant PHP_CODESNIFFER_VERBOSITY already defined (unit tests)
+- Fixed bug #16453 : function declaration long line splitted error
+- Fixed bug #16482 : phpcs-svn-pre-commit ignores extensions parameter
+
+## 1.2.0RC3 - 2009-07-07
+### Changed
+- You can now use @codingStandardsIgnoreStart and @...End comments to suppress messages (feature request #14002)
+- A warning is now included for files without any code when short_open_tag is set to Off (feature request #12952)
+- You can now use relative paths to your custom standards with the --standard cmd line arg (feature request #14967)
+- You can now override magic methods and functions in PEAR ValidFunctionNameSniff (feature request #15830)
+- MySource IncludeSystemSniff now recognises widget action classes
+- MySource IncludeSystemSniff now knows about unit test classes and changes rules accordingly
+
+## 1.2.0RC2 - 2009-05-25
+### Changed
+- Test suite can now be run using the full path to AllTests.php (feature request #16179)
+
+### Fixed
+- Fixed bug #15980 : PHP_CodeSniffer change php current directory
+ - Thanks to [Dolly Aswin Harahap][pear-dollyaswin] for the patch
+- Fixed bug #16001 : Notice triggered
+- Fixed bug #16054 : phpcs-svn-pre-commit not showing any errors
+- Fixed bug #16071 : Fatal error: Uncaught PHP_CodeSniffer_Exception
+- Fixed bug #16170 : Undefined Offset -1 in MultiLineConditionSniff.php on line 68
+- Fixed bug #16175 : Bug in Squiz-IncrementDecrementUsageSniff
+
+## 1.2.0RC1 - 2009-03-09
+### Changed
+- Reports that are output to a file now include a trailing newline at the end of the file
+- Fixed sniff names not shown in -vvv token processing output
+- Added Generic SubversionPropertiesSniff to check that specific svn props are set for files
+ - Thanks to Jack Bates for the contribution
+- The PHP version check can now be overridden in classes that extend PEAR FileCommentSniff
+ - Thanks to [Helgi Þormar Þorbjörnsson][@helgi] for the suggestion
+- Added Generic ConstructorNameSniff to check for PHP4 constructor name usage
+ - Thanks to Leif Wickland for the contribution
+- Squiz standard now supports multi-line function and condition sniffs from PEAR standard
+- Squiz standard now uses Generic ConstructorNameSniff
+- Added MySource GetRequestDataSniff to ensure REQUEST, GET and POST are not accessed directly
+- Squiz OperatorBracketSniff now allows square brackets in simple unbracketed operations
+
+### Fixed
+- Fixed the incorrect tokenizing of multi-line block comments in CSS files
+- Fixed bug #15383 : Uncaught PHP_CodeSniffer_Exception
+- Fixed bug #15408 : An unexpected exception has been caught: Undefined offset: 2
+- Fixed bug #15519 : Uncaught PHP_CodeSniffer_Exception
+- Fixed bug #15624 : Pre-commit hook fails with PHP errors
+- Fixed bug #15661 : Uncaught PHP_CodeSniffer_Exception
+- Fixed bug #15722 : "declare(encoding = 'utf-8');" leads to "Missing file doc comment"
+- Fixed bug #15910 : Object operator indention not calculated correctly
+
+## 1.2.0a1 - 2008-12-18
+### Changed
+- PHP_CodeSniffer now has a CSS tokenizer for checking CSS files
+- Added support for a new multi-file sniff that sniffs all processed files at once
+- Added new output format --report=emacs to output errors using the emacs standard compile output format
+ - Thanks to Len Trigg for the contribution
+- Reports can now be written to a file using the --report-file command line argument (feature request #14953)
+ - The report is also written to screen when using this argument
+- The CheckStyle, CSV and XML reports now include a source for each error and warning (feature request #13242)
+ - A new report type --report=source can be used to show you the most common errors in your files
+- Added new command line argument -s to show error sources in all reports
+- Added new command line argument --sniffs to specify a list of sniffs to restrict checking to
+ - Uses the sniff source codes that are optionally displayed in reports
+- Changed the max width of error lines from 80 to 79 chars to stop blank lines in the default windows cmd window
+- PHP_CodeSniffer now has a token for an asperand (@ symbol) so sniffs can listen for them
+ - Thanks to Andy Brockhurst for the patch
+- Added Generic DuplicateClassNameSniff that will warn if the same class name is used in multiple files
+ - Not currently used by any standard; more of a multi-file sniff sample than anything useful
+- Added Generic NoSilencedErrorsSniff that warns if PHP errors are being silenced using the @ symbol
+ - Thanks to Andy Brockhurst for the contribution
+- Added Generic UnnecessaryStringConcatSniff that checks for two strings being concatenated
+- Added PEAR FunctionDeclarationSniff to enforce the new multi-line function declaration PEAR standard
+- Added PEAR MultiLineAssignmentSniff to enforce the correct indentation of multi-line assignments
+- Added PEAR MultiLineConditionSniff to enforce the new multi-line condition PEAR standard
+- Added PEAR ObjectOperatorIndentSniff to enforce the new chained function call PEAR standard
+- Added MySource DisallowSelfActionSniff to ban the use of self::method() calls in Action classes
+- Added MySource DebugCodeSniff to ban the use of Debug::method() calls
+- Added MySource CreateWidgetTypeCallback sniff to check callback usage in widget type create methods
+- Added Squiz DisallowObjectStringIndexSniff that forces object dot notation in JavaScript files
+ - Thanks to [Sertan Danis][@sertand] for the contribution
+- Added Squiz DiscouragedFunctionsSniff to warn when using debug functions
+- Added Squiz PropertyLabelSniff to check whitespace around colons in JS property and label declarations
+- Added Squiz DuplicatePropertySniff to check for duplicate property names in JS classes
+- Added Squiz ColonSpacingSniff to check for spacing around colons in CSS style definitions
+- Added Squiz SemicolonSpacingSniff to check for spacing around semicolons in CSS style definitions
+- Added Squiz IndentationSniff to check for correct indentation of CSS files
+- Added Squiz ColourDefinitionSniff to check that CSS colours are defined in uppercase and using shorthand
+- Added Squiz EmptyStyleDefinitionSniff to check for CSS style definitions without content
+- Added Squiz EmptyClassDefinitionSniff to check for CSS class definitions without content
+- Added Squiz ClassDefinitionOpeningBraceSpaceSniff to check for spaces around opening brace of CSS class definitions
+- Added Squiz ClassDefinitionClosingBraceSpaceSniff to check for a single blank line after CSS class definitions
+- Added Squiz ClassDefinitionNameSpacingSniff to check for a blank lines inside CSS class definition names
+- Added Squiz DisallowMultipleStyleDefinitionsSniff to check for multiple style definitions on a single line
+- Added Squiz DuplicateClassDefinitionSniff to check for duplicate CSS class blocks that can be merged
+- Added Squiz ForbiddenStylesSniff to check for usage of browser specific styles
+- Added Squiz OpacitySniff to check for incorrect opacity values in CSS
+- Added Squiz LowercaseStyleDefinitionSniff to check for styles that are not defined in lowercase
+- Added Squiz MissingColonSniff to check for style definitions where the colon has been forgotten
+- Added Squiz MultiLineFunctionDeclarationSniff to check that multi-line declarations contain one param per line
+- Added Squiz JSLintSniff to check for JS errors using the jslint.js script through Rhino
+ - Set jslint path using phpcs --config-set jslint_path /path/to/jslint.js
+ - Set rhino path using phpcs --config-set rhino_path /path/to/rhino
+- Added Generic TodoSniff that warns about comments that contain the word TODO
+- Removed MultipleStatementAlignmentSniff from the PEAR standard as alignment is now optional
+- Generic ForbiddenFunctionsSniff now has protected member var to specify if it should use errors or warnings
+- Generic MultipleStatementAlignmentSniff now has correct error message if assignment is on a new line
+- Generic MultipleStatementAlignmentSniff now has protected member var to allow it to ignore multi-line assignments
+- Generic LineEndingsSniff now supports checking of JS files
+- Generic LineEndingsSniff now supports checking of CSS files
+- Generic DisallowTabIndentSniff now supports checking of CSS files
+- Squiz DoubleQuoteUsageSniff now bans the use of variables in double quoted strings in favour of concatenation
+- Squiz SuperfluousWhitespaceSniff now supports checking of JS files
+- Squiz SuperfluousWhitespaceSniff now supports checking of CSS files
+- Squiz DisallowInlineIfSniff now supports checking of JS files
+- Squiz SemicolonSpacingSniff now supports checking of JS files
+- Squiz PostStatementCommentSniff now supports checking of JS files
+- Squiz FunctionOpeningBraceSpacingSniff now supports checking of JS files
+- Squiz FunctionClosingBraceSpacingSniff now supports checking of JS files
+ - Empty JS functions must have their opening and closing braces next to each other
+- Squiz ControlStructureSpacingSniff now supports checking of JS files
+- Squiz LongConditionClosingCommentSniff now supports checking of JS files
+- Squiz OperatorSpacingSniff now supports checking of JS files
+- Squiz SwitchDeclarationSniff now supports checking of JS files
+- Squiz CommentedOutCodeSniff now supports checking of CSS files
+- Squiz DisallowSizeFunctionsInLoopsSniff now supports checking of JS files for the use of object.length
+- Squiz DisallowSizeFunctionsInLoopsSniff no longer complains about size functions outside of the FOR condition
+- Squiz ControlStructureSpacingSniff now bans blank lines at the end of a control structure
+- Squiz ForLoopDeclarationSniff no longer throws errors for JS FOR loops without semicolons
+- Squiz MultipleStatementAlignmentSniff no longer throws errors if a statement would take more than 8 spaces to align
+- Squiz standard now uses Generic TodoSniff
+- Squiz standard now uses Generic UnnecessaryStringConcatSniff
+- Squiz standard now uses PEAR MultiLineAssignmentSniff
+- Squiz standard now uses PEAR MultiLineConditionSniff
+- Zend standard now uses OpeningFunctionBraceBsdAllmanSniff (feature request #14647)
+- MySource JoinStringsSniff now bans the use of inline array joins and suggests the + operator
+- Fixed incorrect errors that can be generated from abstract scope sniffs when moving to a new file
+- Core tokenizer now matches orphaned curly braces in the same way as square brackets
+- Whitespace tokens at the end of JS files are now added to the token stack
+- JavaScript tokenizer now identifies properties and labels as new token types
+- JavaScript tokenizer now identifies object definitions as a new token type and matches curly braces for them
+- JavaScript tokenizer now identifies DIV_EQUAL and MUL_EQUAL tokens
+- Improved regular expression detection in the JavaScript tokenizer
+- Improve AbstractPatternSniff support so it can listen for any token type, not just weighted tokens
+
+### Fixed
+- Fixed Squiz DoubleQuoteUsageSniff so it works correctly with short_open_tag=Off
+- Fixed bug #14409 : Output of warnings to log file
+- Fixed bug #14520 : Notice: Undefined offset: 1 in /usr/share/php/PHP/CodeSniffer/File.php on line
+- Fixed bug #14637 : Call to processUnknownArguments() misses second parameter $pos
+ - Thanks to [Peter Buri][pear-burci] for the patch
+- Fixed bug #14889 : Lack of clarity: licence or license
+- Fixed bug #15008 : Nested Parentheses in Control Structure Sniffs
+- Fixed bug #15091 : pre-commit hook attempts to sniff folders
+ - Thanks to [Bruce Weirdan][pear-weirdan] for the patch
+- Fixed bug #15124 : AbstractParser.php uses deprecated split() function
+ - Thanks to [Sebastian Bergmann][@sebastianbergmann] for the patch
+- Fixed bug #15188 : PHPCS vs HEREDOC strings
+- Fixed bug #15231 : Notice: Uninitialized string offset: 0 in FileCommentSniff.php on line 555
+- Fixed bug #15336 : Notice: Undefined offset: 2 in /usr/share/php/PHP/CodeSniffer/File.php on line
+
+## 1.1.0 - 2008-07-14
+### Changed
+- PEAR FileCommentSniff now allows tag orders to be overridden in child classes
+ - Thanks to Jeff Hodsdon for the patch
+- Added Generic DisallowMultipleStatementsSniff to ensure there is only one statement per line
+- Squiz standard now uses DisallowMultipleStatementsSniff
+
+### Fixed
+- Fixed error in Zend ValidVariableNameSniff when checking vars in form: $class->{$var}
+- Fixed bug #14077 : Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not a class member
+- Fixed bug #14168 : Global Function -> Static Method and __autoload()
+- Fixed bug #14238 : Line length not checked at last line of a file
+- Fixed bug #14249 : wrong detection of scope_opener
+- Fixed bug #14250 : ArrayDeclarationSniff emit warnings at malformed array
+- Fixed bug #14251 : --extensions option doesn't work
+
+## 1.1.0RC3 - 2008-07-03
+### Changed
+- PEAR FileCommentSniff now allows tag orders to be overridden in child classes
+ - Thanks to Jeff Hodsdon for the patch
+- Added Generic DisallowMultipleStatementsSniff to ensure there is only one statement per line
+- Squiz standard now uses DisallowMultipleStatementsSniff
+
+### Fixed
+- Fixed error in Zend ValidVariableNameSniff when checking vars in form: $class->{$var}
+- Fixed bug #14077 : Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not a class member
+- Fixed bug #14168 : Global Function -> Static Method and __autoload()
+- Fixed bug #14238 : Line length not checked at last line of a file
+- Fixed bug #14249 : wrong detection of scope_opener
+- Fixed bug #14250 : ArrayDeclarationSniff emit warnings at malformed array
+- Fixed bug #14251 : --extensions option doesn't work
+
+## 1.1.0RC2 - 2008-06-13
+### Changed
+- Permission denied errors now stop script execution but still display current errors (feature request #14076)
+- Added Squiz ValidArrayIndexNameSniff to ensure array indexes do not use camel case
+- Squiz ArrayDeclarationSniff now ensures arrays are not declared with camel case index values
+- PEAR ValidVariableNameSniff now alerts about a possible parse error for member vars inside an interface
+
+### Fixed
+- Fixed bug #13921 : js parsing fails for comments on last line of file
+- Fixed bug #13922 : crash in case of malformed (but tokenized) php file
+ - PEAR and Squiz ClassDeclarationSniff now throw warnings for possible parse errors
+ - Squiz ValidClassNameSniff now throws warning for possible parse errors
+ - Squiz ClosingDeclarationCommentSniff now throws additional warnings for parse errors
+
+## 1.1.0RC1 - 2008-05-13
+### Changed
+- Added support for multiple tokenizers so PHP_CodeSniffer can check more than just PHP files
+ - PHP_CodeSniffer now has a JS tokenizer for checking JavaScript files
+ - Sniffs need to be updated to work with additional tokenizers, or new sniffs written for them
+- phpcs now exits with status 2 if the tokenizer extension has been disabled (feature request #13269)
+- Added scripts/phpcs-svn-pre-commit that can be used as an SVN pre-commit hook
+ - Also reworked the way the phpcs script works to make it easier to wrap it with other functionality
+ - Thanks to Jack Bates for the contribution
+- Fixed error in phpcs error message when a supplied file does not exist
+- Fixed a cosmetic error in AbstractPatternSniff where the "found" string was missing some content
+- Added sniffs that implement part of the PMD rule catalog to the Generic standard
+ - Thanks to [Manuel Pichler][@manuelpichler] for the contribution of all these sniffs.
+- Squiz FunctionCommentThrowTagSniff no longer throws errors for function that only throw variables
+- Generic ScopeIndentSniff now has private member to enforce exact indent matching
+- Replaced Squiz DisallowCountInLoopsSniff with Squiz DisallowSizeFunctionsInLoopsSniff
+ - Thanks to Jan Miczaika for the sniff
+- Squiz BlockCommentSniff now checks inline doc block comments
+- Squiz InlineCommentSniff now checks inline doc block comments
+- Squiz BlockCommentSniff now checks for no blank line before first comment in a function
+- Squiz DocCommentAlignmentSniff now ignores inline doc block comments
+- Squiz ControlStructureSpacingSniff now ensures no blank lines at the start of control structures
+- Squiz ControlStructureSpacingSniff now ensures no blank lines between control structure closing braces
+- Squiz IncrementDecrementUsageSniff now ensures inc/dec ops are bracketed in string concats
+- Squiz IncrementDecrementUsageSniff now ensures inc/dec ops are not used in arithmetic operations
+- Squiz FunctionCommentSniff no longer throws errors if return value is mixed but function returns void somewhere
+- Squiz OperatorBracketSniff no allows function call brackets to count as operator brackets
+- Squiz DoubleQuoteUsageSniff now supports \x \f and \v (feature request #13365)
+- Squiz ComparisonOperatorUsageSniff now supports JS files
+- Squiz ControlSignatureSniff now supports JS files
+- Squiz ForLoopDeclarationSniff now supports JS files
+- Squiz OperatorBracketSniff now supports JS files
+- Squiz InlineControlStructureSniff now supports JS files
+- Generic LowerCaseConstantSniff now supports JS files
+- Generic DisallowTabIndentSniff now supports JS files
+- Generic MultipleStatementAlignmentSniff now supports JS files
+- Added Squiz ObjectMemberCommaSniff to ensure the last member of a JS object is not followed by a comma
+- Added Squiz ConstantCaseSniff to ensure the PHP constants are uppercase and JS lowercase
+- Added Squiz JavaScriptLintSniff to check JS files with JSL
+ - Set path using phpcs --config-set jsl_path /path/to/jsl
+- Added MySource FirebugConsoleSniff to ban the use of "console" for JS variable and function names
+- Added MySource JoinStringsSniff to enforce the use of join() to concatenate JS strings
+- Added MySource AssignThisSniff to ensure this is only assigned to a var called self
+- Added MySource DisallowNewWidgetSniff to ban manual creation of widget objects
+- Removed warning shown in Zend CodeAnalyzerSniff when the ZCA path is not set
+
+### Fixed
+- Fixed error in Squiz ValidVariableNameSniff when checking vars in the form $obj->$var
+- Fixed error in Squiz DisallowMultipleAssignmentsSniff when checking vars in the form $obj->$var
+- Fixed error in Squiz InlineCommentSniff where comments for class constants were seen as inline
+- Fixed error in Squiz BlockCommentSniff where comments for class constants were not ignored
+- Fixed error in Squiz OperatorBracketSniff where negative numbers were ignored during comparisons
+- Fixed error in Squiz FunctionSpacingSniff where functions after member vars reported incorrect spacing
+- Fixed bug #13062 : Interface comments aren't handled in PEAR standard
+ - Thanks to [Manuel Pichler][@manuelpichler] for the path
+- Fixed bug #13119 : php minimum requirement need to be fix
+- Fixed bug #13156 : Bug in Squiz_Sniffs_PHP_NonExecutableCodeSniff
+- Fixed bug #13158 : Strange behaviour in AbstractPatternSniff
+- Fixed bug #13169 : Undefined variables
+- Fixed bug #13178 : Catch exception in File.php
+- Fixed bug #13254 : Notices output in checkstyle report causes XML issues
+- Fixed bug #13446 : crash with src of phpMyAdmin
+ - Thanks to [Manuel Pichler][@manuelpichler] for the path
+
+## 1.0.1a1 - 2008-04-21
+### Changed
+- Fixed error in PEAR ValidClassNameSniff when checking class names with double underscores
+- Moved Squiz InlineControlStructureSniff into Generic standard
+- PEAR standard now throws warnings for inline control structures
+- Squiz OutputBufferingIndentSniff now ignores the indentation of inline HTML
+- MySource IncludeSystemSniff now ignores usage of ZipArchive
+- Removed "function" from error messages for Generic function brace sniffs (feature request #13820)
+- Generic UpperCaseConstantSniff no longer throws errors for declare(ticks = ...)
+ - Thanks to Josh Snyder for the patch
+- Squiz ClosingDeclarationCommentSniff and AbstractVariableSniff now throw warnings for possible parse errors
+
+### Fixed
+- Fixed bug #13827 : AbstractVariableSniff throws "undefined index"
+- Fixed bug #13846 : Bug in Squiz.NonExecutableCodeSniff
+- Fixed bug #13849 : infinite loop in PHP_CodeSniffer_File::findNext()
+
+## 1.0.1 - 2008-02-04
+### Changed
+- Squiz ArrayDeclarationSniff now throws error if the array keyword is followed by a space
+- Squiz ArrayDeclarationSniff now throws error for empty multi-line arrays
+- Squiz ArrayDeclarationSniff now throws error for multi-line arrays with a single value
+- Squiz DocCommentAlignmentSniff now checks for a single space before tags inside docblocks
+- Squiz ForbiddenFunctionsSniff now disallows is_null() to force use of (=== NULL) instead
+- Squiz VariableCommentSniff now continues throwing errors after the first one is found
+- Squiz SuperfluousWhitespaceSniff now throws errors for multiple blank lines inside functions
+- MySource IncludedSystemSniff now checks extended class names
+- MySource UnusedSystemSniff now checks extended and implemented class names
+- MySource IncludedSystemSniff now supports includeWidget()
+- MySource UnusedSystemSniff now supports includeWidget()
+- Added PEAR ValidVariableNameSniff to check that only private member vars are prefixed with an underscore
+- Added Squiz DisallowCountInLoopsSniff to check for the use of count() in FOR and WHILE loop conditions
+- Added MySource UnusedSystemSniff to check for included classes that are never used
+
+### Fixed
+- Fixed a problem that caused the parentheses map to sometimes contain incorrect values
+- Fixed bug #12767 : Cant run phpcs from dir with PEAR subdir
+- Fixed bug #12773 : Reserved variables are not detected in strings
+ - Thanks to [Wilfried Loche][pear-wloche] for the patch
+- Fixed bug #12832 : Tab to space conversion does not work
+- Fixed bug #12888 : extra space indentation = Notice: Uninitialized string offset...
+- Fixed bug #12909 : Default generateDocs function does not work under linux
+ - Thanks to [Paul Smith][pear-thing2b] for the patch
+- Fixed bug #12957 : PHP 5.3 magic method __callStatic
+ - Thanks to [Manuel Pichler][@manuelpichler] for the patch
+
+## 1.0.0 - 2007-12-21
+### Changed
+- You can now specify the full path to a coding standard on the command line (feature request #11886)
+ - This allows you to use standards that are stored outside of PHP_CodeSniffer's own Standard dir
+ - You can also specify full paths in the CodingStandard.php include and exclude methods
+ - Classes, dirs and files need to be names as if the standard was part of PHP_CodeSniffer
+ - Thanks to Dirk Thomas for the doc generator patch and testing
+- Modified the scope map to keep checking after 3 lines for some tokens (feature request #12561)
+ - Those tokens that must have an opener (like T_CLASS) now keep looking until EOF
+ - Other tokens (like T_FUNCTION) still stop after 3 lines for performance
+- You can now escape commas in ignore patterns so they can be matched in file names
+ - Thanks to [Carsten Wiedmann][pear-cwiedmann] for the patch
+- Config data is now cached in a global var so the file system is not hit so often
+ - You can also set config data temporarily for the script if you are using your own external script
+ - Pass TRUE as the third argument to PHP_CodeSniffer::setConfigData()
+- PEAR ClassDeclarationSniff no longer throws errors for multi-line class declarations
+- Squiz ClassDeclarationSniff now ensures there is one blank line after a class closing brace
+- Squiz ClassDeclarationSniff now throws errors for a missing end PHP tag after the end class tag
+- Squiz IncrementDecrementUsageSniff no longer throws errors when -= and += are being used with vars
+- Squiz SwitchDeclarationSniff now throws errors for switch statements that do not contain a case statement
+ - Thanks to [Sertan Danis][@sertand] for the patch
+- MySource IncludeSystemSniff no longer throws errors for the Util package
+
+### Fixed
+- Fixed bug #12621 : "space after AS" check is wrong
+ - Thanks to [Satoshi Oikawa][pear-renoiv] for the patch
+- Fixed bug #12645 : error message is wrong
+ - Thanks to [Satoshi Oikawa][pear-renoiv] for the patch
+- Fixed bug #12651 : Increment/Decrement Operators Usage at -1
+
+## 1.0.0RC3 - 2007-11-30
+### Changed
+- Added new command line argument --tab-width that will convert tabs to spaces before testing
+ - This allows you to use the existing sniffs that check for spaces even when you use tabs
+ - Can also be set via a config var: phpcs --config-set tab_width 4
+ - A value of zero (the default) tells PHP_CodeSniffer not to replace tabs with spaces
+- You can now change the default report format from "full" to something else
+ - Run: phpcs --config-set report_format [format]
+- Improved performance by optimising the way the scope map is created during tokenising
+- Added new Squiz DisallowInlineIfSniff to disallow the usage of inline IF statements
+- Fixed incorrect errors being thrown for nested switches in Squiz SwitchDeclarationSniff
+- PEAR FunctionCommentSniff no longer complains about missing comments for @throws tags
+- PEAR FunctionCommentSniff now throws error for missing exception class name for @throws tags
+- PHP_CodeSniffer_File::isReference() now correctly returns for functions that return references
+- Generic LineLengthSniff no longer warns about @version lines with CVS or SVN id tags
+- Generic LineLengthSniff no longer warns about @license lines with long URLs
+- Squiz FunctionCommentThrowTagSniff no longer complains about throwing variables
+- Squiz ComparisonOperatorUsageSniff no longer throws incorrect errors for inline IF statements
+- Squiz DisallowMultipleAssignmentsSniff no longer throws errors for assignments in inline IF statements
+
+### Fixed
+- Fixed bug #12455 : CodeSniffer treats content inside heredoc as PHP code
+- Fixed bug #12471 : Checkstyle report is broken
+- Fixed bug #12476 : PHP4 destructors are reported as error
+- Fixed bug #12513 : Checkstyle XML messages need to be utf8_encode()d
+ - Thanks to [Sebastian Bergmann][@sebastianbergmann] for the patch.
+- Fixed bug #12517 : getNewlineAfter() and dos files
+
+## 1.0.0RC2 - 2007-11-14
+### Changed
+- Added a new Checkstyle report format
+ - Like the current XML format but modified to look like Checkstyle output
+ - Thanks to [Manuel Pichler][@manuelpichler] for helping get the format correct
+- You can now hide warnings by default
+ - Run: phpcs --config-set show_warnings 0
+ - If warnings are hidden by default, use the new -w command line argument to override
+- Added new command line argument --config-delete to delete a config value and revert to the default
+- Improved overall performance by optimising tokenising and next/prev methods (feature request #12421)
+ - Thanks to [Christian Weiske][@cweiske] for the patch
+- Added FunctionCallSignatureSniff to Squiz standard
+- Added @subpackage support to file and class comment sniffs in PEAR standard (feature request #12382)
+ - Thanks to [Carsten Wiedmann][pear-cwiedmann] for the patch
+- An error is now displayed if you use a PHP version less than 5.1.0 (feature request #12380)
+ - Thanks to [Carsten Wiedmann][pear-cwiedmann] for the patch
+- phpcs now exits with status 2 if it receives invalid input (feature request #12380)
+ - This is distinct from status 1, which indicates errors or warnings were found
+- Added new Squiz LanguageConstructSpacingSniff to throw errors for additional whitespace after echo etc.
+- Removed Squiz ValidInterfaceNameSniff
+- PEAR FunctionCommentSniff no longer complains about unknown tags
+
+### Fixed
+- Fixed incorrect errors about missing function comments in PEAR FunctionCommentSniff
+- Fixed incorrect function docblock detection in Squiz FunctionCommentSniff
+- Fixed incorrect errors for list() in Squiz DisallowMultipleAssignmentsSniff
+- Errors no longer thrown if control structure is followed by a CASE's BREAK in Squiz ControlStructureSpacingSniff
+- Fixed bug #12368 : Autoloader cannot be found due to include_path override
+ - Thanks to [Richard Quadling][pear-rquadling] for the patch
+- Fixed bug #12378 : equal sign alignments problem with while()
+
+## 1.0.0RC1 - 2007-11-01
+### Changed
+- Main phpcs script can now be run from a CVS checkout without installing the package
+- Added a new CSV report format
+ - Header row indicates what position each element is in
+ - Always use the header row to determine positions rather than assuming the format, as it may change
+- XML and CSV report formats now contain information about which column the error occurred at
+ - Useful if you want to highlight the token that caused the error in a custom application
+- Square bracket tokens now have bracket_opener and bracket_closer set
+- Added new Squiz SemicolonSpacingSniff to throw errors if whitespace is found before a semicolon
+- Added new Squiz ArrayBracketSpacingSniff to throw errors if whitespace is found around square brackets
+- Added new Squiz ObjectOperatorSpacingSniff to throw errors if whitespace is found around object operators
+- Added new Squiz DisallowMultipleAssignmentsSniff to throw errors if multiple assignments are on the same line
+- Added new Squiz ScopeKeywordSpacingSniff to throw errors if there is not a single space after a scope modifier
+- Added new Squiz ObjectInstantiationSniff to throw errors if new objects are not assigned to a variable
+- Added new Squiz FunctionDuplicateArgumentSniff to throw errors if argument is declared multiple times in a function
+- Added new Squiz FunctionOpeningBraceSpaceSniff to ensure there are no blank lines after a function open brace
+- Added new Squiz CommentedOutCodeSniff to warn about comments that looks like they are commented out code blocks
+- Added CyclomaticComplexitySniff to Squiz standard
+- Added NestingLevelSniff to Squiz standard
+- Squiz ForbiddenFunctionsSniff now recommends echo() instead of print()
+- Squiz ValidLogicalOperatorsSniff now recommends ^ instead of xor
+- Squiz SwitchDeclarationSniff now contains more checks
+ - A single space is required after the case keyword
+ - No space is allowed before the colon in a case or default statement
+ - All switch statements now require a default case
+ - Default case must contain a break statement
+ - Empty default case must contain a comment describing why the default is ignored
+ - Empty case statements are not allowed
+ - Case and default statements must not be followed by a blank line
+ - Break statements must be followed by a blank line or the closing brace
+ - There must be no blank line before a break statement
+- Squiz standard is now using the PEAR IncludingFileSniff
+- PEAR ClassCommentSniff no longer complains about unknown tags
+- PEAR FileCommentSniff no longer complains about unknown tags
+- PEAR FileCommentSniff now accepts multiple @copyright tags
+- Squiz BlockCommentSniff now checks that comment starts with a capital letter
+- Squiz InlineCommentSniff now has better checking to ensure comment starts with a capital letter
+- Squiz ClassCommentSniff now checks that short and long comments start with a capital letter
+- Squiz FunctionCommentSniff now checks that short, long and param comments start with a capital letter
+- Squiz VariableCommentSniff now checks that short and long comments start with a capital letter
+
+### Fixed
+- Fixed error with multi-token array indexes in Squiz ArrayDeclarationSniff
+- Fixed error with checking shorthand IF statements without a semicolon in Squiz InlineIfDeclarationSniff
+- Fixed error where constants used as default values in function declarations were seen as type hints
+- Fixed bug #12316 : PEAR is no longer the default standard
+- Fixed bug #12321 : wrong detection of missing function docblock
+
+## 0.9.0 - 2007-09-24
+### Changed
+- Added a config system for setting config data across phpcs runs
+- You can now change the default coding standard from PEAR to something else
+ - Run: phpcs --config-set default_standard [standard]
+- Added new Zend coding standard to check code against the Zend Framework standards
+ - The complete standard is not yet implemented
+ - Specify --standard=Zend to use
+ - Thanks to Johann-Peter Hartmann for the contribution of some sniffs
+ - Thanks to Holger Kral for the Code Analyzer sniff
+
+## 0.8.0 - 2007-08-08
+### Changed
+- Added new XML report format; --report=xml (feature request #11535)
+ - Thanks to [Brett Bieber][@saltybeagle] for the patch
+- Added new command line argument --ignore to specify a list of files to skip (feature request #11556)
+- Added PHPCS and MySource coding standards into the core install
+- Scope map no longer gets confused by curly braces that act as string offsets
+- Removed CodeSniffer/SniffException.php as it is no longer used
+- Unit tests can now be run directly from a CVS checkout
+- Made private vars and functions protected in PHP_CodeSniffer class so this package can be overridden
+- Added new Metrics category to Generic coding standard
+ - Contains Cyclomatic Complexity and Nesting Level sniffs
+ - Thanks to Johann-Peter Hartmann for the contribution
+- Added new Generic DisallowTabIndentSniff to throw errors if tabs are used for indentation (feature request #11738)
+ - PEAR and Squiz standards use this new sniff to throw more specific indentation errors
+- Generic MultipleStatementAlignmentSniff has new private var to set a padding size limit (feature request #11555)
+- Generic MultipleStatementAlignmentSniff can now handle assignments that span multiple lines (feature request #11561)
+- Generic LineLengthSniff now has a max line length after which errors are thrown instead of warnings
+ - BC BREAK: Override the protected member var absoluteLineLimit and set it to zero in custom LineLength sniffs
+ - Thanks to Johann-Peter Hartmann for the contribution
+- Comment sniff errors about incorrect tag orders are now more descriptive (feature request #11693)
+
+### Fixed
+- Fixed bug #11473 : Invalid CamelCaps name when numbers used in names
+
+## 0.7.0 - 2007-07-02
+### Changed
+- BC BREAK: EOL character is now auto-detected and used instead of hard-coded \n
+ - Pattern sniffs must now specify "EOL" instead of "\n" or "\r\n" to use auto-detection
+ - Please use $phpcsFile->eolChar to check for newlines instead of hard-coding "\n" or "\r\n"
+ - Comment parser classes now require you to pass $phpcsFile as an additional argument
+- BC BREAK: Included and excluded sniffs now require .php extension
+ - Please update your coding standard classes and add ".php" to all sniff entries
+ - See CodeSniffer/Standards/PEAR/PEARCodingStandard.php for an example
+
+- Fixed error where including a directory of sniffs in a coding standard class did not work
+- Coding standard classes can now specify a list of sniffs to exclude as well as include (feature request #11056)
+- Two uppercase characters can now be placed side-by-side in class names in Squiz ValidClassNameSniff
+- SVN tags now allowed in PEAR file doc blocks (feature request #11038)
+ - Thanks to [Torsten Roehr][pear-troehr] for the patch
+- Private methods in commenting sniffs and comment parser are now protected (feature request #11087)
+- Added Generic LineEndingsSniff to check the EOL character of a file
+- PEAR standard now only throws one error per file for incorrect line endings (eg. /r/n)
+- Command line arg -v now shows number of registered sniffs
+- Command line arg -vvv now shows list of registered sniffs
+- Squiz ControlStructureSpacingSniff no longer throws errors if the control structure is at the end of the script
+- Squiz FunctionCommentSniff now throws error for "return void" if function has return statement
+- Squiz FunctionCommentSniff now throws error for functions that return void but specify something else
+- Squiz ValidVariableNameSniff now allows multiple uppercase letters in a row
+- Squiz ForEachLoopDeclarationSniff now throws error for AS keyword not being lowercase
+- Squiz SwitchDeclarationSniff now throws errors for CASE/DEFAULT/BREAK keywords not being lowercase
+- Squiz ArrayDeclarationSniff now handles multi-token array values when checking alignment
+- Squiz standard now enforces a space after cast tokens
+- Generic MultipleStatementAlignmentSniff no longer gets confused by assignments inside FOR conditions
+- Generic MultipleStatementAlignmentSniff no longer gets confused by the use of list()
+- Added Generic SpaceAfterCastSniff to ensure there is a single space after a cast token
+- Added Generic NoSpaceAfterCastSniff to ensure there is no whitespace after a cast token
+- Added PEAR ClassDeclarationSniff to ensure the opening brace of a class is on the line after the keyword
+- Added Squiz ScopeClosingBraceSniff to ensure closing braces are aligned correctly
+- Added Squiz EvalSniff to discourage the use of eval()
+- Added Squiz LowercaseDeclarationSniff to ensure all declaration keywords are lowercase
+- Added Squiz LowercaseClassKeywordsSniff to ensure all class declaration keywords are lowercase
+- Added Squiz LowercaseFunctionKeywordsSniff to ensure all function declaration keywords are lowercase
+- Added Squiz LowercasePHPFunctionsSniff to ensure all calls to inbuilt PHP functions are lowercase
+- Added Squiz CastSpacingSniff to ensure cast statements dont contain whitespace
+- Errors no longer thrown when checking 0 length files with verbosity on
+
+### Fixed
+- Fixed bug #11105 : getIncludedSniffs() not working anymore
+ - Thanks to [Blair Robertson][pear-adviva] for the patch
+- Fixed bug #11120 : Uninitialized string offset in AbstractParser.php on line 200
+
+## 0.6.0 - 2007-05-15
+### Changed
+- The number of errors and warnings found is now shown for each file while checking the file if verbosity is enabled
+- Now using PHP_EOL instead of hard-coded \n so output looks good on Windows (feature request #10761)
+ - Thanks to [Carsten Wiedmann][pear-cwiedmann] for the patch.
+- phpcs now exits with status 0 (no errors) or 1 (errors found) (feature request #10348)
+- Added new -l command line argument to stop recursion into directories (feature request #10979)
+
+### Fixed
+- Fixed variable name error causing incorrect error message in Squiz ValidVariableNameSniff
+- Fixed bug #10757 : Error in ControlSignatureSniff
+- Fixed bugs #10751, #10777 : Sniffer class paths handled incorrectly in Windows
+ - Thanks to [Carsten Wiedmann][pear-cwiedmann] for the patch.
+- Fixed bug #10961 : Error "Last parameter comment requires a blank newline after it" thrown
+- Fixed bug #10983 : phpcs outputs notices when checking invalid PHP
+- Fixed bug #10980 : Incorrect warnings for equals sign
+
+## 0.5.0 - 2007-04-17
+### Changed
+- BC BREAK: Coding standards now require a class to be added so PHP_CodeSniffer can get information from them
+ - Please read the end user docs for info about the new class required for all coding standards
+
+- Coding standards can now include sniffs from other standards, or whole standards, without writing new sniff files
+- PHP_CodeSniffer_File::isReference() now correctly returns for references in function declarations
+- PHP_CodeSniffer_File::isReference() now returns false if you don't pass it a T_BITWISE_AND token
+- PHP_CodeSniffer_File now stores the absolute path to the file so sniffs can check file locations correctly
+- Fixed undefined index error in AbstractVariableSniff for variables inside an interface function definition
+- Added MemberVarSpacingSniff to Squiz standard to enforce one-line spacing between member vars
+- Add FunctionCommentThrowTagSniff to Squiz standard to check that @throws tags are correct
+
+### Fixed
+- Fixed problems caused by references and type hints in Squiz FunctionDeclarationArgumentSpacingSniff
+- Fixed problems with errors not being thrown for some misaligned @param comments in Squiz FunctionCommentSniff
+- Fixed badly spaced comma error being thrown for "extends" class in Squiz ClassDeclarationSniff
+- Errors no longer thrown for class method names in Generic ForbiddenFunctionsSniff
+- Errors no longer thrown for type hints in front of references in Generic UpperCaseConstantNameSniff
+- Errors no longer thrown for correctly indented buffered lines in Squiz ScopeIndexSniff
+- Errors no longer thrown for user-defined functions named as forbidden functions in Generic ForbiddenFunctionsSniff
+- Errors no longer thrown on __autoload functions in PEAR ValidFunctionNameSniff
+- Errors now thrown for __autoload methods in PEAR ValidFunctionNameSniff
+- Errors now thrown if constructors or destructors have @return tags in Squiz FunctionCommentSniff
+- Errors now thrown if @throws tags dont start with a capital and end with a full stop in Squiz FunctionCommentSniff
+- Errors now thrown for invalid @var tag values in Squiz VariableCommentSniff
+- Errors now thrown for missing doc comment in Squiz VariableCommentSniff
+- Errors now thrown for unspaced operators in FOR loop declarations in Squiz OperatorSpacingSniff
+- Errors now thrown for using ob_get_clean/flush functions to end buffers in Squiz OutputBufferingIndentSniff
+- Errors now thrown for all missing member variable comments in Squiz VariableCommentSniff
+
+## 0.4.0 - 2007-02-19
+### Changed
+- Standard name specified with --standard command line argument is no longer case sensitive
+- Long error and warning messages are now wrapped to 80 characters in the full error report (thanks Endre Czirbesz)
+- Shortened a lot of error and warning messages so they don't take up so much room
+- Squiz FunctionCommentSniff now checks that param comments start with a capital letter and end with a full stop
+- Squiz FunctionSpacingSniff now reports incorrect lines below function on closing brace, not function keyword
+- Squiz FileCommentSniff now checks that there are no blank lines between the open PHP tag and the comment
+- PHP_CodeSniffer_File::isReference() now returns correctly when checking refs on right side of =>
+
+### Fixed
+- Fixed incorrect error with switch closing brace in Squiz SwitchDeclarationSniff
+- Fixed missing error when multiple statements are not aligned correctly with object operators
+- Fixed incorrect errors for some PHP special variables in Squiz ValidVariableNameSniff
+- Fixed incorrect errors for arrays that only contain other arrays in Squiz ArrayDeclarationSniff
+- Fixed bug #9844 : throw new Exception(\n accidentally reported as error but it ain't
+
+## 0.3.0 - 2007-01-11
+### Changed
+- Updated package.xml to version 2
+- Specifying coding standard on command line is now optional, even if you have multiple standards installed
+ - PHP_CodeSniffer uses the PEAR coding standard by default if no standard is specified
+- New command line option, --extensions, to specify a comma separated list of file extensions to check
+- Converted all unit tests to PHPUnit 3 format
+- Added new coding standard, Squiz, that can be used as an alternative to PEAR
+ - also contains more examples of sniffs
+ - some may be moved into the Generic coding standard if required
+- Added MultipleStatementAlignmentSniff to Generic standard
+- Added ScopeIndentSniff to Generic standard
+- Added ForbiddenFunctionsSniff to Generic standard
+- Added FileCommentSniff to PEAR standard
+- Added ClassCommentSniff to PEAR standard
+- Added FunctionCommentSniff to PEAR standard
+- Change MultipleStatementSniff to MultipleStatementAlignmentSniff in PEAR standard
+- Replaced Methods directory with Functions directory in Generic and PEAR standards
+ - also renamed some of the sniffs in those directories
+- Updated file, class and method comments for all files
+
+### Fixed
+- Fixed bug #9274 : nested_parenthesis element not set for open and close parenthesis tokens
+- Fixed bug #9411 : too few pattern characters cause incorrect error report
+
+## 0.2.1 - 2006-11-09
+### Fixed
+- Fixed bug #9274 : nested_parenthesis element not set for open and close parenthesis tokens
+
+## 0.2.0 - 2006-10-13
+### Changed
+- Added a generic standards package that will contain generic sniffs to be used in specific coding standards
+ - thanks to Frederic Poeydomenge for the idea
+- Changed PEAR standard to use generic sniffs where available
+- Added LowerCaseConstantSniff to Generic standard
+- Added UpperCaseConstantSniff to Generic standard
+- Added DisallowShortOpenTagSniff to Generic standard
+- Added LineLengthSniff to Generic standard
+- Added UpperCaseConstantNameSniff to Generic standard
+- Added OpeningMethodBraceBsdAllmanSniff to Generic standard (contrib by Frederic Poeydomenge)
+- Added OpeningMethodBraceKernighanRitchieSniff to Generic standard (contrib by Frederic Poeydomenge)
+- Added framework for core PHP_CodeSniffer unit tests
+- Added unit test for PHP_CodeSniffer:isCamelCaps method
+- ScopeClosingBraceSniff now checks indentation of BREAK statements
+- Added new command line arg (-vv) to show developer debug output
+
+### Fixed
+- Fixed some coding standard errors
+- Fixed bug #8834 : Massive memory consumption
+- Fixed bug #8836 : path case issues in package.xml
+- Fixed bug #8843 : confusion on nested switch()
+- Fixed bug #8841 : comments taken as whitespace
+- Fixed bug #8884 : another problem with nested switch() statements
+
+## 0.1.1 - 2006-09-25
+### Changed
+- Added unit tests for all PEAR sniffs
+- Exception class now extends from PEAR_Exception
+
+### Fixed
+- Fixed summary report so files without errors but with warnings are not shown when warnings are hidden
+
+## 0.1.0 - 2006-09-19
+### Changed
+- Reorganised package contents to conform to PEAR standards
+- Changed version numbering to conform to PEAR standards
+- Removed duplicate require_once() of Exception.php from CodeSniffer.php
+
+## 0.0.5 - 2006-09-18
+### Fixed
+- Fixed .bat file for situation where php.ini cannot be found so include_path is not set
+
+## 0.0.4 - 2006-08-28
+### Changed
+- Added .bat file for easier running of PHP_CodeSniffer on Windows
+- Sniff that checks method names now works for PHP4 style code where there is no scope keyword
+- Sniff that checks method names now works for PHP4 style constructors
+- Sniff that checks method names no longer incorrectly reports error with magic methods
+- Sniff that checks method names now reports errors with non-magic methods prefixed with __
+- Sniff that checks for constant names no longer incorrectly reports errors with heredoc strings
+- Sniff that checks for constant names no longer incorrectly reports errors with created objects
+- Sniff that checks indentation no longer incorrectly reports errors with heredoc strings
+- Sniff that checks indentation now correctly reports errors with improperly indented multi-line strings
+- Sniff that checks function declarations now checks for spaces before and after an equals sign for default values
+- Sniff that checks function declarations no longer incorrectly reports errors with multi-line declarations
+- Sniff that checks included code no longer incorrectly reports errors when return value is used conditionally
+- Sniff that checks opening brace of function no longer incorrectly reports errors with multi-line declarations
+- Sniff that checks spacing after commas in function calls no longer reports too many errors for some code
+- Sniff that checks control structure declarations now gives more descriptive error message
+
+## 0.0.3 - 2006-08-22
+### Changed
+- Added sniff to check for invalid class and interface names
+- Added sniff to check for invalid function and method names
+- Added sniff to warn if line is greater than 85 characters
+- Added sniff to check that function calls are in the correct format
+- Added command line arg to print current version (--version)
+
+### Fixed
+- Fixed error where comments were not allowed on the same line as a control structure declaration
+
+## 0.0.2 - 2006-07-25
+### Changed
+- Removed the including of checked files to stop errors caused by parsing them
+- Removed the use of reflection so checked files do not have to be included
+- Memory usage has been greatly reduced
+- Much faster tokenising and checking times
+- Reworked the PEAR coding standard sniffs (much faster now)
+- Fix some bugs with the PEAR scope indentation standard
+- Better checking for installed coding standards
+- Can now accept multiple files and dirs on the command line
+- Added an option to list installed coding standards
+- Added an option to print a summary report (number of errors and warnings shown for each file)
+- Added an option to hide warnings from reports
+- Added an option to print verbose output (so you know what is going on)
+- Reordered command line args to put switches first (although order is not enforced)
+- Switches can now be specified together (eg. php -nv) as well as separately (phpcs -n -v)
+
+## 0.0.1 - 2006-07-19
+### Added
+- Initial preview release
+
+
+
+[Unreleased]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/master...HEAD
+[3.8.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.8.0...3.8.1
+[3.8.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.7.2...3.8.0
+[3.7.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.7.1...3.7.2
+[3.7.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.7.0...3.7.1
+[3.7.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.6.2...3.7.0
+[3.6.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.6.1...3.6.2
+[3.6.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.6.0...3.6.1
+[3.6.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.8...3.6.0
+[3.5.8]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.7...3.5.8
+[3.5.7]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.6...3.5.7
+[3.5.6]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.5...3.5.6
+[3.5.5]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.4...3.5.5
+[3.5.4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.3...3.5.4
+[3.5.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.2...3.5.3
+[3.5.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.1...3.5.2
+[3.5.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.5.0...3.5.1
+[3.5.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.4.2...3.5.0
+[3.4.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.4.1...3.4.2
+[3.4.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.4.0...3.4.1
+[3.4.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.3.2...3.4.0
+[3.3.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.3.1...3.3.2
+[3.3.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.3.0...3.3.1
+[3.3.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.2.3...3.3.0
+[3.2.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.2.2...3.2.3
+[3.2.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.2.1...3.2.2
+[3.2.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.2.0...3.2.1
+[3.2.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.1.1...3.2.0
+[3.1.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.1.0...3.1.1
+[3.1.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.2...3.1.0
+[3.0.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.1...3.0.2
+[3.0.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.0...3.0.1
+[3.0.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.0RC4...3.0.0
+[3.0.0RC4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.0RC3...3.0.0RC4
+[3.0.0RC3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.0RC2...3.0.0RC3
+[3.0.0RC2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.0RC1...3.0.0RC2
+[3.0.0RC1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.0.0a1...3.0.0RC1
+[3.0.0a1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.9.2...3.0.0a1
+[2.9.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.9.1...2.9.2
+[2.9.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.9.0...2.9.1
+[2.9.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.8.1...2.9.0
+[2.8.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.8.0...2.8.1
+[2.8.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.7.1...2.8.0
+[2.7.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.7.0...2.7.1
+[2.7.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.6.2...2.7.0
+[2.6.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.6.1...2.6.2
+[2.6.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.6.0...2.6.1
+[2.6.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.5.1...2.6.0
+[2.5.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.5.0...2.5.1
+[2.5.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.4.0...2.5.0
+[2.4.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.3.4...2.4.0
+[2.3.4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.3.3...2.3.4
+[2.3.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.3.2...2.3.3
+[2.3.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.3.1...2.3.2
+[2.3.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.3.0...2.3.1
+[2.3.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.2.0...2.3.0
+[2.2.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.1.0...2.2.0
+[2.1.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.0.0...2.1.0
+[2.0.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.0.0RC4...2.0.0
+[2.0.0RC4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.0.0RC3...2.0.0RC4
+[2.0.0RC3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.0.0RC2...2.0.0RC3
+[2.0.0RC2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.0.0RC1...2.0.0RC2
+[2.0.0RC1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.0.0a2...2.0.0RC1
+[2.0.0a2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/2.0.0a1...2.0.0a2
+[2.0.0a1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.6...2.0.0a1
+[1.5.6]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.5...1.5.6
+[1.5.5]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.4...1.5.5
+[1.5.4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.3...1.5.4
+[1.5.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.2...1.5.3
+[1.5.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.1...1.5.2
+[1.5.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.0...1.5.1
+[1.5.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.0RC4...1.5.0
+[1.5.0RC4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.0RC3...1.5.0RC4
+[1.5.0RC3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.0RC2...1.5.0RC3
+[1.5.0RC2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.5.0RC1...1.5.0RC2
+[1.5.0RC1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.8...1.5.0RC1
+[1.4.8]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.7...1.4.8
+[1.4.7]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.6...1.4.7
+[1.4.6]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.5...1.4.6
+[1.4.5]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.4...1.4.5
+[1.4.4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.3...1.4.4
+[1.4.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.2...1.4.3
+[1.4.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.1...1.4.2
+[1.4.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.4.0...1.4.1
+[1.4.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.3.6...1.4.0
+[1.3.6]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.3.5...1.3.6
+[1.3.5]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.3.4...1.3.5
+[1.3.4]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.3.3...1.3.4
+[1.3.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.3.2...1.3.3
+[1.3.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/1.3.1...1.3.2
+
+
+
+[@2shediac]: https://github.com/2shediac
+[@ablyler]: https://github.com/ablyler
+[@aboks]: https://github.com/aboks
+[@abulford]: https://github.com/abulford
+[@afilina]: https://github.com/afilina
+[@aik099]: https://github.com/aik099
+[@akarmazyn]: https://github.com/akarmazyn
+[@akkie]: https://github.com/akkie
+[@alcohol]: https://github.com/alcohol
+[@alekitto]: https://github.com/alekitto
+[@AlexHowansky]: https://github.com/AlexHowansky
+[@anbuc]: https://github.com/anbuc
+[@andrei-propertyguru]: https://github.com/andrei-propertyguru
+[@AndrewDawes]: https://github.com/AndrewDawes
+[@andygrunwald]: https://github.com/andygrunwald
+[@annechko]: https://github.com/annechko
+[@anomiex]: https://github.com/anomiex
+[@arnested]: https://github.com/arnested
+[@asnyder]: https://github.com/asnyder
+[@Astinus-Eberhard]: https://github.com/Astinus-Eberhard
+[@axlon]: https://github.com/axlon
+[@bayleedev]: https://github.com/bayleedev
+[@becoded]: https://github.com/becoded
+[@Benjamin-Loison]: https://github.com/Benjamin-Loison
+[@benmatselby]: https://github.com/benmatselby
+[@Billz95]: https://github.com/Billz95
+[@biozshock]: https://github.com/biozshock
+[@bkdotcom]: https://github.com/bkdotcom
+[@bladeofsteel]: https://github.com/bladeofsteel
+[@blerou]: https://github.com/blerou
+[@blue32a]: https://github.com/blue32a
+[@bondas83]: https://github.com/bondas83
+[@boonkerz]: https://github.com/boonkerz
+[@BRMatt]: https://github.com/BRMatt
+[@CandySunPlus]: https://github.com/CandySunPlus
+[@ceeram]: https://github.com/ceeram
+[@cixtor]: https://github.com/cixtor
+[@claylo]: https://github.com/claylo
+[@codebymikey]: https://github.com/codebymikey
+[@covex-nn]: https://github.com/covex-nn
+[@cweiske]: https://github.com/cweiske
+[@Daimona]: https://github.com/Daimona
+[@danez]: https://github.com/danez
+[@DannyvdSluijs]: https://github.com/DannyvdSluijs
+[@das-peter]: https://github.com/das-peter
+[@datengraben]: https://github.com/datengraben
+[@david-binda]: https://github.com/david-binda
+[@Decave]: https://github.com/Decave
+[@dereuromark]: https://github.com/dereuromark
+[@derrabus]: https://github.com/derrabus
+[@deviantintegral]: https://github.com/deviantintegral
+[@dhensby]: https://github.com/dhensby
+[@dingo-d]: https://github.com/dingo-d
+[@dominics]: https://github.com/dominics
+[@donatj]: https://github.com/donatj
+[@dryabkov]: https://github.com/dryabkov
+[@dschniepp]: https://github.com/dschniepp
+[@duncan3dc]: https://github.com/duncan3dc
+[@edorian]: https://github.com/edorian
+[@elazar]: https://github.com/elazar
+[@ElvenSpellmaker]: https://github.com/ElvenSpellmaker
+[@emil-nasso]: https://github.com/emil-nasso
+[@enl]: https://github.com/enl
+[@erikwiffin]: https://github.com/erikwiffin
+[@eser]: https://github.com/eser
+[@exussum12]: https://github.com/exussum12
+[@fabacino]: https://github.com/fabacino
+[@fabre-thibaud]: https://github.com/fabre-thibaud
+[@fcool]: https://github.com/fcool
+[@filips123]: https://github.com/filips123
+[@Fischer-Bjoern]: https://github.com/Fischer-Bjoern
+[@fonsecas72]: https://github.com/fonsecas72
+[@fredden]: https://github.com/fredden
+[@GaryJones]: https://github.com/GaryJones
+[@ghostal]: https://github.com/ghostal
+[@ghunti]: https://github.com/ghunti
+[@gmponos]: https://github.com/gmponos
+[@gnutix]: https://github.com/gnutix
+[@goatherd]: https://github.com/goatherd
+[@grongor]: https://github.com/grongor
+[@grzr]: https://github.com/grzr
+[@gwharton]: https://github.com/gwharton
+[@hashar]: https://github.com/hashar
+[@helgi]: https://github.com/helgi
+[@hernst42]: https://github.com/hernst42
+[@iammattcoleman]: https://github.com/iammattcoleman
+[@ihabunek]: https://github.com/ihabunek
+[@illusori]: https://github.com/illusori
+[@index0h]: https://github.com/index0h
+[@ivuorinen]: https://github.com/ivuorinen
+[@jasonmccreary]: https://github.com/jasonmccreary
+[@javer]: https://github.com/javer
+[@JDGrimes]: https://github.com/JDGrimes
+[@jedgell]: https://github.com/jedgell
+[@jeffslofish]: https://github.com/jeffslofish
+[@jmarcil]: https://github.com/jmarcil
+[@jnrbsn]: https://github.com/jnrbsn
+[@joelposti]: https://github.com/joelposti
+[@johanderuijter]: https://github.com/johanderuijter
+[@johnmaguire]: https://github.com/johnmaguire
+[@johnpbloch]: https://github.com/johnpbloch
+[@JorisDebonnet]: https://github.com/JorisDebonnet
+[@josephzidell]: https://github.com/josephzidell
+[@joshdavis11]: https://github.com/joshdavis11
+[@jpuck]: https://github.com/jpuck
+[@jrfnl]: https://github.com/jrfnl
+[@kdebisschop]: https://github.com/kdebisschop
+[@kenguest]: https://github.com/kenguest
+[@klausi]: https://github.com/klausi
+[@Konafets]: https://github.com/Konafets
+[@kristofser]: https://github.com/kristofser
+[@ksimka]: https://github.com/ksimka
+[@ktomk]: https://github.com/ktomk
+[@kukulich]: https://github.com/kukulich
+[@legoktm]: https://github.com/legoktm
+[@lmanzke]: https://github.com/lmanzke
+[@localheinz]: https://github.com/localheinz
+[@lucc]: https://github.com/lucc
+[@MacDada]: https://github.com/MacDada
+[@Majkl578]: https://github.com/Majkl578
+[@manuelpichler]: https://github.com/manuelpichler
+[@marcospassos]: https://github.com/marcospassos
+[@MarkBaker]: https://github.com/MarkBaker
+[@MarkMaldaba]: https://github.com/MarkMaldaba
+[@martinssipenko]: https://github.com/martinssipenko
+[@marvasDE]: https://github.com/marvasDE
+[@MasterOdin]: https://github.com/MasterOdin
+[@mathroc]: https://github.com/mathroc
+[@maxgalbu]: https://github.com/maxgalbu
+[@mcuelenaere]: https://github.com/mcuelenaere
+[@mhujer]: https://github.com/mhujer
+[@michaelbutler]: https://github.com/michaelbutler
+[@michalbundyra]: https://github.com/michalbundyra
+[@Morerice]: https://github.com/Morerice
+[@morozov]: https://github.com/morozov
+[@mrkrstphr]: https://github.com/mrkrstphr
+[@mythril]: https://github.com/mythril
+[@Naelyth]: https://github.com/Naelyth
+[@ndm2]: https://github.com/ndm2
+[@nicholascus]: https://github.com/nicholascus
+[@NickDickinsonWilde]: https://github.com/NickDickinsonWilde
+[@nkovacs]: https://github.com/nkovacs
+[@nubs]: https://github.com/nubs
+[@o5]: https://github.com/o5
+[@ofbeaton]: https://github.com/ofbeaton
+[@olemartinorg]: https://github.com/olemartinorg
+[@ondrejmirtes]: https://github.com/ondrejmirtes
+[@orx0r]: https://github.com/orx0r
+[@ostrolucky]: https://github.com/ostrolucky
+[@pfrenssen]: https://github.com/pfrenssen
+[@phil-davis]: https://github.com/phil-davis
+[@photodude]: https://github.com/photodude
+[@r3nat]: https://github.com/r3nat
+[@raul338]: https://github.com/raul338
+[@realmfoo]: https://github.com/realmfoo
+[@renaatdemuynck]: https://github.com/renaatdemuynck
+[@renan]: https://github.com/renan
+[@rhorber]: https://github.com/rhorber
+[@rmccue]: https://github.com/rmccue
+[@robocoder]: https://github.com/robocoder
+[@rodrigoprimo]: https://github.com/rodrigoprimo
+[@rogeriopradoj]: https://github.com/rogeriopradoj
+[@rovangju]: https://github.com/rovangju
+[@rvanvelzen]: https://github.com/rvanvelzen
+[@saltybeagle]: https://github.com/saltybeagle
+[@samlev]: https://github.com/samlev
+[@scato]: https://github.com/scato
+[@schlessera]: https://github.com/schlessera
+[@schnittstabil]: https://github.com/schnittstabil
+[@sebastianbergmann]: https://github.com/sebastianbergmann
+[@sertand]: https://github.com/sertand
+[@shanethehat]: https://github.com/shanethehat
+[@shivammathur]: https://github.com/shivammathur
+[@simonsan]: https://github.com/simonsan
+[@sjlangley]: https://github.com/sjlangley
+[@sserbin]: https://github.com/sserbin
+[@stefanlenselink]: https://github.com/stefanlenselink
+[@SteveTalbot]: https://github.com/SteveTalbot
+[@storeman]: https://github.com/storeman
+[@stronk7]: https://github.com/stronk7
+[@svycka]: https://github.com/svycka
+[@syranez]: https://github.com/syranez
+[@tasuki]: https://github.com/tasuki
+[@tim-bezhashvyly]: https://github.com/tim-bezhashvyly
+[@TomHAnderson]: https://github.com/TomHAnderson
+[@thewilkybarkid]: https://github.com/thewilkybarkid
+[@thiemowmde]: https://github.com/thiemowmde
+[@thomasjfox]: https://github.com/thomasjfox
+[@till]: https://github.com/till
+[@timoschinkel]: https://github.com/timoschinkel
+[@uniquexor]: https://github.com/uniquexor
+[@valorin]: https://github.com/valorin
+[@VasekPurchart]: https://github.com/VasekPurchart
+[@VincentLanglet]: https://github.com/VincentLanglet
+[@waltertamboer]: https://github.com/waltertamboer
+[@westonruter]: https://github.com/westonruter
+[@willemstuursma]: https://github.com/willemstuursma
+[@wimg]: https://github.com/wimg
+[@wvega]: https://github.com/wvega
+[@xalopp]: https://github.com/xalopp
+[@xjm]: https://github.com/xjm
+[@xt99]: https://github.com/xt99
+[@yesmeck]: https://github.com/yesmeck
+[@zBart]: https://github.com/zBart
+[pear-adviva]: https://pear.php.net/user/adviva
+[pear-bakert]: https://pear.php.net/user/bakert
+[pear-bjorn]: https://pear.php.net/user/bjorn
+[pear-boxgav]: https://pear.php.net/user/boxgav
+[pear-burci]: https://pear.php.net/user/burci
+[pear-conf]: https://pear.php.net/user/conf
+[pear-cwiedmann]: https://pear.php.net/user/cwiedmann
+[pear-dollyaswin]: https://pear.php.net/user/dollyaswin
+[pear-dvino]: https://pear.php.net/user/dvino
+[pear-et3w503]: https://pear.php.net/user/et3w503
+[pear-gemineye]: https://pear.php.net/user/gemineye
+[pear-kwinahradsky]: https://pear.php.net/user/kwinahradsky
+[pear-ljmaskey]: https://pear.php.net/user/ljmaskey
+[pear-mccammos]: https://pear.php.net/user/mccammos
+[pear-pete]: https://pear.php.net/user/pete
+[pear-recurser]: https://pear.php.net/user/recurser
+[pear-renoiv]: https://pear.php.net/user/renoiv
+[pear-rquadling]: https://pear.php.net/user/rquadling
+[pear-ryba]: https://pear.php.net/user/ryba
+[pear-thezero]: https://pear.php.net/user/thezero
+[pear-thing2b]: https://pear.php.net/user/thing2b
+[pear-tomdesp]: https://pear.php.net/user/tomdesp
+[pear-troehr]: https://pear.php.net/user/troehr
+[pear-weirdan]: https://pear.php.net/user/weirdan
+[pear-wloche]: https://pear.php.net/user/wloche
+[pear-woellchen]: https://pear.php.net/user/woellchen
+[pear-youngian]: https://pear.php.net/user/youngian
+
diff --git a/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist b/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist
new file mode 100644
index 0000000..f95058f
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist
@@ -0,0 +1,9 @@
+ 'PSR2',
+ 'report_format' => 'summary',
+ 'show_warnings' => '0',
+ 'show_progress' => '1',
+ 'report_width' => '120',
+);
+?>
diff --git a/vendor/squizlabs/php_codesniffer/README.md b/vendor/squizlabs/php_codesniffer/README.md
new file mode 100644
index 0000000..383fed2
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/README.md
@@ -0,0 +1,147 @@
+PHP_CodeSniffer
+=====================================================
+
+
+
+[![Latest Stable Version](http://poser.pugx.org/phpcsstandards/php_codesniffer/v)](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases)
+[![Validate](https://github.com/PHPCSStandards/PHP_CodeSniffer/actions/workflows/validate.yml/badge.svg?branch=master)](https://github.com/PHPCSStandards/PHP_CodeSniffer/actions/workflows/validate.yml)
+[![Test](https://github.com/PHPCSStandards/PHP_CodeSniffer/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/PHPCSStandards/PHP_CodeSniffer/actions/workflows/test.yml)
+[![Coverage Status](https://coveralls.io/repos/github/PHPCSStandards/PHP_CodeSniffer/badge.svg?branch=master)](https://coveralls.io/github/PHPCSStandards/PHP_CodeSniffer?branch=master)
+[![License](http://poser.pugx.org/phpcsstandards/php_codesniffer/license)](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt)
+
+![Minimum PHP Version](https://img.shields.io/packagist/php-v/squizlabs/php_codesniffer.svg?maxAge=3600)
+[![Tested on PHP 5.4 to 8.3](https://img.shields.io/badge/tested%20on-PHP%205.4%20|%205.5%20|%205.6%20|%207.0%20|%207.1%20|%207.2%20|%207.3%20|%207.4%20|%208.0%20|%208.1%20|%208.2%20|%208.3-brightgreen.svg?maxAge=2419200)](https://github.com/PHPCSStandards/PHP_CodeSniffer/actions/workflows/test.yml)
+
+
+
+> [!NOTE]
+> This package is the continuation of the now abandoned [PHP_CodeSniffer package which was created by Squizlabs](https://github.com/squizlabs/PHP_CodeSniffer).
+
+## About
+
+PHP_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
+
+
+## Requirements
+
+PHP_CodeSniffer requires PHP version 5.4.0 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements.
+
+If you're using PHP_CodeSniffer as part of a team, or you're running it on a [CI](https://en.wikipedia.org/wiki/Continuous_integration) server, you may want to configure your project's settings [using a configuration file](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file).
+
+
+## Installation
+
+The easiest way to get started with PHP_CodeSniffer is to download the Phar files for each of the commands:
+```bash
+# Download using curl
+curl -OL https://phars.phpcodesniffer.com/phpcs.phar
+curl -OL https://phars.phpcodesniffer.com/phpcbf.phar
+
+# Or download using wget
+wget https://phars.phpcodesniffer.com/phpcs.phar
+wget https://phars.phpcodesniffer.com/phpcbf.phar
+
+# Then test the downloaded PHARs
+php phpcs.phar -h
+php phpcbf.phar -h
+```
+
+These Phars are signed with the official Release key for PHPCS with the
+fingerprint `95DE 904A B800 754A 11D8 0B60 5E6D DE99 8AB7 3B8E`.
+
+### Composer
+If you use Composer, you can install PHP_CodeSniffer system-wide with the following command:
+```bash
+composer global require "squizlabs/php_codesniffer=*"
+```
+Make sure you have the composer bin dir in your PATH. The default value is `~/.composer/vendor/bin/`, but you can check the value that you need to use by running `composer global config bin-dir --absolute`.
+
+Or alternatively, include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example:
+
+```json
+{
+ "require-dev": {
+ "squizlabs/php_codesniffer": "^3.0"
+ }
+}
+```
+
+You will then be able to run PHP_CodeSniffer from the vendor bin directory:
+```bash
+./vendor/bin/phpcs -h
+./vendor/bin/phpcbf -h
+```
+### Phive
+If you use Phive, you can install PHP_CodeSniffer as a project tool using the following commands:
+```bash
+phive install --trust-gpg-keys 95DE904AB800754A11D80B605E6DDE998AB73B8E phpcs
+phive install --trust-gpg-keys 95DE904AB800754A11D80B605E6DDE998AB73B8E phpcbf
+```
+You will then be able to run PHP_CodeSniffer from the `tools` directory:
+```bash
+./tools/phpcs -h
+./tools/phpcbf -h
+```
+### Git Clone
+You can also download the PHP_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git clone:
+```bash
+git clone https://github.com/PHPCSStandards/PHP_CodeSniffer.git
+cd PHP_CodeSniffer
+php bin/phpcs -h
+php bin/phpcbf -h
+```
+## Getting Started
+
+The default coding standard used by PHP_CodeSniffer is the PEAR coding standard. To check a file against the PEAR coding standard, simply specify the file's location:
+```bash
+phpcs /path/to/code/myfile.php
+```
+Or if you wish to check an entire directory you can specify the directory location instead of a file.
+```bash
+phpcs /path/to/code-directory
+```
+If you wish to check your code against the PSR-12 coding standard, use the `--standard` command line argument:
+```bash
+phpcs --standard=PSR12 /path/to/code-directory
+```
+
+If PHP_CodeSniffer finds any coding standard errors, a report will be shown after running the command.
+
+Full usage information and example reports are available on the [usage page](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Usage).
+
+## Documentation
+
+The documentation for PHP_CodeSniffer is available on the [GitHub wiki](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki).
+
+## Issues
+
+Bug reports and feature requests can be submitted on the [GitHub Issue Tracker](https://github.com/PHPCSStandards/PHP_CodeSniffer/issues).
+
+## Contributing
+
+See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for information.
+
+## Versioning
+
+PHP_CodeSniffer uses a `MAJOR.MINOR.PATCH` version number format.
+
+The `MAJOR` version is incremented when:
+- backwards-incompatible changes are made to how the `phpcs` or `phpcbf` commands are used, or
+- backwards-incompatible changes are made to the `ruleset.xml` format, or
+- backwards-incompatible changes are made to the API used by sniff developers, or
+- custom PHP_CodeSniffer token types are removed, or
+- existing sniffs are removed from PHP_CodeSniffer entirely
+
+The `MINOR` version is incremented when:
+- new backwards-compatible features are added to the `phpcs` and `phpcbf` commands, or
+- backwards-compatible changes are made to the `ruleset.xml` format, or
+- backwards-compatible changes are made to the API used by sniff developers, or
+- new sniffs are added to an included standard, or
+- existing sniffs are removed from an included standard
+
+> NOTE: Backwards-compatible changes to the API used by sniff developers will allow an existing sniff to continue running without producing fatal errors but may not result in the sniff reporting the same errors as it did previously without changes being required.
+
+The `PATCH` version is incremented when:
+- backwards-compatible bug fixes are made
+
+> NOTE: As PHP_CodeSniffer exists to report and fix issues, most bugs are the result of coding standard errors being incorrectly reported or coding standard errors not being reported when they should be. This means that the messages produced by PHP_CodeSniffer, and the fixes it makes, are likely to be different between PATCH versions.
diff --git a/vendor/squizlabs/php_codesniffer/autoload.php b/vendor/squizlabs/php_codesniffer/autoload.php
new file mode 100644
index 0000000..7e546bb
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/autoload.php
@@ -0,0 +1,342 @@
+
+ * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ */
+
+namespace PHP_CodeSniffer;
+
+if (class_exists('PHP_CodeSniffer\Autoload', false) === false) {
+ class Autoload
+ {
+
+ /**
+ * The composer autoloader.
+ *
+ * @var \Composer\Autoload\ClassLoader
+ */
+ private static $composerAutoloader = null;
+
+ /**
+ * A mapping of file names to class names.
+ *
+ * @var array
+ */
+ private static $loadedClasses = [];
+
+ /**
+ * A mapping of class names to file names.
+ *
+ * @var array
+ */
+ private static $loadedFiles = [];
+
+ /**
+ * A list of additional directories to search during autoloading.
+ *
+ * This is typically a list of coding standard directories.
+ *
+ * @var string[]
+ */
+ private static $searchPaths = [];
+
+
+ /**
+ * Loads a class.
+ *
+ * This method only loads classes that exist in the PHP_CodeSniffer namespace.
+ * All other classes are ignored and loaded by subsequent autoloaders.
+ *
+ * @param string $class The name of the class to load.
+ *
+ * @return bool
+ */
+ public static function load($class)
+ {
+ // Include the composer autoloader if there is one, but re-register it
+ // so this autoloader runs before the composer one as we need to include
+ // all files so we can figure out what the class/interface/trait name is.
+ if (self::$composerAutoloader === null) {
+ // Make sure we don't try to load any of Composer's classes
+ // while the autoloader is being setup.
+ if (strpos($class, 'Composer\\') === 0) {
+ return;
+ }
+
+ if (strpos(__DIR__, 'phar://') !== 0
+ && @file_exists(__DIR__.'/../../autoload.php') === true
+ ) {
+ self::$composerAutoloader = include __DIR__.'/../../autoload.php';
+ if (self::$composerAutoloader instanceof \Composer\Autoload\ClassLoader) {
+ self::$composerAutoloader->unregister();
+ self::$composerAutoloader->register();
+ } else {
+ // Something went wrong, so keep going without the autoloader
+ // although namespaced sniffs might error.
+ self::$composerAutoloader = false;
+ }
+ } else {
+ self::$composerAutoloader = false;
+ }
+ }//end if
+
+ $ds = DIRECTORY_SEPARATOR;
+ $path = false;
+
+ if (substr($class, 0, 16) === 'PHP_CodeSniffer\\') {
+ if (substr($class, 0, 22) === 'PHP_CodeSniffer\Tests\\') {
+ $isInstalled = !is_dir(__DIR__.$ds.'tests');
+ if ($isInstalled === false) {
+ $path = __DIR__.$ds.'tests';
+ } else {
+ $path = '@test_dir@'.$ds.'PHP_CodeSniffer'.$ds.'CodeSniffer';
+ }
+
+ $path .= $ds.substr(str_replace('\\', $ds, $class), 22).'.php';
+ } else {
+ $path = __DIR__.$ds.'src'.$ds.substr(str_replace('\\', $ds, $class), 16).'.php';
+ }
+ }
+
+ // See if the composer autoloader knows where the class is.
+ if ($path === false && self::$composerAutoloader !== false) {
+ $path = self::$composerAutoloader->findFile($class);
+ }
+
+ // See if the class is inside one of our alternate search paths.
+ if ($path === false) {
+ foreach (self::$searchPaths as $searchPath => $nsPrefix) {
+ $className = $class;
+ if ($nsPrefix !== '' && substr($class, 0, strlen($nsPrefix)) === $nsPrefix) {
+ $className = substr($class, (strlen($nsPrefix) + 1));
+ }
+
+ $path = $searchPath.$ds.str_replace('\\', $ds, $className).'.php';
+ if (is_file($path) === true) {
+ break;
+ }
+
+ $path = false;
+ }
+ }
+
+ if ($path !== false && is_file($path) === true) {
+ self::loadFile($path);
+ return true;
+ }
+
+ return false;
+
+ }//end load()
+
+
+ /**
+ * Includes a file and tracks what class or interface was loaded as a result.
+ *
+ * @param string $path The path of the file to load.
+ *
+ * @return string The fully qualified name of the class in the loaded file.
+ */
+ public static function loadFile($path)
+ {
+ if (strpos(__DIR__, 'phar://') !== 0) {
+ $path = realpath($path);
+ if ($path === false) {
+ return false;
+ }
+ }
+
+ if (isset(self::$loadedClasses[$path]) === true) {
+ return self::$loadedClasses[$path];
+ }
+
+ $classesBeforeLoad = [
+ 'classes' => get_declared_classes(),
+ 'interfaces' => get_declared_interfaces(),
+ 'traits' => get_declared_traits(),
+ ];
+
+ include $path;
+
+ $classesAfterLoad = [
+ 'classes' => get_declared_classes(),
+ 'interfaces' => get_declared_interfaces(),
+ 'traits' => get_declared_traits(),
+ ];
+
+ $className = self::determineLoadedClass($classesBeforeLoad, $classesAfterLoad);
+
+ self::$loadedClasses[$path] = $className;
+ self::$loadedFiles[$className] = $path;
+ return self::$loadedClasses[$path];
+
+ }//end loadFile()
+
+
+ /**
+ * Determine which class was loaded based on the before and after lists of loaded classes.
+ *
+ * @param array $classesBeforeLoad The classes/interfaces/traits before the file was included.
+ * @param array $classesAfterLoad The classes/interfaces/traits after the file was included.
+ *
+ * @return string The fully qualified name of the class in the loaded file.
+ */
+ public static function determineLoadedClass($classesBeforeLoad, $classesAfterLoad)
+ {
+ $className = null;
+
+ $newClasses = array_diff($classesAfterLoad['classes'], $classesBeforeLoad['classes']);
+ if (PHP_VERSION_ID < 70400) {
+ $newClasses = array_reverse($newClasses);
+ }
+
+ // Since PHP 7.4 get_declared_classes() does not guarantee any order, making
+ // it impossible to use order to determine which is the parent an which is the child.
+ // Let's reduce the list of candidates by removing all the classes known to be "parents".
+ // That way, at the end, only the "main" class just included will remain.
+ $newClasses = array_reduce(
+ $newClasses,
+ function ($remaining, $current) {
+ return array_diff($remaining, class_parents($current));
+ },
+ $newClasses
+ );
+
+ foreach ($newClasses as $name) {
+ if (isset(self::$loadedFiles[$name]) === false) {
+ $className = $name;
+ break;
+ }
+ }
+
+ if ($className === null) {
+ $newClasses = array_reverse(array_diff($classesAfterLoad['interfaces'], $classesBeforeLoad['interfaces']));
+ foreach ($newClasses as $name) {
+ if (isset(self::$loadedFiles[$name]) === false) {
+ $className = $name;
+ break;
+ }
+ }
+ }
+
+ if ($className === null) {
+ $newClasses = array_reverse(array_diff($classesAfterLoad['traits'], $classesBeforeLoad['traits']));
+ foreach ($newClasses as $name) {
+ if (isset(self::$loadedFiles[$name]) === false) {
+ $className = $name;
+ break;
+ }
+ }
+ }
+
+ return $className;
+
+ }//end determineLoadedClass()
+
+
+ /**
+ * Adds a directory to search during autoloading.
+ *
+ * @param string $path The path to the directory to search.
+ * @param string $nsPrefix The namespace prefix used by files under this path.
+ *
+ * @return void
+ */
+ public static function addSearchPath($path, $nsPrefix='')
+ {
+ self::$searchPaths[$path] = rtrim(trim((string) $nsPrefix), '\\');
+
+ }//end addSearchPath()
+
+
+ /**
+ * Retrieve the namespaces and paths registered by external standards.
+ *
+ * @return array
+ */
+ public static function getSearchPaths()
+ {
+ return self::$searchPaths;
+
+ }//end getSearchPaths()
+
+
+ /**
+ * Gets the class name for the given file path.
+ *
+ * @param string $path The name of the file.
+ *
+ * @throws \Exception If the file path has not been loaded.
+ * @return string
+ */
+ public static function getLoadedClassName($path)
+ {
+ if (isset(self::$loadedClasses[$path]) === false) {
+ throw new \Exception("Cannot get class name for $path; file has not been included");
+ }
+
+ return self::$loadedClasses[$path];
+
+ }//end getLoadedClassName()
+
+
+ /**
+ * Gets the file path for the given class name.
+ *
+ * @param string $class The name of the class.
+ *
+ * @throws \Exception If the class name has not been loaded
+ * @return string
+ */
+ public static function getLoadedFileName($class)
+ {
+ if (isset(self::$loadedFiles[$class]) === false) {
+ throw new \Exception("Cannot get file name for $class; class has not been included");
+ }
+
+ return self::$loadedFiles[$class];
+
+ }//end getLoadedFileName()
+
+
+ /**
+ * Gets the mapping of file names to class names.
+ *
+ * @return array
+ */
+ public static function getLoadedClasses()
+ {
+ return self::$loadedClasses;
+
+ }//end getLoadedClasses()
+
+
+ /**
+ * Gets the mapping of class names to file names.
+ *
+ * @return array
+ */
+ public static function getLoadedFiles()
+ {
+ return self::$loadedFiles;
+
+ }//end getLoadedFiles()
+
+
+ }//end class
+
+ // Register the autoloader before any existing autoloaders to ensure
+ // it gets a chance to hear about every autoload request, and record
+ // the file and class name for it.
+ spl_autoload_register(__NAMESPACE__.'\Autoload::load', true, true);
+}//end if
diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcbf b/vendor/squizlabs/php_codesniffer/bin/phpcbf
new file mode 100755
index 0000000..2e86a40
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/bin/phpcbf
@@ -0,0 +1,19 @@
+#!/usr/bin/env php
+
+ * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ */
+
+if (is_file(__DIR__.'/../autoload.php') === true) {
+ include_once __DIR__.'/../autoload.php';
+} else {
+ include_once 'PHP/CodeSniffer/autoload.php';
+}
+
+$runner = new PHP_CodeSniffer\Runner();
+$exitCode = $runner->runPHPCBF();
+exit($exitCode);
diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat b/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
new file mode 100644
index 0000000..da3b040
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
@@ -0,0 +1,10 @@
+@echo off
+REM PHP Code Beautifier and Fixer fixes violations of a defined coding standard.
+REM
+REM @author Greg Sherwood
+REM @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
+REM @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+
+set PHPBIN=php
+
+"%PHPBIN%" "%~dp0\phpcbf" %*
diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcs b/vendor/squizlabs/php_codesniffer/bin/phpcs
new file mode 100755
index 0000000..e8e8b02
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/bin/phpcs
@@ -0,0 +1,19 @@
+#!/usr/bin/env php
+
+ * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ */
+
+if (is_file(__DIR__.'/../autoload.php') === true) {
+ include_once __DIR__.'/../autoload.php';
+} else {
+ include_once 'PHP/CodeSniffer/autoload.php';
+}
+
+$runner = new PHP_CodeSniffer\Runner();
+$exitCode = $runner->runPHPCS();
+exit($exitCode);
diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcs.bat b/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
new file mode 100755
index 0000000..a95722b
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
@@ -0,0 +1,10 @@
+@echo off
+REM PHP_CodeSniffer detects violations of a defined coding standard.
+REM
+REM @author Greg Sherwood
+REM @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
+REM @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+
+set PHPBIN=php
+
+"%PHPBIN%" "%~dp0\phpcs" %*
diff --git a/vendor/squizlabs/php_codesniffer/composer.json b/vendor/squizlabs/php_codesniffer/composer.json
new file mode 100644
index 0000000..ae7c760
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/composer.json
@@ -0,0 +1,87 @@
+{
+ "name": "squizlabs/php_codesniffer",
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+ "license": "BSD-3-Clause",
+ "type": "library",
+ "keywords": [
+ "phpcs",
+ "standards",
+ "static analysis"
+ ],
+ "authors": [
+ {
+ "name": "Greg Sherwood",
+ "role": "Former lead"
+ },
+ {
+ "name": "Juliette Reinders Folmer",
+ "role": "Current lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
+ }
+ ],
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
+ "support": {
+ "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
+ "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki",
+ "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
+ "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy"
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
+ },
+ "bin": [
+ "bin/phpcbf",
+ "bin/phpcs"
+ ],
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev"
+ }
+ },
+ "scripts": {
+ "cs": [
+ "@php ./bin/phpcs"
+ ],
+ "cbf": [
+ "@php ./bin/phpcbf"
+ ],
+ "test": [
+ "Composer\\Config::disableProcessTimeout",
+ "@php ./vendor/phpunit/phpunit/phpunit tests/AllTests.php --no-coverage"
+ ],
+ "coverage": [
+ "Composer\\Config::disableProcessTimeout",
+ "@php ./vendor/phpunit/phpunit/phpunit tests/AllTests.php -d max_execution_time=0"
+ ],
+ "coverage-local": [
+ "Composer\\Config::disableProcessTimeout",
+ "@php ./vendor/phpunit/phpunit/phpunit tests/AllTests.php --coverage-html ./build/coverage-html -d max_execution_time=0"
+ ],
+ "build": [
+ "Composer\\Config::disableProcessTimeout",
+ "@php -d phar.readonly=0 -f ./scripts/build-phar.php"
+ ],
+ "check-all": [
+ "@cs",
+ "@test"
+ ]
+ },
+ "scripts-descriptions": {
+ "cs": "Check for code style violations.",
+ "cbf": "Fix code style violations.",
+ "test": "Run the unit tests without code coverage.",
+ "coverage": "Run the unit tests with code coverage.",
+ "coverage-local": "Run the unit tests with code coverage and generate an HTML report in a 'build' directory.",
+ "build": "Create PHAR files for PHPCS and PHPCBF.",
+ "check-all": "Run all checks (phpcs, tests)."
+ }
+}
diff --git a/vendor/squizlabs/php_codesniffer/licence.txt b/vendor/squizlabs/php_codesniffer/licence.txt
new file mode 100644
index 0000000..9f95b67
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/licence.txt
@@ -0,0 +1,24 @@
+Copyright (c) 2012, Squiz Pty Ltd (ABN 77 084 670 600)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the copyright holder nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/squizlabs/php_codesniffer/phpcs.xsd b/vendor/squizlabs/php_codesniffer/phpcs.xsd
new file mode 100644
index 0000000..d93dd86
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/phpcs.xsd
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vendor/squizlabs/php_codesniffer/src/Config.php b/vendor/squizlabs/php_codesniffer/src/Config.php
new file mode 100644
index 0000000..d924839
--- /dev/null
+++ b/vendor/squizlabs/php_codesniffer/src/Config.php
@@ -0,0 +1,1745 @@
+
+ * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
+ * @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
+ */
+
+namespace PHP_CodeSniffer;
+
+use PHP_CodeSniffer\Exceptions\DeepExitException;
+use PHP_CodeSniffer\Exceptions\RuntimeException;
+use PHP_CodeSniffer\Util\Common;
+
+/**
+ * Stores the configuration used to run PHPCS and PHPCBF.
+ *
+ * @property string[] $files The files and directories to check.
+ * @property string[] $standards The standards being used for checking.
+ * @property int $verbosity How verbose the output should be.
+ * 0: no unnecessary output
+ * 1: basic output for files being checked
+ * 2: ruleset and file parsing output
+ * 3: sniff execution output
+ * @property bool $interactive Enable interactive checking mode.
+ * @property int $parallel Check files in parallel.
+ * @property bool $cache Enable the use of the file cache.
+ * @property string $cacheFile Path to the file where the cache data should be written
+ * @property bool $colors Display colours in output.
+ * @property bool $explain Explain the coding standards.
+ * @property bool $local Process local files in directories only (no recursion).
+ * @property bool $showSources Show sniff source codes in report output.
+ * @property bool $showProgress Show basic progress information while running.
+ * @property bool $quiet Quiet mode; disables progress and verbose output.
+ * @property bool $annotations Process phpcs: annotations.
+ * @property int $tabWidth How many spaces each tab is worth.
+ * @property string $encoding The encoding of the files being checked.
+ * @property string[] $sniffs The sniffs that should be used for checking.
+ * If empty, all sniffs in the supplied standards will be used.
+ * @property string[] $exclude The sniffs that should be excluded from checking.
+ * If empty, all sniffs in the supplied standards will be used.
+ * @property string[] $ignored Regular expressions used to ignore files and folders during checking.
+ * @property string $reportFile A file where the report output should be written.
+ * @property string $generator The documentation generator to use.
+ * @property string $filter The filter to use for the run.
+ * @property string[] $bootstrap One of more files to include before the run begins.
+ * @property int|string $reportWidth The maximum number of columns that reports should use for output.
+ * Set to "auto" for have this value changed to the width of the terminal.
+ * @property int $errorSeverity The minimum severity an error must have to be displayed.
+ * @property int $warningSeverity The minimum severity a warning must have to be displayed.
+ * @property bool $recordErrors Record the content of error messages as well as error counts.
+ * @property string $suffix A suffix to add to fixed files.
+ * @property string $basepath A file system location to strip from the paths of files shown in reports.
+ * @property bool $stdin Read content from STDIN instead of supplied files.
+ * @property string $stdinContent Content passed directly to PHPCS on STDIN.
+ * @property string $stdinPath The path to use for content passed on STDIN.
+ * @property bool $trackTime Whether or not to track sniff run time.
+ *
+ * @property array $extensions File extensions that should be checked, and what tokenizer to use.
+ * E.g., array('inc' => 'PHP');
+ * @property array $reports The reports to use for printing output after the run.
+ * The format of the array is:
+ * array(
+ * 'reportName1' => 'outputFile',
+ * 'reportName2' => null,
+ * );
+ * If the array value is NULL, the report will be written to the screen.
+ *
+ * @property string[] $unknown Any arguments gathered on the command line that are unknown to us.
+ * E.g., using `phpcs -c` will give array('c');
+ */
+class Config
+{
+
+ /**
+ * The current version.
+ *
+ * @var string
+ */
+ const VERSION = '3.8.1';
+
+ /**
+ * Package stability; either stable, beta or alpha.
+ *
+ * @var string
+ */
+ const STABILITY = 'stable';
+
+ /**
+ * Default report width when no report width is provided and 'auto' does not yield a valid width.
+ *
+ * @var int
+ */
+ const DEFAULT_REPORT_WIDTH = 80;
+
+ /**
+ * An array of settings that PHPCS and PHPCBF accept.
+ *
+ * This array is not meant to be accessed directly. Instead, use the settings
+ * as if they are class member vars so the __get() and __set() magic methods
+ * can be used to validate the values. For example, to set the verbosity level to
+ * level 2, use $this->verbosity = 2; instead of accessing this property directly.
+ *
+ * Each of these settings is described in the class comment property list.
+ *
+ * @var array
+ */
+ private $settings = [
+ 'files' => null,
+ 'standards' => null,
+ 'verbosity' => null,
+ 'interactive' => null,
+ 'parallel' => null,
+ 'cache' => null,
+ 'cacheFile' => null,
+ 'colors' => null,
+ 'explain' => null,
+ 'local' => null,
+ 'showSources' => null,
+ 'showProgress' => null,
+ 'quiet' => null,
+ 'annotations' => null,
+ 'tabWidth' => null,
+ 'encoding' => null,
+ 'extensions' => null,
+ 'sniffs' => null,
+ 'exclude' => null,
+ 'ignored' => null,
+ 'reportFile' => null,
+ 'generator' => null,
+ 'filter' => null,
+ 'bootstrap' => null,
+ 'reports' => null,
+ 'basepath' => null,
+ 'reportWidth' => null,
+ 'errorSeverity' => null,
+ 'warningSeverity' => null,
+ 'recordErrors' => null,
+ 'suffix' => null,
+ 'stdin' => null,
+ 'stdinContent' => null,
+ 'stdinPath' => null,
+ 'trackTime' => null,
+ 'unknown' => null,
+ ];
+
+ /**
+ * Whether or not to kill the process when an unknown command line arg is found.
+ *
+ * If FALSE, arguments that are not command line options or file/directory paths
+ * will be ignored and execution will continue. These values will be stored in
+ * $this->unknown.
+ *
+ * @var boolean
+ */
+ public $dieOnUnknownArg;
+
+ /**
+ * The current command line arguments we are processing.
+ *
+ * @var string[]
+ */
+ private $cliArgs = [];
+
+ /**
+ * Command line values that the user has supplied directly.
+ *
+ * @var array>
+ */
+ private static $overriddenDefaults = [];
+
+ /**
+ * Config file data that has been loaded for the run.
+ *
+ * @var array
+ */
+ private static $configData = null;
+
+ /**
+ * The full path to the config data file that has been loaded.
+ *
+ * @var string
+ */
+ private static $configDataFile = null;
+
+ /**
+ * Automatically discovered executable utility paths.
+ *
+ * @var array
+ */
+ private static $executablePaths = [];
+
+
+ /**
+ * Get the value of an inaccessible property.
+ *
+ * @param string $name The name of the property.
+ *
+ * @return mixed
+ * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the setting name is invalid.
+ */
+ public function __get($name)
+ {
+ if (array_key_exists($name, $this->settings) === false) {
+ throw new RuntimeException("ERROR: unable to get value of property \"$name\"");
+ }
+
+ // Figure out what the terminal width needs to be for "auto".
+ if ($name === 'reportWidth' && $this->settings[$name] === 'auto') {
+ if (function_exists('shell_exec') === true) {
+ $dimensions = shell_exec('stty size 2>&1');
+ if (is_string($dimensions) === true && preg_match('|\d+ (\d+)|', $dimensions, $matches) === 1) {
+ $this->settings[$name] = (int) $matches[1];
+ }
+ }
+
+ if ($this->settings[$name] === 'auto') {
+ // If shell_exec wasn't available or didn't yield a usable value, set to the default.
+ // This will prevent subsequent retrievals of the reportWidth from making another call to stty.
+ $this->settings[$name] = self::DEFAULT_REPORT_WIDTH;
+ }
+ }
+
+ return $this->settings[$name];
+
+ }//end __get()
+
+
+ /**
+ * Set the value of an inaccessible property.
+ *
+ * @param string $name The name of the property.
+ * @param mixed $value The value of the property.
+ *
+ * @return void
+ * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the setting name is invalid.
+ */
+ public function __set($name, $value)
+ {
+ if (array_key_exists($name, $this->settings) === false) {
+ throw new RuntimeException("Can't __set() $name; setting doesn't exist");
+ }
+
+ switch ($name) {
+ case 'reportWidth' :
+ if (is_string($value) === true && $value === 'auto') {
+ // Nothing to do. Leave at 'auto'.
+ break;
+ }
+
+ if (is_int($value) === true) {
+ $value = abs($value);
+ } else if (is_string($value) === true && preg_match('`^\d+$`', $value) === 1) {
+ $value = (int) $value;
+ } else {
+ $value = self::DEFAULT_REPORT_WIDTH;
+ }
+ break;
+
+ case 'standards' :
+ $cleaned = [];
+
+ // Check if the standard name is valid, or if the case is invalid.
+ $installedStandards = Util\Standards::getInstalledStandards();
+ foreach ($value as $standard) {
+ foreach ($installedStandards as $validStandard) {
+ if (strtolower($standard) === strtolower($validStandard)) {
+ $standard = $validStandard;
+ break;
+ }
+ }
+
+ $cleaned[] = $standard;
+ }
+
+ $value = $cleaned;
+ break;
+
+ // Only track time when explicitly needed.
+ case 'verbosity':
+ if ($value > 2) {
+ $this->settings['trackTime'] = true;
+ }
+ break;
+ case 'reports':
+ $reports = array_change_key_case($value, CASE_LOWER);
+ if (array_key_exists('performance', $reports) === true) {
+ $this->settings['trackTime'] = true;
+ }
+ break;
+
+ default :
+ // No validation required.
+ break;
+ }//end switch
+
+ $this->settings[$name] = $value;
+
+ }//end __set()
+
+
+ /**
+ * Check if the value of an inaccessible property is set.
+ *
+ * @param string $name The name of the property.
+ *
+ * @return bool
+ */
+ public function __isset($name)
+ {
+ return isset($this->settings[$name]);
+
+ }//end __isset()
+
+
+ /**
+ * Unset the value of an inaccessible property.
+ *
+ * @param string $name The name of the property.
+ *
+ * @return void
+ */
+ public function __unset($name)
+ {
+ $this->settings[$name] = null;
+
+ }//end __unset()
+
+
+ /**
+ * Get the array of all config settings.
+ *
+ * @return array
+ */
+ public function getSettings()
+ {
+ return $this->settings;
+
+ }//end getSettings()
+
+
+ /**
+ * Set the array of all config settings.
+ *
+ * @param array $settings The array of config settings.
+ *
+ * @return void
+ */
+ public function setSettings($settings)
+ {
+ return $this->settings = $settings;
+
+ }//end setSettings()
+
+
+ /**
+ * Creates a Config object and populates it with command line values.
+ *
+ * @param array $cliArgs An array of values gathered from CLI args.
+ * @param bool $dieOnUnknownArg Whether or not to kill the process when an
+ * unknown command line arg is found.
+ *
+ * @return void
+ */
+ public function __construct(array $cliArgs=[], $dieOnUnknownArg=true)
+ {
+ if (defined('PHP_CODESNIFFER_IN_TESTS') === true) {
+ // Let everything through during testing so that we can
+ // make use of PHPUnit command line arguments as well.
+ $this->dieOnUnknownArg = false;
+ } else {
+ $this->dieOnUnknownArg = $dieOnUnknownArg;
+ }
+
+ if (empty($cliArgs) === true) {
+ $cliArgs = $_SERVER['argv'];
+ array_shift($cliArgs);
+ }
+
+ $this->restoreDefaults();
+ $this->setCommandLineValues($cliArgs);
+
+ if (isset(self::$overriddenDefaults['standards']) === false) {
+ // They did not supply a standard to use.
+ // Look for a default ruleset in the current directory or higher.
+ $currentDir = getcwd();
+
+ $defaultFiles = [
+ '.phpcs.xml',
+ 'phpcs.xml',
+ '.phpcs.xml.dist',
+ 'phpcs.xml.dist',
+ ];
+
+ do {
+ foreach ($defaultFiles as $defaultFilename) {
+ $default = $currentDir.DIRECTORY_SEPARATOR.$defaultFilename;
+ if (is_file($default) === true) {
+ $this->standards = [$default];
+ break(2);
+ }
+ }
+
+ $lastDir = $currentDir;
+ $currentDir = dirname($currentDir);
+ } while ($currentDir !== '.' && $currentDir !== $lastDir && Common::isReadable($currentDir) === true);
+ }//end if
+
+ if (defined('STDIN') === false
+ || stripos(PHP_OS, 'WIN') === 0
+ ) {
+ return;
+ }
+
+ $handle = fopen('php://stdin', 'r');
+
+ // Check for content on STDIN.
+ if ($this->stdin === true
+ || (Util\Common::isStdinATTY() === false
+ && feof($handle) === false)
+ ) {
+ $readStreams = [$handle];
+ $writeSteams = null;
+
+ $fileContents = '';
+ while (is_resource($handle) === true && feof($handle) === false) {
+ // Set a timeout of 200ms.
+ if (stream_select($readStreams, $writeSteams, $writeSteams, 0, 200000) === 0) {
+ break;
+ }
+
+ $fileContents .= fgets($handle);
+ }
+
+ if (trim($fileContents) !== '') {
+ $this->stdin = true;
+ $this->stdinContent = $fileContents;
+ self::$overriddenDefaults['stdin'] = true;
+ self::$overriddenDefaults['stdinContent'] = true;
+ }
+ }//end if
+
+ fclose($handle);
+
+ }//end __construct()
+
+
+ /**
+ * Set the command line values.
+ *
+ * @param array $args An array of command line arguments to set.
+ *
+ * @return void
+ */
+ public function setCommandLineValues($args)
+ {
+ $this->cliArgs = $args;
+ $numArgs = count($args);
+
+ for ($i = 0; $i < $numArgs; $i++) {
+ $arg = $this->cliArgs[$i];
+ if ($arg === '') {
+ continue;
+ }
+
+ if ($arg[0] === '-') {
+ if ($arg === '-') {
+ // Asking to read from STDIN.
+ $this->stdin = true;
+ self::$overriddenDefaults['stdin'] = true;
+ continue;
+ }
+
+ if ($arg === '--') {
+ // Empty argument, ignore it.
+ continue;
+ }
+
+ if ($arg[1] === '-') {
+ $this->processLongArgument(substr($arg, 2), $i);
+ } else {
+ $switches = str_split($arg);
+ foreach ($switches as $switch) {
+ if ($switch === '-') {
+ continue;
+ }
+
+ $this->processShortArgument($switch, $i);
+ }
+ }
+ } else {
+ $this->processUnknownArgument($arg, $i);
+ }//end if
+ }//end for
+
+ }//end setCommandLineValues()
+
+
+ /**
+ * Restore default values for all possible command line arguments.
+ *
+ * @return void
+ */
+ public function restoreDefaults()
+ {
+ $this->files = [];
+ $this->standards = ['PEAR'];
+ $this->verbosity = 0;
+ $this->interactive = false;
+ $this->cache = false;
+ $this->cacheFile = null;
+ $this->colors = false;
+ $this->explain = false;
+ $this->local = false;
+ $this->showSources = false;
+ $this->showProgress = false;
+ $this->quiet = false;
+ $this->annotations = true;
+ $this->parallel = 1;
+ $this->tabWidth = 0;
+ $this->encoding = 'utf-8';
+ $this->extensions = [
+ 'php' => 'PHP',
+ 'inc' => 'PHP',
+ 'js' => 'JS',
+ 'css' => 'CSS',
+ ];
+ $this->sniffs = [];
+ $this->exclude = [];
+ $this->ignored = [];
+ $this->reportFile = null;
+ $this->generator = null;
+ $this->filter = null;
+ $this->bootstrap = [];
+ $this->basepath = null;
+ $this->reports = ['full' => null];
+ $this->reportWidth = 'auto';
+ $this->errorSeverity = 5;
+ $this->warningSeverity = 5;
+ $this->recordErrors = true;
+ $this->suffix = '';
+ $this->stdin = false;
+ $this->stdinContent = null;
+ $this->stdinPath = null;
+ $this->trackTime = false;
+ $this->unknown = [];
+
+ $standard = self::getConfigData('default_standard');
+ if ($standard !== null) {
+ $this->standards = explode(',', $standard);
+ }
+
+ $reportFormat = self::getConfigData('report_format');
+ if ($reportFormat !== null) {
+ $this->reports = [$reportFormat => null];
+ }
+
+ $tabWidth = self::getConfigData('tab_width');
+ if ($tabWidth !== null) {
+ $this->tabWidth = (int) $tabWidth;
+ }
+
+ $encoding = self::getConfigData('encoding');
+ if ($encoding !== null) {
+ $this->encoding = strtolower($encoding);
+ }
+
+ $severity = self::getConfigData('severity');
+ if ($severity !== null) {
+ $this->errorSeverity = (int) $severity;
+ $this->warningSeverity = (int) $severity;
+ }
+
+ $severity = self::getConfigData('error_severity');
+ if ($severity !== null) {
+ $this->errorSeverity = (int) $severity;
+ }
+
+ $severity = self::getConfigData('warning_severity');
+ if ($severity !== null) {
+ $this->warningSeverity = (int) $severity;
+ }
+
+ $showWarnings = self::getConfigData('show_warnings');
+ if ($showWarnings !== null) {
+ $showWarnings = (bool) $showWarnings;
+ if ($showWarnings === false) {
+ $this->warningSeverity = 0;
+ }
+ }
+
+ $reportWidth = self::getConfigData('report_width');
+ if ($reportWidth !== null) {
+ $this->reportWidth = $reportWidth;
+ }
+
+ $showProgress = self::getConfigData('show_progress');
+ if ($showProgress !== null) {
+ $this->showProgress = (bool) $showProgress;
+ }
+
+ $quiet = self::getConfigData('quiet');
+ if ($quiet !== null) {
+ $this->quiet = (bool) $quiet;
+ }
+
+ $colors = self::getConfigData('colors');
+ if ($colors !== null) {
+ $this->colors = (bool) $colors;
+ }
+
+ if (defined('PHP_CODESNIFFER_IN_TESTS') === false) {
+ $cache = self::getConfigData('cache');
+ if ($cache !== null) {
+ $this->cache = (bool) $cache;
+ }
+
+ $parallel = self::getConfigData('parallel');
+ if ($parallel !== null) {
+ $this->parallel = max((int) $parallel, 1);
+ }
+ }
+
+ }//end restoreDefaults()
+
+
+ /**
+ * Processes a short (-e) command line argument.
+ *
+ * @param string $arg The command line argument.
+ * @param int $pos The position of the argument on the command line.
+ *
+ * @return void
+ * @throws \PHP_CodeSniffer\Exceptions\DeepExitException
+ */
+ public function processShortArgument($arg, $pos)
+ {
+ switch ($arg) {
+ case 'h':
+ case '?':
+ ob_start();
+ $this->printUsage();
+ $output = ob_get_contents();
+ ob_end_clean();
+ throw new DeepExitException($output, 0);
+ case 'i' :
+ ob_start();
+ Util\Standards::printInstalledStandards();
+ $output = ob_get_contents();
+ ob_end_clean();
+ throw new DeepExitException($output, 0);
+ case 'v' :
+ if ($this->quiet === true) {
+ // Ignore when quiet mode is enabled.
+ break;
+ }
+
+ $this->verbosity++;
+ self::$overriddenDefaults['verbosity'] = true;
+ break;
+ case 'l' :
+ $this->local = true;
+ self::$overriddenDefaults['local'] = true;
+ break;
+ case 's' :
+ $this->showSources = true;
+ self::$overriddenDefaults['showSources'] = true;
+ break;
+ case 'a' :
+ $this->interactive = true;
+ self::$overriddenDefaults['interactive'] = true;
+ break;
+ case 'e':
+ $this->explain = true;
+ self::$overriddenDefaults['explain'] = true;
+ break;
+ case 'p' :
+ if ($this->quiet === true) {
+ // Ignore when quiet mode is enabled.
+ break;
+ }
+
+ $this->showProgress = true;
+ self::$overriddenDefaults['showProgress'] = true;
+ break;
+ case 'q' :
+ // Quiet mode disables a few other settings as well.
+ $this->quiet = true;
+ $this->showProgress = false;
+ $this->verbosity = 0;
+
+ self::$overriddenDefaults['quiet'] = true;
+ break;
+ case 'm' :
+ $this->recordErrors = false;
+ self::$overriddenDefaults['recordErrors'] = true;
+ break;
+ case 'd' :
+ $ini = explode('=', $this->cliArgs[($pos + 1)]);
+ $this->cliArgs[($pos + 1)] = '';
+ if (isset($ini[1]) === true) {
+ ini_set($ini[0], $ini[1]);
+ } else {
+ ini_set($ini[0], true);
+ }
+ break;
+ case 'n' :
+ if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
+ $this->warningSeverity = 0;
+ self::$overriddenDefaults['warningSeverity'] = true;
+ }
+ break;
+ case 'w' :
+ if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
+ $this->warningSeverity = $this->errorSeverity;
+ self::$overriddenDefaults['warningSeverity'] = true;
+ }
+ break;
+ default:
+ if ($this->dieOnUnknownArg === false) {
+ $unknown = $this->unknown;
+ $unknown[] = $arg;
+ $this->unknown = $unknown;
+ } else {
+ $this->processUnknownArgument('-'.$arg, $pos);
+ }
+ }//end switch
+
+ }//end processShortArgument()
+
+
+ /**
+ * Processes a long (--example) command-line argument.
+ *
+ * @param string $arg The command line argument.
+ * @param int $pos The position of the argument on the command line.
+ *
+ * @return void
+ * @throws \PHP_CodeSniffer\Exceptions\DeepExitException
+ */
+ public function processLongArgument($arg, $pos)
+ {
+ switch ($arg) {
+ case 'help':
+ ob_start();
+ $this->printUsage();
+ $output = ob_get_contents();
+ ob_end_clean();
+ throw new DeepExitException($output, 0);
+ case 'version':
+ $output = 'PHP_CodeSniffer version '.self::VERSION.' ('.self::STABILITY.') ';
+ $output .= 'by Squiz and PHPCSStandards'.PHP_EOL;
+ throw new DeepExitException($output, 0);
+ case 'colors':
+ if (isset(self::$overriddenDefaults['colors']) === true) {
+ break;
+ }
+
+ $this->colors = true;
+ self::$overriddenDefaults['colors'] = true;
+ break;
+ case 'no-colors':
+ if (isset(self::$overriddenDefaults['colors']) === true) {
+ break;
+ }
+
+ $this->colors = false;
+ self::$overriddenDefaults['colors'] = true;
+ break;
+ case 'cache':
+ if (isset(self::$overriddenDefaults['cache']) === true) {
+ break;
+ }
+
+ if (defined('PHP_CODESNIFFER_IN_TESTS') === false) {
+ $this->cache = true;
+ self::$overriddenDefaults['cache'] = true;
+ }
+ break;
+ case 'no-cache':
+ if (isset(self::$overriddenDefaults['cache']) === true) {
+ break;
+ }
+
+ $this->cache = false;
+ self::$overriddenDefaults['cache'] = true;
+ break;
+ case 'ignore-annotations':
+ if (isset(self::$overriddenDefaults['annotations']) === true) {
+ break;
+ }
+
+ $this->annotations = false;
+ self::$overriddenDefaults['annotations'] = true;
+ break;
+ case 'config-set':
+ if (isset($this->cliArgs[($pos + 1)]) === false
+ || isset($this->cliArgs[($pos + 2)]) === false
+ ) {
+ $error = 'ERROR: Setting a config option requires a name and value'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $key = $this->cliArgs[($pos + 1)];
+ $value = $this->cliArgs[($pos + 2)];
+ $current = self::getConfigData($key);
+
+ try {
+ $this->setConfigData($key, $value);
+ } catch (\Exception $e) {
+ throw new DeepExitException($e->getMessage().PHP_EOL, 3);
+ }
+
+ $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
+
+ if ($current === null) {
+ $output .= "Config value \"$key\" added successfully".PHP_EOL;
+ } else {
+ $output .= "Config value \"$key\" updated successfully; old value was \"$current\"".PHP_EOL;
+ }
+ throw new DeepExitException($output, 0);
+ case 'config-delete':
+ if (isset($this->cliArgs[($pos + 1)]) === false) {
+ $error = 'ERROR: Deleting a config option requires the name of the option'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
+
+ $key = $this->cliArgs[($pos + 1)];
+ $current = self::getConfigData($key);
+ if ($current === null) {
+ $output .= "Config value \"$key\" has not been set".PHP_EOL;
+ } else {
+ try {
+ $this->setConfigData($key, null);
+ } catch (\Exception $e) {
+ throw new DeepExitException($e->getMessage().PHP_EOL, 3);
+ }
+
+ $output .= "Config value \"$key\" removed successfully; old value was \"$current\"".PHP_EOL;
+ }
+ throw new DeepExitException($output, 0);
+ case 'config-show':
+ ob_start();
+ $data = self::getAllConfigData();
+ echo 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
+ $this->printConfigData($data);
+ $output = ob_get_contents();
+ ob_end_clean();
+ throw new DeepExitException($output, 0);
+ case 'runtime-set':
+ if (isset($this->cliArgs[($pos + 1)]) === false
+ || isset($this->cliArgs[($pos + 2)]) === false
+ ) {
+ $error = 'ERROR: Setting a runtime config option requires a name and value'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $key = $this->cliArgs[($pos + 1)];
+ $value = $this->cliArgs[($pos + 2)];
+ $this->cliArgs[($pos + 1)] = '';
+ $this->cliArgs[($pos + 2)] = '';
+ self::setConfigData($key, $value, true);
+ if (isset(self::$overriddenDefaults['runtime-set']) === false) {
+ self::$overriddenDefaults['runtime-set'] = [];
+ }
+
+ self::$overriddenDefaults['runtime-set'][$key] = true;
+ break;
+ default:
+ if (substr($arg, 0, 7) === 'sniffs=') {
+ if (isset(self::$overriddenDefaults['sniffs']) === true) {
+ break;
+ }
+
+ $sniffs = explode(',', substr($arg, 7));
+ foreach ($sniffs as $sniff) {
+ if (substr_count($sniff, '.') !== 2) {
+ $error = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+ }
+
+ $this->sniffs = $sniffs;
+ self::$overriddenDefaults['sniffs'] = true;
+ } else if (substr($arg, 0, 8) === 'exclude=') {
+ if (isset(self::$overriddenDefaults['exclude']) === true) {
+ break;
+ }
+
+ $sniffs = explode(',', substr($arg, 8));
+ foreach ($sniffs as $sniff) {
+ if (substr_count($sniff, '.') !== 2) {
+ $error = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+ }
+
+ $this->exclude = $sniffs;
+ self::$overriddenDefaults['exclude'] = true;
+ } else if (defined('PHP_CODESNIFFER_IN_TESTS') === false
+ && substr($arg, 0, 6) === 'cache='
+ ) {
+ if ((isset(self::$overriddenDefaults['cache']) === true
+ && $this->cache === false)
+ || isset(self::$overriddenDefaults['cacheFile']) === true
+ ) {
+ break;
+ }
+
+ // Turn caching on.
+ $this->cache = true;
+ self::$overriddenDefaults['cache'] = true;
+
+ $this->cacheFile = Util\Common::realpath(substr($arg, 6));
+
+ // It may not exist and return false instead.
+ if ($this->cacheFile === false) {
+ $this->cacheFile = substr($arg, 6);
+
+ $dir = dirname($this->cacheFile);
+ if (is_dir($dir) === false) {
+ $error = 'ERROR: The specified cache file path "'.$this->cacheFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ if ($dir === '.') {
+ // Passed cache file is a file in the current directory.
+ $this->cacheFile = getcwd().'/'.basename($this->cacheFile);
+ } else {
+ if ($dir[0] === '/') {
+ // An absolute path.
+ $dir = Util\Common::realpath($dir);
+ } else {
+ $dir = Util\Common::realpath(getcwd().'/'.$dir);
+ }
+
+ if ($dir !== false) {
+ // Cache file path is relative.
+ $this->cacheFile = $dir.'/'.basename($this->cacheFile);
+ }
+ }
+ }//end if
+
+ self::$overriddenDefaults['cacheFile'] = true;
+
+ if (is_dir($this->cacheFile) === true) {
+ $error = 'ERROR: The specified cache file path "'.$this->cacheFile.'" is a directory'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+ } else if (substr($arg, 0, 10) === 'bootstrap=') {
+ $files = explode(',', substr($arg, 10));
+ $bootstrap = [];
+ foreach ($files as $file) {
+ $path = Util\Common::realpath($file);
+ if ($path === false) {
+ $error = 'ERROR: The specified bootstrap file "'.$file.'" does not exist'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $bootstrap[] = $path;
+ }
+
+ $this->bootstrap = array_merge($this->bootstrap, $bootstrap);
+ self::$overriddenDefaults['bootstrap'] = true;
+ } else if (substr($arg, 0, 10) === 'file-list=') {
+ $fileList = substr($arg, 10);
+ $path = Util\Common::realpath($fileList);
+ if ($path === false) {
+ $error = 'ERROR: The specified file list "'.$fileList.'" does not exist'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $files = file($path);
+ foreach ($files as $inputFile) {
+ $inputFile = trim($inputFile);
+
+ // Skip empty lines.
+ if ($inputFile === '') {
+ continue;
+ }
+
+ $this->processFilePath($inputFile);
+ }
+ } else if (substr($arg, 0, 11) === 'stdin-path=') {
+ if (isset(self::$overriddenDefaults['stdinPath']) === true) {
+ break;
+ }
+
+ $this->stdinPath = Util\Common::realpath(substr($arg, 11));
+
+ // It may not exist and return false instead, so use whatever they gave us.
+ if ($this->stdinPath === false) {
+ $this->stdinPath = trim(substr($arg, 11));
+ }
+
+ self::$overriddenDefaults['stdinPath'] = true;
+ } else if (PHP_CODESNIFFER_CBF === false && substr($arg, 0, 12) === 'report-file=') {
+ if (isset(self::$overriddenDefaults['reportFile']) === true) {
+ break;
+ }
+
+ $this->reportFile = Util\Common::realpath(substr($arg, 12));
+
+ // It may not exist and return false instead.
+ if ($this->reportFile === false) {
+ $this->reportFile = substr($arg, 12);
+
+ $dir = Util\Common::realpath(dirname($this->reportFile));
+ if (is_dir($dir) === false) {
+ $error = 'ERROR: The specified report file path "'.$this->reportFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $this->reportFile = $dir.'/'.basename($this->reportFile);
+ }//end if
+
+ self::$overriddenDefaults['reportFile'] = true;
+
+ if (is_dir($this->reportFile) === true) {
+ $error = 'ERROR: The specified report file path "'.$this->reportFile.'" is a directory'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+ } else if (substr($arg, 0, 13) === 'report-width=') {
+ if (isset(self::$overriddenDefaults['reportWidth']) === true) {
+ break;
+ }
+
+ $this->reportWidth = substr($arg, 13);
+ self::$overriddenDefaults['reportWidth'] = true;
+ } else if (substr($arg, 0, 9) === 'basepath=') {
+ if (isset(self::$overriddenDefaults['basepath']) === true) {
+ break;
+ }
+
+ self::$overriddenDefaults['basepath'] = true;
+
+ if (substr($arg, 9) === '') {
+ $this->basepath = null;
+ break;
+ }
+
+ $this->basepath = Util\Common::realpath(substr($arg, 9));
+
+ // It may not exist and return false instead.
+ if ($this->basepath === false) {
+ $this->basepath = substr($arg, 9);
+ }
+
+ if (is_dir($this->basepath) === false) {
+ $error = 'ERROR: The specified basepath "'.$this->basepath.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+ } else if ((substr($arg, 0, 7) === 'report=' || substr($arg, 0, 7) === 'report-')) {
+ $reports = [];
+
+ if ($arg[6] === '-') {
+ // This is a report with file output.
+ $split = strpos($arg, '=');
+ if ($split === false) {
+ $report = substr($arg, 7);
+ $output = null;
+ } else {
+ $report = substr($arg, 7, ($split - 7));
+ $output = substr($arg, ($split + 1));
+ if ($output === false) {
+ $output = null;
+ } else {
+ $dir = Util\Common::realpath(dirname($output));
+ if (is_dir($dir) === false) {
+ $error = 'ERROR: The specified '.$report.' report file path "'.$output.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $output = $dir.'/'.basename($output);
+
+ if (is_dir($output) === true) {
+ $error = 'ERROR: The specified '.$report.' report file path "'.$output.'" is a directory'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+ }//end if
+ }//end if
+
+ $reports[$report] = $output;
+ } else {
+ // This is a single report.
+ if (isset(self::$overriddenDefaults['reports']) === true) {
+ break;
+ }
+
+ $reportNames = explode(',', substr($arg, 7));
+ foreach ($reportNames as $report) {
+ $reports[$report] = null;
+ }
+ }//end if
+
+ // Remove the default value so the CLI value overrides it.
+ if (isset(self::$overriddenDefaults['reports']) === false) {
+ $this->reports = $reports;
+ } else {
+ $this->reports = array_merge($this->reports, $reports);
+ }
+
+ self::$overriddenDefaults['reports'] = true;
+ } else if (substr($arg, 0, 7) === 'filter=') {
+ if (isset(self::$overriddenDefaults['filter']) === true) {
+ break;
+ }
+
+ $this->filter = substr($arg, 7);
+ self::$overriddenDefaults['filter'] = true;
+ } else if (substr($arg, 0, 9) === 'standard=') {
+ $standards = trim(substr($arg, 9));
+ if ($standards !== '') {
+ $this->standards = explode(',', $standards);
+ }
+
+ self::$overriddenDefaults['standards'] = true;
+ } else if (substr($arg, 0, 11) === 'extensions=') {
+ if (isset(self::$overriddenDefaults['extensions']) === true) {
+ break;
+ }
+
+ $extensions = explode(',', substr($arg, 11));
+ $newExtensions = [];
+ foreach ($extensions as $ext) {
+ $slash = strpos($ext, '/');
+ if ($slash !== false) {
+ // They specified the tokenizer too.
+ list($ext, $tokenizer) = explode('/', $ext);
+ $newExtensions[$ext] = strtoupper($tokenizer);
+ continue;
+ }
+
+ if (isset($this->extensions[$ext]) === true) {
+ $newExtensions[$ext] = $this->extensions[$ext];
+ } else {
+ $newExtensions[$ext] = 'PHP';
+ }
+ }
+
+ $this->extensions = $newExtensions;
+ self::$overriddenDefaults['extensions'] = true;
+ } else if (substr($arg, 0, 7) === 'suffix=') {
+ if (isset(self::$overriddenDefaults['suffix']) === true) {
+ break;
+ }
+
+ $this->suffix = substr($arg, 7);
+ self::$overriddenDefaults['suffix'] = true;
+ } else if (substr($arg, 0, 9) === 'parallel=') {
+ if (isset(self::$overriddenDefaults['parallel']) === true) {
+ break;
+ }
+
+ $this->parallel = max((int) substr($arg, 9), 1);
+ self::$overriddenDefaults['parallel'] = true;
+ } else if (substr($arg, 0, 9) === 'severity=') {
+ $this->errorSeverity = (int) substr($arg, 9);
+ $this->warningSeverity = $this->errorSeverity;
+ if (isset(self::$overriddenDefaults['errorSeverity']) === false) {
+ self::$overriddenDefaults['errorSeverity'] = true;
+ }
+
+ if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
+ self::$overriddenDefaults['warningSeverity'] = true;
+ }
+ } else if (substr($arg, 0, 15) === 'error-severity=') {
+ if (isset(self::$overriddenDefaults['errorSeverity']) === true) {
+ break;
+ }
+
+ $this->errorSeverity = (int) substr($arg, 15);
+ self::$overriddenDefaults['errorSeverity'] = true;
+ } else if (substr($arg, 0, 17) === 'warning-severity=') {
+ if (isset(self::$overriddenDefaults['warningSeverity']) === true) {
+ break;
+ }
+
+ $this->warningSeverity = (int) substr($arg, 17);
+ self::$overriddenDefaults['warningSeverity'] = true;
+ } else if (substr($arg, 0, 7) === 'ignore=') {
+ if (isset(self::$overriddenDefaults['ignored']) === true) {
+ break;
+ }
+
+ // Split the ignore string on commas, unless the comma is escaped
+ // using 1 or 3 slashes (\, or \\\,).
+ $patterns = preg_split(
+ '/(?<=(?ignored = $ignored;
+ self::$overriddenDefaults['ignored'] = true;
+ } else if (substr($arg, 0, 10) === 'generator='
+ && PHP_CODESNIFFER_CBF === false
+ ) {
+ if (isset(self::$overriddenDefaults['generator']) === true) {
+ break;
+ }
+
+ $this->generator = substr($arg, 10);
+ self::$overriddenDefaults['generator'] = true;
+ } else if (substr($arg, 0, 9) === 'encoding=') {
+ if (isset(self::$overriddenDefaults['encoding']) === true) {
+ break;
+ }
+
+ $this->encoding = strtolower(substr($arg, 9));
+ self::$overriddenDefaults['encoding'] = true;
+ } else if (substr($arg, 0, 10) === 'tab-width=') {
+ if (isset(self::$overriddenDefaults['tabWidth']) === true) {
+ break;
+ }
+
+ $this->tabWidth = (int) substr($arg, 10);
+ self::$overriddenDefaults['tabWidth'] = true;
+ } else {
+ if ($this->dieOnUnknownArg === false) {
+ $eqPos = strpos($arg, '=');
+ try {
+ $unknown = $this->unknown;
+
+ if ($eqPos === false) {
+ $unknown[$arg] = $arg;
+ } else {
+ $value = substr($arg, ($eqPos + 1));
+ $arg = substr($arg, 0, $eqPos);
+ $unknown[$arg] = $value;
+ }
+
+ $this->unknown = $unknown;
+ } catch (RuntimeException $e) {
+ // Value is not valid, so just ignore it.
+ }
+ } else {
+ $this->processUnknownArgument('--'.$arg, $pos);
+ }
+ }//end if
+ break;
+ }//end switch
+
+ }//end processLongArgument()
+
+
+ /**
+ * Processes an unknown command line argument.
+ *
+ * Assumes all unknown arguments are files and folders to check.
+ *
+ * @param string $arg The command line argument.
+ * @param int $pos The position of the argument on the command line.
+ *
+ * @return void
+ * @throws \PHP_CodeSniffer\Exceptions\DeepExitException
+ */
+ public function processUnknownArgument($arg, $pos)
+ {
+ // We don't know about any additional switches; just files.
+ if ($arg[0] === '-') {
+ if ($this->dieOnUnknownArg === false) {
+ return;
+ }
+
+ $error = "ERROR: option \"$arg\" not known".PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ }
+
+ $this->processFilePath($arg);
+
+ }//end processUnknownArgument()
+
+
+ /**
+ * Processes a file path and add it to the file list.
+ *
+ * @param string $path The path to the file to add.
+ *
+ * @return void
+ * @throws \PHP_CodeSniffer\Exceptions\DeepExitException
+ */
+ public function processFilePath($path)
+ {
+ // If we are processing STDIN, don't record any files to check.
+ if ($this->stdin === true) {
+ return;
+ }
+
+ $file = Util\Common::realpath($path);
+ if (file_exists($file) === false) {
+ if ($this->dieOnUnknownArg === false) {
+ return;
+ }
+
+ $error = 'ERROR: The file "'.$path.'" does not exist.'.PHP_EOL.PHP_EOL;
+ $error .= $this->printShortUsage(true);
+ throw new DeepExitException($error, 3);
+ } else {
+ // Can't modify the files array directly because it's not a real
+ // class member, so need to use this little get/modify/set trick.
+ $files = $this->files;
+ $files[] = $file;
+ $this->files = $files;
+ self::$overriddenDefaults['files'] = true;
+ }
+
+ }//end processFilePath()
+
+
+ /**
+ * Prints out the usage information for this script.
+ *
+ * @return void
+ */
+ public function printUsage()
+ {
+ echo PHP_EOL;
+
+ if (PHP_CODESNIFFER_CBF === true) {
+ $this->printPHPCBFUsage();
+ } else {
+ $this->printPHPCSUsage();
+ }
+
+ echo PHP_EOL;
+
+ }//end printUsage()
+
+
+ /**
+ * Prints out the short usage information for this script.
+ *
+ * @param bool $return If TRUE, the usage string is returned
+ * instead of output to screen.
+ *
+ * @return string|void
+ */
+ public function printShortUsage($return=false)
+ {
+ if (PHP_CODESNIFFER_CBF === true) {
+ $usage = 'Run "phpcbf --help" for usage information';
+ } else {
+ $usage = 'Run "phpcs --help" for usage information';
+ }
+
+ $usage .= PHP_EOL.PHP_EOL;
+
+ if ($return === true) {
+ return $usage;
+ }
+
+ echo $usage;
+
+ }//end printShortUsage()
+
+
+ /**
+ * Prints out the usage information for PHPCS.
+ *
+ * @return void
+ */
+ public function printPHPCSUsage()
+ {
+ echo 'Usage: phpcs [-nwlsaepqvi] [-d key[=value]] [--colors] [--no-colors]'.PHP_EOL;
+ echo ' [--cache[=]] [--no-cache] [--tab-width=]'.PHP_EOL;
+ echo ' [--report=] [--report-file=] [--report-=]'.PHP_EOL;
+ echo ' [--report-width=] [--basepath=] [--bootstrap=]'.PHP_EOL;
+ echo ' [--severity=] [--error-severity=] [--warning-severity=]'.PHP_EOL;
+ echo ' [--runtime-set key value] [--config-set key value] [--config-delete key] [--config-show]'.PHP_EOL;
+ echo ' [--standard=] [--sniffs=] [--exclude=]'.PHP_EOL;
+ echo ' [--encoding=] [--parallel=] [--generator=]'.PHP_EOL;
+ echo ' [--extensions=] [--ignore=] [--ignore-annotations]'.PHP_EOL;
+ echo ' [--stdin-path=] [--file-list=] [--filter=] - ...'.PHP_EOL;
+ echo PHP_EOL;
+ echo ' - Check STDIN instead of local files and directories'.PHP_EOL;
+ echo ' -n Do not print warnings (shortcut for --warning-severity=0)'.PHP_EOL;
+ echo ' -w Print both warnings and errors (this is the default)'.PHP_EOL;
+ echo ' -l Local directory only, no recursion'.PHP_EOL;
+ echo ' -s Show sniff codes in all reports'.PHP_EOL;
+ echo ' -a Run interactively'.PHP_EOL;
+ echo ' -e Explain a standard by showing the sniffs it includes'.PHP_EOL;
+ echo ' -p Show progress of the run'.PHP_EOL;
+ echo ' -q Quiet mode; disables progress and verbose output'.PHP_EOL;
+ echo ' -m Stop error messages from being recorded'.PHP_EOL;
+ echo ' (saves a lot of memory, but stops many reports from being used)'.PHP_EOL;
+ echo ' -v Print processed files'.PHP_EOL;
+ echo ' -vv Print ruleset and token output'.PHP_EOL;
+ echo ' -vvv Print sniff processing information'.PHP_EOL;
+ echo ' -i Show a list of installed coding standards'.PHP_EOL;
+ echo ' -d Set the [key] php.ini value to [value] or [true] if value is omitted'.PHP_EOL;
+ echo PHP_EOL;
+ echo ' --help Print this help message'.PHP_EOL;
+ echo ' --version Print version information'.PHP_EOL;
+ echo ' --colors Use colors in output'.PHP_EOL;
+ echo ' --no-colors Do not use colors in output (this is the default)'.PHP_EOL;
+ echo ' --cache Cache results between runs'.PHP_EOL;
+ echo ' --no-cache Do not cache results between runs (this is the default)'.PHP_EOL;
+ echo ' --ignore-annotations Ignore all phpcs: annotations in code comments'.PHP_EOL;
+ echo PHP_EOL;
+ echo ' Use a specific file for caching (uses a temporary file by default)'.PHP_EOL;
+ echo ' A path to strip from the front of file paths inside reports'.PHP_EOL;
+ echo ' A comma separated list of files to run before processing begins'.PHP_EOL;
+ echo ' The encoding of the files being checked (default is utf-8)'.PHP_EOL;
+ echo ' A comma separated list of file extensions to check'.PHP_EOL;
+ echo ' The type of the file can be specified using: ext/type'.PHP_EOL;
+ echo ' e.g., module/php,es/js'.PHP_EOL;
+ echo ' One or more files and/or directories to check'.PHP_EOL;
+ echo ' A file containing a list of files and/or directories to check (one per line)'.PHP_EOL;
+ echo ' Use either the "GitModified" or "GitStaged" filter,'.PHP_EOL;
+ echo ' or specify the path to a custom filter class'.PHP_EOL;
+ echo ' Use either the "HTML", "Markdown" or "Text" generator'.PHP_EOL;
+ echo ' (forces documentation generation instead of checking)'.PHP_EOL;
+ echo ' A comma separated list of patterns to ignore files and directories'.PHP_EOL;
+ echo ' How many files should be checked simultaneously (default is 1)'.PHP_EOL;
+ echo ' Print either the "full", "xml", "checkstyle", "csv"'.PHP_EOL;
+ echo ' "json", "junit", "emacs", "source", "summary", "diff"'.PHP_EOL;
+ echo ' "svnblame", "gitblame", "hgblame", "notifysend" or "performance",'.PHP_EOL;
+ echo ' report or specify the path to a custom report class'.PHP_EOL;
+ echo ' (the "full" report is printed by default)'.PHP_EOL;
+ echo ' Write the report to the specified file path'.PHP_EOL;
+ echo ' How many columns wide screen reports should be printed'.PHP_EOL;
+ echo ' or set to "auto" to use current screen width, where supported'.PHP_EOL;
+ echo ' The minimum severity required to display an error or warning'.PHP_EOL;
+ echo ' A comma separated list of sniff codes to include or exclude from checking'.PHP_EOL;
+ echo ' (all sniffs must be part of the specified standard)'.PHP_EOL;
+ echo ' The name or path of the coding standard to use'.PHP_EOL;
+ echo ' If processing STDIN, the file path that STDIN will be processed as'.PHP_EOL;
+ echo ' The number of spaces each tab represents'.PHP_EOL;
+
+ }//end printPHPCSUsage()
+
+
+ /**
+ * Prints out the usage information for PHPCBF.
+ *
+ * @return void
+ */
+ public function printPHPCBFUsage()
+ {
+ echo 'Usage: phpcbf [-nwli] [-d key[=value]] [--ignore-annotations] [--bootstrap=]'.PHP_EOL;
+ echo ' [--standard=] [--sniffs=] [--exclude=] [--suffix=]'.PHP_EOL;
+ echo ' [--severity=] [--error-severity=] [--warning-severity=]'.PHP_EOL;
+ echo ' [--tab-width=] [--encoding=] [--parallel=]'.PHP_EOL;
+ echo ' [--basepath=] [--extensions=] [--ignore=]'.PHP_EOL;
+ echo ' [--stdin-path=] [--file-list=] [--filter=] - ...'.PHP_EOL;
+ echo PHP_EOL;
+ echo ' - Fix STDIN instead of local files and directories'.PHP_EOL;
+ echo ' -n Do not fix warnings (shortcut for --warning-severity=0)'.PHP_EOL;
+ echo ' -w Fix both warnings and errors (on by default)'.PHP_EOL;
+ echo ' -l Local directory only, no recursion'.PHP_EOL;
+ echo ' -p Show progress of the run'.PHP_EOL;
+ echo ' -q Quiet mode; disables progress and verbose output'.PHP_EOL;
+ echo ' -v Print processed files'.PHP_EOL;
+ echo ' -vv Print ruleset and token output'.PHP_EOL;
+ echo ' -vvv Print sniff processing information'.PHP_EOL;
+ echo ' -i Show a list of installed coding standards'.PHP_EOL;
+ echo ' -d Set the [key] php.ini value to [value] or [true] if value is omitted'.PHP_EOL;
+ echo PHP_EOL;
+ echo ' --help Print this help message'.PHP_EOL;
+ echo ' --version Print version information'.PHP_EOL;
+ echo ' --ignore-annotations Ignore all phpcs: annotations in code comments'.PHP_EOL;
+ echo PHP_EOL;
+ echo ' A path to strip from the front of file paths inside reports'.PHP_EOL;
+ echo ' A comma separated list of files to run before processing begins'.PHP_EOL;
+ echo ' The encoding of the files being fixed (default is utf-8)'.PHP_EOL;
+ echo ' A comma separated list of file extensions to fix'.PHP_EOL;
+ echo ' The type of the file can be specified using: ext/type'.PHP_EOL;
+ echo ' e.g., module/php,es/js'.PHP_EOL;
+ echo ' One or more files and/or directories to fix'.PHP_EOL;
+ echo ' A file containing a list of files and/or directories to fix (one per line)'.PHP_EOL;
+ echo ' Use either the "GitModified" or "GitStaged" filter,'.PHP_EOL;
+ echo ' or specify the path to a custom filter class'.PHP_EOL;
+ echo ' A comma separated list of patterns to ignore files and directories'.PHP_EOL;
+ echo ' How many files should be fixed simultaneously (default is 1)'.PHP_EOL;
+ echo ' The minimum severity required to fix an error or warning'.PHP_EOL;
+ echo ' A comma separated list of sniff codes to include or exclude from fixing'.PHP_EOL;
+ echo ' (all sniffs must be part of the specified standard)'.PHP_EOL;
+ echo '