Skip to content

Commit 6343f27

Browse files
authored
chore: upgrade PHP CS Fixer (#24)
1 parent db3feb2 commit 6343f27

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

dev-tools/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"ergebnis/composer-normalize": "*",
77
"maglnet/composer-require-checker": "^3.8",
88
"mi-schi/phpmd-extension": "^4.3",
9-
"php-cs-fixer/shim": "^3.49.0",
10-
"phpmd/phpmd": "^2.13"
9+
"php-cs-fixer/shim": "^3.68.5",
10+
"phpmd/phpmd": "^2.15"
1111
},
1212
"config": {
1313
"allow-plugins": {

src/Constraint/XmlMatchesXsdForV5.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ public function toString()
5959
protected function failureDescription($other)
6060
{
6161
if (\is_string($other)) {
62-
return sprintf("%s %s.\n%s", $other, $this->toString(), implode("\n", $this->xmlConstraintErrors));
62+
return \sprintf("%s %s.\n%s", $other, $this->toString(), implode("\n", $this->xmlConstraintErrors));
6363
}
6464

6565
if (\is_object($other)) {
66-
$type = sprintf('%s#%s', \get_class($other), method_exists($other, '__toString') ? $other->__toString() : '');
66+
$type = \sprintf('%s#%s', \get_class($other), method_exists($other, '__toString') ? $other->__toString() : '');
6767
} elseif (null === $other) {
6868
$type = 'null';
6969
} else {
@@ -129,7 +129,7 @@ private function setXMLConstraintErrors()
129129
$level = '';
130130
}
131131

132-
$this->xmlConstraintErrors[] = sprintf('[%s%s] %s (line %d, column %d).', $level, $error->code, trim($error->message), $error->line, $error->column);
132+
$this->xmlConstraintErrors[] = \sprintf('[%s%s] %s (line %d, column %d).', $level, $error->code, trim($error->message), $error->line, $error->column);
133133
}
134134
}
135135
}

src/Constraint/XmlMatchesXsdForV7.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ public function toString(): string
5555
protected function failureDescription($other): string
5656
{
5757
if (\is_string($other)) {
58-
return sprintf("%s %s.\n%s", $other, $this->toString(), implode("\n", $this->xmlConstraintErrors));
58+
return \sprintf("%s %s.\n%s", $other, $this->toString(), implode("\n", $this->xmlConstraintErrors));
5959
}
6060

6161
if (\is_object($other)) {
62-
$type = sprintf('%s#%s', \get_class($other), method_exists($other, '__toString') ? $other->__toString() : '');
62+
$type = \sprintf('%s#%s', \get_class($other), method_exists($other, '__toString') ? $other->__toString() : '');
6363
} elseif (null === $other) {
6464
$type = 'null';
6565
} else {
@@ -125,7 +125,7 @@ private function setXMLConstraintErrors()
125125
$level = '';
126126
}
127127

128-
$this->xmlConstraintErrors[] = sprintf('[%s%s] %s (line %d, column %d).', $level, $error->code, trim($error->message), $error->line, $error->column);
128+
$this->xmlConstraintErrors[] = \sprintf('[%s%s] %s (line %d, column %d).', $level, $error->code, trim($error->message), $error->line, $error->column);
129129
}
130130
}
131131
}

src/Constraint/XmlMatchesXsdForV8.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ public function toString(): string
5353
protected function failureDescription($other): string
5454
{
5555
if (\is_string($other)) {
56-
return sprintf("%s %s.\n%s", $other, $this->toString(), implode("\n", $this->xmlConstraintErrors));
56+
return \sprintf("%s %s.\n%s", $other, $this->toString(), implode("\n", $this->xmlConstraintErrors));
5757
}
5858

5959
if (\is_object($other)) {
60-
$type = sprintf('%s#%s', \get_class($other), method_exists($other, '__toString') ? $other->__toString() : '');
60+
$type = \sprintf('%s#%s', \get_class($other), method_exists($other, '__toString') ? $other->__toString() : '');
6161
} elseif (null === $other) {
6262
$type = 'null';
6363
} else {
@@ -123,7 +123,7 @@ private function setXMLConstraintErrors()
123123
$level = '';
124124
}
125125

126-
$this->xmlConstraintErrors[] = sprintf('[%s%s] %s (line %d, column %d).', $level, $error->code, trim($error->message), $error->line, $error->column);
126+
$this->xmlConstraintErrors[] = \sprintf('[%s%s] %s (line %d, column %d).', $level, $error->code, trim($error->message), $error->line, $error->column);
127127
}
128128
}
129129
}

tests/Constraint/XmlMatchesXsdTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testAssertXMLMatchesXSD()
3131
if (false === $content) {
3232
$error = error_get_last();
3333

34-
throw new \RuntimeException(sprintf(
34+
throw new \RuntimeException(\sprintf(
3535
'Failed to read content of the sample file "%s".%s',
3636
$content,
3737
$error ? ' '.$error['message'] : ''

0 commit comments

Comments
 (0)