From db8f6c9ca0d5cba1b1568c50d2b56c0f061bde41 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Sat, 28 Jul 2018 11:14:07 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- src/Filter.php | 2 +- src/Lexer.php | 2 +- src/Parser.php | 4 ++-- src/RuleBuilder.php | 2 +- src/Rules/Date.php | 2 +- src/Rules/DateCompare.php | 2 +- src/Rules/Email.php | 2 +- src/Rules/Escape.php | 2 +- src/Rules/Number.php | 2 +- src/Rules/NumberCompare.php | 2 +- src/Rules/NumberInterval.php | 4 ++-- src/Rules/Regex.php | 2 +- src/Rules/Required.php | 4 ++-- src/Rules/Str.php | 2 +- src/Rules/StringLenCompare.php | 2 +- src/RulesHelper/AbstractDate.php | 4 ++-- src/RulesHelper/AbstractNumber.php | 4 ++-- src/RulesHelper/AbstractString.php | 2 +- src/RulesHelper/RuleInterface.php | 2 +- src/RulesHelper/RuleSanitizeInterface.php | 2 +- src/RulesHelper/RuleValidateInterface.php | 2 +- 21 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Filter.php b/src/Filter.php index 25f632c..c4b29aa 100644 --- a/src/Filter.php +++ b/src/Filter.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter; diff --git a/src/Lexer.php b/src/Lexer.php index 6d5df8e..7083adb 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter; diff --git a/src/Parser.php b/src/Parser.php index ec8624e..b0648c4 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter; @@ -104,7 +104,7 @@ private function applyTypesToParams(array &$words): void $types = $rules[$word[0]]['args_type']; foreach ($types as $key => $type) { - $param = &$word[$key+1]; + $param = &$word[$key + 1]; if ($type === 'number') { $number->sanitize($param); diff --git a/src/RuleBuilder.php b/src/RuleBuilder.php index ad4df7d..e39ffac 100644 --- a/src/RuleBuilder.php +++ b/src/RuleBuilder.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter; diff --git a/src/Rules/Date.php b/src/Rules/Date.php index ffd1445..0a1b046 100644 --- a/src/Rules/Date.php +++ b/src/Rules/Date.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/DateCompare.php b/src/Rules/DateCompare.php index 42c8ca4..3ed3eed 100644 --- a/src/Rules/DateCompare.php +++ b/src/Rules/DateCompare.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/Email.php b/src/Rules/Email.php index ccc3d48..78c77a9 100644 --- a/src/Rules/Email.php +++ b/src/Rules/Email.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/Escape.php b/src/Rules/Escape.php index 8247395..cb48005 100644 --- a/src/Rules/Escape.php +++ b/src/Rules/Escape.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/Number.php b/src/Rules/Number.php index 73eac89..7f4d07e 100644 --- a/src/Rules/Number.php +++ b/src/Rules/Number.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/NumberCompare.php b/src/Rules/NumberCompare.php index af8885d..aa4d510 100644 --- a/src/Rules/NumberCompare.php +++ b/src/Rules/NumberCompare.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/NumberInterval.php b/src/Rules/NumberInterval.php index 211ae7b..f28ad87 100644 --- a/src/Rules/NumberInterval.php +++ b/src/Rules/NumberInterval.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; @@ -107,7 +107,7 @@ private function switchOperator(string $operator, &$numberReceived, &$min, &$max case '<>': //outside interval exclusive return $numberReceived < $min || $numberReceived > $max; case '<=>': //outside interval inclusive - return $numberReceived <= $min || $numberReceived >= $max;; + return $numberReceived <= $min || $numberReceived >= $max; ; default: throw new UnexpectedValueException("Unknown comparson operator ({$operator}). Permitted ><, <>, >=<, <=>"); } diff --git a/src/Rules/Regex.php b/src/Rules/Regex.php index b43b053..da6c770 100644 --- a/src/Rules/Regex.php +++ b/src/Rules/Regex.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/Required.php b/src/Rules/Required.php index 75946e0..490f576 100644 --- a/src/Rules/Required.php +++ b/src/Rules/Required.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; @@ -61,7 +61,7 @@ private function concreteValidate($received): bool return true; } - if (!strlen((string)$received)) { + if (!strlen((string) $received)) { $this->message = "Received value is a void string"; return true; } diff --git a/src/Rules/Str.php b/src/Rules/Str.php index f9d0a4a..3409c68 100644 --- a/src/Rules/Str.php +++ b/src/Rules/Str.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/Rules/StringLenCompare.php b/src/Rules/StringLenCompare.php index 2ad764a..4ba4823 100644 --- a/src/Rules/StringLenCompare.php +++ b/src/Rules/StringLenCompare.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/RulesHelper/AbstractDate.php b/src/RulesHelper/AbstractDate.php index 6654f16..3782d93 100644 --- a/src/RulesHelper/AbstractDate.php +++ b/src/RulesHelper/AbstractDate.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; @@ -24,7 +24,7 @@ class AbstractDate */ protected function dateHaveNoTime(string $format): bool { - foreach (['a','A','B','g','G','h','H','i','s','u','v'] as $char) { + foreach (['a', 'A', 'B', 'g', 'G', 'h', 'H', 'i', 's', 'u', 'v'] as $char) { if (strpos($format, $char) !== false) { return false; } diff --git a/src/RulesHelper/AbstractNumber.php b/src/RulesHelper/AbstractNumber.php index f2639de..864e599 100644 --- a/src/RulesHelper/AbstractNumber.php +++ b/src/RulesHelper/AbstractNumber.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; @@ -25,7 +25,7 @@ public function sanitize(&$value): void { settype($value, 'float'); - if (fmod((float)$value, 1.0) === 0.0) { + if (fmod((float) $value, 1.0) === 0.0) { settype($value, 'integer'); } } diff --git a/src/RulesHelper/AbstractString.php b/src/RulesHelper/AbstractString.php index 1a2d304..c1dfb9a 100644 --- a/src/RulesHelper/AbstractString.php +++ b/src/RulesHelper/AbstractString.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/RulesHelper/RuleInterface.php b/src/RulesHelper/RuleInterface.php index a5b716d..87f70bc 100644 --- a/src/RulesHelper/RuleInterface.php +++ b/src/RulesHelper/RuleInterface.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/RulesHelper/RuleSanitizeInterface.php b/src/RulesHelper/RuleSanitizeInterface.php index 8ec3f41..e57d021 100644 --- a/src/RulesHelper/RuleSanitizeInterface.php +++ b/src/RulesHelper/RuleSanitizeInterface.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules; diff --git a/src/RulesHelper/RuleValidateInterface.php b/src/RulesHelper/RuleValidateInterface.php index c9ca7ea..8c440bb 100644 --- a/src/RulesHelper/RuleValidateInterface.php +++ b/src/RulesHelper/RuleValidateInterface.php @@ -7,7 +7,7 @@ * @copyright (c) 2018, Sebastian Rapetti * @license http://opensource.org/licenses/MIT MIT License */ -declare(strict_types = 1); +declare(strict_types=1); namespace Linna\Filter\Rules;