Skip to content

Commit 2730ed9

Browse files
committed
used ::class
1 parent ff6d693 commit 2730ed9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Framework/Dumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public static function dumpException(\Throwable $e): string
314314
if ($e instanceof AssertException && $item['file'] === __DIR__ . DIRECTORY_SEPARATOR . 'Assert.php') {
315315
continue;
316316
}
317-
$line = $item['class'] === 'Tester\Assert' && method_exists($item['class'], $item['function'])
317+
$line = $item['class'] === Assert::class && method_exists($item['class'], $item['function'])
318318
&& strpos($tmp = file($item['file'])[$item['line'] - 1], "::$item[function](") ? $tmp : null;
319319

320320
$s .= 'in '

src/Framework/Environment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public static function setup(): void
4949
self::setupColors();
5050
self::$obLevel = ob_get_level();
5151

52-
class_exists('Tester\Runner\Job');
53-
class_exists('Tester\Dumper');
54-
class_exists('Tester\Assert');
52+
class_exists(Runner\Job::class);
53+
class_exists(Dumper::class);
54+
class_exists(Assert::class);
5555

5656
$annotations = self::getTestAnnotations();
5757
self::$checkAssertions = !isset($annotations['outputmatch']) && !isset($annotations['outputmatchfile']);

src/Runner/PhpInterpreter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(string $path, array $args = [])
4848
$output = stream_get_contents($pipes[1]);
4949
proc_close($proc);
5050

51-
$args = ' ' . implode(' ', array_map(['Tester\Helpers', 'escapeArg'], $args));
51+
$args = ' ' . implode(' ', array_map([Helpers::class, 'escapeArg'], $args));
5252
if (strpos($output, 'phpdbg') !== false) {
5353
$args = ' -qrrb -S cli' . $args;
5454
}

0 commit comments

Comments
 (0)