Skip to content

Commit

Permalink
Update coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Nov 18, 2019
1 parent f201d0c commit 325f48d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"nette/application": "~3.0.0",
"nette/di": "~3.0.0",
"ninjify/nunjuck": "^0.3.0",
"ninjify/qa": "^0.8.0",
"ninjify/qa": "^0.10.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-deprecation-rules": "^0.11",
"phpstan/phpstan-nette": "^0.11",
Expand Down
2 changes: 2 additions & 0 deletions src/Filters/EmailFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public static function protect(string $address, ?string $encode = null, ?string
if (!empty($match[2])) {
throw new InvalidArgumentException('mailto: hex encoding does not work with extra attributes. Try javascript.');
}

$address_encode = '';
for ($x = 0, $_length = strlen($address); $x < $_length; $x++) {
if (preg_match('!\w!u', $address[$x])) {
Expand All @@ -72,6 +73,7 @@ public static function protect(string $address, ?string $encode = null, ?string
$address_encode .= $address[$x];
}
}

$text_encode = '';
for ($x = 0, $_length = strlen($_text); $x < $_length; $x++) {
$text_encode .= '&#x' . bin2hex($_text[$x]) . ';';
Expand Down
1 change: 1 addition & 0 deletions src/Formatters/NumberFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public function format($value, ?int $decimals = null)
if ($this->strict) {
throw new InvalidArgumentException('Value must be numeric');
}

return $value;
}

Expand Down

0 comments on commit 325f48d

Please sign in to comment.