Passed
Pull Request — master (#58)
by James
04:45
created
src/Git/GitCheckoutRevisionToTemporaryPath.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function __construct(?callable $uniquenessFunction = null)
22 22
     {
23 23
         if ($uniquenessFunction === null) {
24
-            $uniquenessFunction = function (string $nonUniqueThing) : string {
24
+            $uniquenessFunction = function(string $nonUniqueThing) : string {
25 25
                 return uniqid($nonUniqueThing, true);
26 26
             };
27 27
         }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     private function generateTemporaryPathFor(Revision $revision) : string
58 58
     {
59 59
         $uniquePathGenerator = $this->uniquenessFunction;
60
-        $checkoutDirectory   = sys_get_temp_dir() . '/api-compare-' . $uniquePathGenerator((string) $revision . '_');
60
+        $checkoutDirectory   = sys_get_temp_dir().'/api-compare-'.$uniquePathGenerator((string) $revision.'_');
61 61
 
62 62
         if (file_exists($checkoutDirectory) || is_dir($checkoutDirectory)) {
63 63
             throw new RuntimeException(sprintf(
Please login to merge, or discard this patch.
test/unit/Git/GitCheckoutRevisionToTemporaryPathTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         $revision = Revision::fromSha1(self::TEST_REVISION_TO_CHECKOUT);
24 24
 
25 25
         $temporaryClone = $git->checkout(
26
-            CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../')),
26
+            CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../')),
27 27
             $revision
28 28
         );
29 29
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function testCanCheckOutSameRevisionTwice() : void
36 36
     {
37 37
         $git              = new GitCheckoutRevisionToTemporaryPath();
38
-        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../'));
38
+        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../'));
39 39
         $revision         = Revision::fromSha1(self::TEST_REVISION_TO_CHECKOUT);
40 40
 
41 41
         $first  = $git->checkout($sourceRepository, $revision);
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function testExceptionIsThrownWhenTwoPathsCollide() : void
52 52
     {
53
-        $git              = new GitCheckoutRevisionToTemporaryPath(function () : string {
53
+        $git              = new GitCheckoutRevisionToTemporaryPath(function() : string {
54 54
             return 'foo';
55 55
         });
56
-        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../'));
56
+        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../'));
57 57
         $revision         = Revision::fromSha1(self::TEST_REVISION_TO_CHECKOUT);
58 58
 
59 59
         $first = $git->checkout($sourceRepository, $revision);
Please login to merge, or discard this patch.