Skip to content

Commit 8e9bb30

Browse files
CS fixes
1 parent f66d658 commit 8e9bb30

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

HtmlSanitizerConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ public function withoutAttributeSanitizer(AttributeSanitizerInterface $sanitizer
412412
public function withMaxInputLength(int $maxInputLength): static
413413
{
414414
if ($maxInputLength < -1) {
415-
throw new \InvalidArgumentException(sprintf('The maximum input length must be greater than -1, "%d" given.', $maxInputLength));
415+
throw new \InvalidArgumentException(\sprintf('The maximum input length must be greater than -1, "%d" given.', $maxInputLength));
416416
}
417417

418418
$clone = clone $this;

Tests/HtmlSanitizerConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public function testWithWithoutAttributeSanitizer()
269269
{
270270
$config = new HtmlSanitizerConfig();
271271

272-
$sanitizer = new class() implements AttributeSanitizerInterface {
272+
$sanitizer = new class implements AttributeSanitizerInterface {
273273
public function getSupportedElements(): ?array
274274
{
275275
return null;

Tests/HtmlSanitizerCustomTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ public function testCustomAttributeSanitizer()
397397
{
398398
$config = (new HtmlSanitizerConfig())
399399
->allowElement('div', ['data-attr'])
400-
->withAttributeSanitizer(new class() implements AttributeSanitizerInterface {
400+
->withAttributeSanitizer(new class implements AttributeSanitizerInterface {
401401
public function getSupportedElements(): ?array
402402
{
403403
return ['div'];

TextSanitizer/UrlSanitizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private static function matchAllowedHostParts(array $uriParts, array $trustedPar
136136
{
137137
// Check each chunk of the domain is valid
138138
foreach ($trustedParts as $key => $trustedPart) {
139-
if (!array_key_exists($key, $uriParts) || $uriParts[$key] !== $trustedPart) {
139+
if (!\array_key_exists($key, $uriParts) || $uriParts[$key] !== $trustedPart) {
140140
return false;
141141
}
142142
}

0 commit comments

Comments
 (0)