Skip to content

Commit

Permalink
Merge pull request #1 from linna/scrutinizer-patch-1
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
s3b4stian authored Jul 28, 2018
2 parents 0294eaa + db8f6c9 commit 26f2ebb
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/RuleBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/DateCompare.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Escape.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/NumberCompare.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Rules/NumberInterval.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 ><, <>, >=<, <=>");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Regex.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Rules/Required.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Rules/StringLenCompare.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/RulesHelper/AbstractDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/RulesHelper/AbstractNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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');
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/RulesHelper/AbstractString.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/RulesHelper/RuleInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/RulesHelper/RuleSanitizeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/RulesHelper/RuleValidateInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 26f2ebb

Please sign in to comment.