Skip to content

Commit ea918ea

Browse files
committed
cs
1 parent 54c6db4 commit ea918ea

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

src/CodeCoverage/Generators/AbstractGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function getSourceIterator(): \Iterator
107107
return new \CallbackFilterIterator(
108108
$iterator,
109109
fn(\SplFileInfo $file): bool => $file->getBasename()[0] !== '.' // . or .. or .gitignore
110-
&& in_array($file->getExtension(), $this->acceptFiles, true)
110+
&& in_array($file->getExtension(), $this->acceptFiles, true),
111111
);
112112
}
113113

src/Framework/Assert.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Assert
3636
'%f%' => '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', // floating point number
3737
'%h%' => '[0-9a-fA-F]+', // one or more HEX digits
3838
'%w%' => '[0-9a-zA-Z_]+', //one or more alphanumeric characters
39-
'%ds%' => '[\\\\/]', // directory separator
39+
'%ds%' => '[\\\/]', // directory separator
4040
'%(\[.+\][+*?{},\d]*)%' => '$1', // range
4141
];
4242

@@ -517,7 +517,7 @@ public static function isMatching(string $pattern, string $actual, bool $strict
517517
$utf8 = preg_match('#\x80-\x{10FFFF}]#u', $pattern) ? 'u' : '';
518518
$suffix = ($strict ? '$#DsU' : '\s*$#sU') . $utf8;
519519
$patterns = static::$patterns + [
520-
'[.\\\\+*?[^$(){|\#]' => '\$0', // preg quoting
520+
'[.\\\+*?[^$(){|\#]' => '\$0', // preg quoting
521521
'\x00' => '\x00',
522522
'[\t ]*\r?\n' => '[\t ]*\r?\n', // right trim
523523
];

src/Framework/Dumper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ private static function encodeStringPhp(string $s): string
237237
];
238238
$utf8 = preg_match('##u', $s);
239239
$escaped = preg_replace_callback(
240-
$utf8 ? '#[\p{C}\\\\]#u' : '#[\x00-\x1F\x7F-\xFF\\\\]#',
240+
$utf8 ? '#[\p{C}\\\]#u' : '#[\x00-\x1F\x7F-\xFF\\\]#',
241241
fn($m) => $special[$m[0]] ?? (strlen($m[0]) === 1
242242
? '\x' . str_pad(strtoupper(dechex(ord($m[0]))), 2, '0', STR_PAD_LEFT) . ''
243243
: '\u{' . strtoupper(ltrim(dechex(self::utf8Ord($m[0])), '0')) . '}'),
244244
$s,
245245
);
246246
return $s === str_replace('\\\\', '\\', $escaped)
247-
? "'" . preg_replace('#\'|\\\\(?=[\'\\\\]|$)#D', '\\\\$0', $s) . "'"
247+
? "'" . preg_replace('#\'|\\\(?=[\'\\\]|$)#D', '\\\$0', $s) . "'"
248248
: '"' . addcslashes($escaped, '"$') . '"';
249249
}
250250

@@ -255,7 +255,7 @@ private static function encodeStringLine(string $s): string
255255
"\r" => "\\r\r",
256256
"\n" => "\\n\n",
257257
"\t" => "\\t\t",
258-
"\e" => '\\e',
258+
"\e" => '\e',
259259
"'" => "'",
260260
];
261261
$utf8 = preg_match('##u', $s);

src/Framework/Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Helpers
2020
*/
2121
public static function purge(string $dir): void
2222
{
23-
if (preg_match('#^(\w:)?[/\\\\]?$#', $dir)) {
23+
if (preg_match('#^(\w:)?[/\\\]?$#', $dir)) {
2424
throw new \InvalidArgumentException('Directory must not be an empty string or root path.');
2525
}
2626

src/Runner/Runner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function run(): bool
9191
if ($this->tempDir) {
9292
usort(
9393
$this->jobs,
94-
fn(Job $a, Job $b): int => $this->getLastResult($a->getTest()) - $this->getLastResult($b->getTest())
94+
fn(Job $a, Job $b): int => $this->getLastResult($a->getTest()) - $this->getLastResult($b->getTest()),
9595
);
9696
}
9797

tests/Framework/Assert.match.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ $matches = [
4040
['%f%', '-1e5'],
4141
['%h%', 'aBcDeF01'],
4242
['%w%', 'aBzZ_01'],
43-
['%ds%%ds%', '\\/'],
43+
['%ds%%ds%', '\/'],
4444
['%[a-c]+%', 'abc'],
4545
['%[]%', '%[]%'],
46-
['.\\+*?[^]$(){}=!<>|:-#', '.\\+*?[^]$(){}=!<>|:-#'],
46+
['.\+*?[^]$(){}=!<>|:-#', '.\+*?[^]$(){}=!<>|:-#'],
4747
['~\d+~', '123'],
4848
['#\d+#', '123'],
4949
];

tests/Framework/Dumper.toPhp.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Assert::match('0.1', Dumper::toPhp(0.1));
2828
Assert::match("''", Dumper::toPhp(''));
2929
Assert::match("' '", Dumper::toPhp(' '));
3030
Assert::match("'0'", Dumper::toPhp('0'));
31-
Assert::match('"\\x00"', Dumper::toPhp("\x00"));
31+
Assert::match('"\x00"', Dumper::toPhp("\x00"));
3232
Assert::match('"\u{FEFF}"', Dumper::toPhp("\xEF\xBB\xBF")); // BOM
3333
Assert::match("' '", Dumper::toPhp("\t"));
34-
Assert::match('"\\xFF"', Dumper::toPhp("\xFF"));
34+
Assert::match('"\xFF"', Dumper::toPhp("\xFF"));
3535
Assert::match('"multi\nline"', Dumper::toPhp("multi\nline"));
3636
Assert::match("'Iñtërnâtiônàlizætiøn'", Dumper::toPhp("I\xc3\xb1t\xc3\xabrn\xc3\xa2ti\xc3\xb4n\xc3\xa0liz\xc3\xa6ti\xc3\xb8n"));
3737
Assert::match(
@@ -48,8 +48,8 @@ Assert::match(
4848
);
4949

5050
Assert::match('\'$"\\\\\'', Dumper::toPhp('$"\\'));
51-
Assert::match('\'$"\\ \x00\'', Dumper::toPhp('$"\\ \x00'));
52-
Assert::match('"\\$\\"\\\\ \x00"', Dumper::toPhp("$\"\\ \x00"));
51+
Assert::match('\'$"\ \x00\'', Dumper::toPhp('$"\ \x00'));
52+
Assert::match('"\$\"\\\ \x00"', Dumper::toPhp("$\"\\ \x00"));
5353

5454
Assert::match('/* resource stream */', Dumper::toPhp(fopen(__FILE__, 'r')));
5555
Assert::match('(object) /* #%a% */ []', Dumper::toPhp((object) null));

tests/Framework/TestCase.annotationThrows.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class MyTest extends Tester\TestCase
9696

9797

9898
/**
99-
* @dataprovider dataProvider
99+
* @dataProvider dataProvider
100100
* @throws Exception
101101
*/
102102
public function testThrowsWithDataprovider($x)

0 commit comments

Comments
 (0)