Skip to content

Commit

Permalink
Fix code standard
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam committed Feb 13, 2018
1 parent 4e43d56 commit 8c03ad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Framework/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ public static function dumpException($e)
return $s;
}


/**
* @param AssertException $assertException
* @param string $testFile
Expand All @@ -337,7 +338,7 @@ public static function storeAssertDiff(AssertException $assertException, $testFi
for ($i = 0; $i < strlen($actual) && isset($expected[$i]) && $actual[$i] === $expected[$i]; $i++) ;
for (; $i && $i < strlen($actual) && $actual[$i - 1] >= "\x80" && $actual[$i] >= "\x80" && $actual[$i] < "\xC0"; $i--) ;
$i = max(0, min(
$i - (int)(self::$maxLength / 3), // try to display 1/3 of shorter string
$i - (int) (self::$maxLength / 3), // try to display 1/3 of shorter string
max(strlen($actual), strlen($expected)) - self::$maxLength + 3 // 3 = length of ...
));
if ($i) {
Expand All @@ -352,8 +353,7 @@ public static function storeAssertDiff(AssertException $assertException, $testFi
) {
if (($delta = strlen($m[1]) - strlen($m[3])) >= 3) {
$message = "$m[1]$m[2]\n" . str_repeat(' ', $delta - 3) . "...$m[3]$m[4]";
}
else {
} else {
$message = "$m[1]$m[2]$m[3]\n" . str_repeat(' ', strlen($m[1]) - 4) . "... $m[4]";
}
}
Expand All @@ -364,6 +364,7 @@ public static function storeAssertDiff(AssertException $assertException, $testFi
]);
}


/**
* Dumps data to folder 'output'.
* @return string
Expand Down
1 change: 0 additions & 1 deletion src/Runner/OutputHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace Tester\Runner;

use Tester;


/**
Expand Down

0 comments on commit 8c03ad6

Please sign in to comment.