Skip to content

Commit

Permalink
Feature/new php cs fixer (#155)
Browse files Browse the repository at this point in the history
* Applied a bunch of new linting rules. Small changes.

* Implemented a few more PHP CS Fixer changes.
  • Loading branch information
skyzyx committed May 3, 2019
1 parent 0c2f2c1 commit 4d87078
Show file tree
Hide file tree
Showing 124 changed files with 3,514 additions and 3,526 deletions.
342 changes: 226 additions & 116 deletions .php_cs.dist

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .phpunit.result.cache

This file was deleted.

4 changes: 2 additions & 2 deletions src/Configuration/SetLoggerInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4,470 changes: 2,234 additions & 2,236 deletions src/Dictionary/Entity.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Enum/AbstractEnum.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Enum/CharacterSet.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Enum/DateFormat.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Enum/EnumInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Enum/ErrorMessage.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Enum/FeedType.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Enum/Serialization.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/ConfigurationException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/ContainerException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/MiddlewareException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/NotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/SimplePieException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
12 changes: 4 additions & 8 deletions src/HandlerStack.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down Expand Up @@ -171,8 +171,6 @@ public function registerNamespaces(Ns $ns): void

/**
* Returns information about the HandlerStack that is useful for debugging.
*
* @return array
*/
public function debugStack(): array
{
Expand Down Expand Up @@ -212,8 +210,8 @@ public function debugStack(): array
*/
protected function validateMiddleware(
callable $middleware,
?string $name = null,
?string $overrideType = null,
?string $name,
?string $overrideType,
callable $fn
): void {
// @phpcs:enable
Expand Down Expand Up @@ -253,8 +251,6 @@ protected function logRegistration(callable $middleware, ?string $name = null):
*
* @param callable $middleware The middleware to add to the stack.
* @param string|null $name A name for the middleware. Can be used with `pushBefore()` and `pushAfter()`.
*
* @return string
*/
protected function exceptionMessage(callable $middleware, ?string $name = null): string
{
Expand Down
12 changes: 2 additions & 10 deletions src/HandlerStackInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down Expand Up @@ -36,8 +36,6 @@ interface HandlerStackInterface extends C\SetLoggerInterface
* will be thrown.
*
* @throws MiddlewareException
*
* @return self
*/
public function append(callable $middleware, ?string $name = null, ?string $overrideType = null): self;

Expand All @@ -54,8 +52,6 @@ public function append(callable $middleware, ?string $name = null, ?string $over
* @param string|null $name A name for the middleware. Can be used with `pushBefore()` and `pushAfter()`.
*
* @throws MiddlewareException
*
* @return self
*/
public function appendClosure(string $overrideType, callable $middleware, ?string $name = null): self;

Expand All @@ -72,8 +68,6 @@ public function appendClosure(string $overrideType, callable $middleware, ?strin
* will be thrown.
*
* @throws MiddlewareException
*
* @return self
*/
public function prepend(callable $middleware, ?string $name = null, ?string $overrideType = null): self;

Expand All @@ -90,8 +84,6 @@ public function prepend(callable $middleware, ?string $name = null, ?string $ove
* @param string|null $name A name for the middleware. Can be used with `pushBefore()` and `pushAfter()`.
*
* @throws MiddlewareException
*
* @return self
*/
public function prependClosure(string $overrideType, callable $middleware, ?string $name = null): self;

Expand Down
6 changes: 2 additions & 4 deletions src/Middleware/AbstractMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down Expand Up @@ -68,8 +68,6 @@ public function addArrayProperty(&$object, string $property): void
* @param array $arr The associative array to check.
* @param string $key The key in the associative array to return the value for.
* @param mixed $default The default value to return if there is no value. The default value is `null`.
*
* @return mixed
*/
public function get(array $arr, string $key, $default = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware/Html/HtmlInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware/Json/JsonInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware/MiddlewareInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
8 changes: 2 additions & 6 deletions src/Middleware/Xml/AbstractXmlMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down Expand Up @@ -34,8 +34,6 @@ abstract class AbstractXmlMiddleware extends AbstractMiddleware
* @param bool $makeInsensitive Whether or not the handling should be made case-insensitive. A value of `true`
* means that the handling should be case-insensitive. A value of `false` means that
* the handling should be case-sensitive. The default value is `true`.
*
* @return self
*/
public function setCaseInsensitive(bool $makeInsensitive = true): self
{
Expand All @@ -51,8 +49,6 @@ public function setCaseInsensitive(bool $makeInsensitive = true): self
*
* @param string $query An XPath query where `%s` is used in-place of the XML namespace alias.
* @param string $namespaceAlias The XML namespace alias to apply.
*
* @return string
*/
public function applyNsToQuery(string $query, string $namespaceAlias): string
{
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware/Xml/Atom.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down
6 changes: 2 additions & 4 deletions src/Middleware/Xml/XmlInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down Expand Up @@ -40,8 +40,6 @@ public function __invoke(stdClass $feedRoot, string $namespaceAlias, DOMXPath $x
* 'http://www.w3.org/2005/Atom' => 'atom10'
* ];
* ```
*
* @return array
*/
public function getSupportedNamespaces(): array;
}
8 changes: 2 additions & 6 deletions src/Mixin/DateTrait.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand Down Expand Up @@ -36,8 +36,6 @@ trait DateTrait
*
* @param string $createFromFormat The format of the datestamp in the feed.
*
* @return self
*
* @see http://php.net/manual/en/datetime.createfromformat.php
*/
public function setDateFormat(string $createFromFormat): self
Expand All @@ -59,8 +57,6 @@ public function setDateFormat(string $createFromFormat): self
*
* @param string $timezone The timezone identifier to use. Must be compatible with `DateTimeZone`. The default
* value is `UTC`.
*
* @return self
*/
public function setOutputTimezone(string $timezone = 'UTC'): self
{
Expand Down
11 changes: 2 additions & 9 deletions src/Mixin/DeepTypeTrait.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright (c) 2017–2018 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2018 Contributors.
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
Expand All @@ -10,7 +10,6 @@

namespace SimplePie\Mixin;

use SimplePie\Configuration as C;
use SimplePie\Type\Node;
use SimplePie\Type\TypeInterface;
use Skyzyx\UtilityPack\Types;
Expand All @@ -36,8 +35,6 @@ trait DeepTypeTrait
* looking at the response from `getRoot()`.
* @param string|null $namespaceAlias The XML namespace alias to apply.
*
* @return Node
*
* @phpcs:disable Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine
*/
protected function getScalarSingleValue(
Expand Down Expand Up @@ -66,8 +63,6 @@ protected function getScalarSingleValue(
* @param string $className The class name to instantiate when there is not a defined value.
* @param string|null $namespaceAlias The XML namespace alias to apply.
*
* @return TypeInterface
*
* @phpcs:disable Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine
*/
protected function getComplexSingleValue(
Expand Down Expand Up @@ -96,8 +91,6 @@ protected function getComplexSingleValue(
* looking at the response from `getRoot()`.
* @param string|null $namespaceAlias The XML namespace alias to apply.
*
* @return iterable
*
* @phpcs:disable Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine
*/
protected function getComplexMultipleValues(
Expand Down
Loading

0 comments on commit 4d87078

Please sign in to comment.