Skip to content

Commit

Permalink
Fix CS/WS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Oct 28, 2019
1 parent 5f61126 commit bf0010f
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/Util/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,23 @@ private static function shouldPrintFrame($frame, $prefix, Blacklist $blacklist):
$fileIsNotPrefixed = $prefix === false || \strpos($file, $prefix) !== 0;
$script = \realpath($GLOBALS['_SERVER']['SCRIPT_NAME']);

return \is_file($file)
&& self::fileIsBlacklisted($file, $blacklist)
&& $fileIsNotPrefixed
&& $file !== $script;
return \is_file($file) &&
self::fileIsBlacklisted($file, $blacklist) &&
$fileIsNotPrefixed &&
$file !== $script;
}

private static function fileIsBlacklisted($file, Blacklist $blacklist)
private static function fileIsBlacklisted($file, Blacklist $blacklist): bool
{
return (
empty($GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'])
|| !\in_array($file, $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'])
)
&& !$blacklist->isBlacklisted($file);
return (empty($GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST']) ||
!\in_array($file, $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'], true)) &&
!$blacklist->isBlacklisted($file);
}

private static function frameExists(array $trace, string $file, int $line): bool
{
foreach ($trace as $frame) {
if (isset($frame['file']) && $frame['file'] === $file &&
isset($frame['line']) && $frame['line'] === $line) {
if (isset($frame['file'], $frame['line']) && $frame['file'] === $file && $frame['line'] === $line) {
return true;
}
}
Expand Down

0 comments on commit bf0010f

Please sign in to comment.