|
@@ -26,7 +26,7 @@ discard block |
|
|
block discarded – undo |
|
26
|
26
|
*/ |
|
27
|
27
|
public function __construct(?callable $uniquenessFunction = null) |
|
28
|
28
|
{ |
|
29
|
|
- $this->uniquenessFunction = $uniquenessFunction ?? function (string $nonUniqueThing) : string { |
|
|
29
|
+ $this->uniquenessFunction = $uniquenessFunction ?? function(string $nonUniqueThing) : string { |
|
30
|
30
|
return uniqid($nonUniqueThing, true); |
|
31
|
31
|
}; |
|
32
|
32
|
} |
|
@@ -60,7 +60,7 @@ discard block |
|
|
block discarded – undo |
|
60
|
60
|
private function generateTemporaryPathFor(Revision $revision) : string |
|
61
|
61
|
{ |
|
62
|
62
|
$uniquePathGenerator = $this->uniquenessFunction; |
|
63
|
|
- $checkoutDirectory = sys_get_temp_dir() . '/api-compare-' . $uniquePathGenerator((string) $revision . '_'); |
|
|
63
|
+ $checkoutDirectory = sys_get_temp_dir().'/api-compare-'.$uniquePathGenerator((string) $revision.'_'); |
|
64
|
64
|
|
|
65
|
65
|
if (file_exists($checkoutDirectory) || is_dir($checkoutDirectory)) { |
|
66
|
66
|
throw new RuntimeException(sprintf( |
Please login to merge, or discard this patch.