Skip to content

Commit

Permalink
Change Xdebug filter script template to follow code conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianheuer authored and sebastianbergmann committed Sep 8, 2018
1 parent 0a842c6 commit 2918e4f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/Util/XDebugFilterScriptGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public function generate(array $filterData, array $whitelistedFiles): string
$files = \implode(",\n", $files);

return <<<EOF
<?php
<?php declare(strict_types=1);
if (!\\function_exists('xdebug_set_filter')) {
return;
}
xdebug_set_filter(
XDEBUG_FILTER_CODE_COVERAGE,
XDEBUG_PATH_WHITELIST,
\\xdebug_set_filter(
\\XDEBUG_FILTER_CODE_COVERAGE,
\\XDEBUG_PATH_WHITELIST,
[
$files
]
Expand Down
8 changes: 4 additions & 4 deletions tests/end-to-end/dump-xdebug-filter.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ require __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
<?php
<?php declare(strict_types=1);
if (!\function_exists('xdebug_set_filter')) {
return;
}

xdebug_set_filter(
XDEBUG_FILTER_CODE_COVERAGE,
XDEBUG_PATH_WHITELIST,
\xdebug_set_filter(
\XDEBUG_FILTER_CODE_COVERAGE,
\XDEBUG_PATH_WHITELIST,
[
%s
]
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/Util/_files/expectedXDebugFilterScript.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
<?php declare(strict_types=1);
if (!\function_exists('xdebug_set_filter')) {
return;
}

xdebug_set_filter(
XDEBUG_FILTER_CODE_COVERAGE,
XDEBUG_PATH_WHITELIST,
\xdebug_set_filter(
\XDEBUG_FILTER_CODE_COVERAGE,
\XDEBUG_PATH_WHITELIST,
[
'src/somePath',
'src/foo.php',
Expand Down

0 comments on commit 2918e4f

Please sign in to comment.