Completed
Pull Request — master (#41)
by Nicolas
07:53
created
src/Workers/Chunks/ChunkAssemblyTrackers/SingleTrackingInMemory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     private function ensureHasBeenStarted(Uuid $uuid)
53 53
     {
54
-        if(! $this->hasBeenStarted($uuid))
54
+        if( ! $this->hasBeenStarted($uuid))
55 55
         {
56 56
             throw new \LogicException("Chunk assembly tracking has not been initialized ($uuid)");
57 57
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         $playhead = $this->convertPlayhead($playhead);
71 71
 
72
-        if(! array_key_exists($playhead, $this->chunks))
72
+        if( ! array_key_exists($playhead, $this->chunks))
73 73
         {
74 74
             throw new \LogicException("Invalid chunk number : $playhead");
75 75
         }
Please login to merge, or discard this patch.
src/Workers/Chunks/ChunkAssemblyTrackers/MultipleTracker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     private function getTracker(Uuid $uuid)
29 29
     {
30
-        if(! isset($this->trackers[$uuid->value()]))
30
+        if( ! isset($this->trackers[$uuid->value()]))
31 31
         {
32 32
             $factory = $this->trackerInstanciator;
33 33
             $this->trackers[$uuid->value()] = $factory();
Please login to merge, or discard this patch.
src/Workers/Chunks/ChunkAssembler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     private function retrieveChunkedMessageMetadata(array $headers)
53 53
     {
54
-        if(! isset($headers['chunkedMessage']))
54
+        if( ! isset($headers['chunkedMessage']))
55 55
         {
56 56
             throw new \InvalidArgumentException("Missing chunkedMessage header");
57 57
         }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     private function retrieveChunkMetadata(array $headers)
63 63
     {
64
-        if(! isset($headers['chunk']))
64
+        if( ! isset($headers['chunk']))
65 65
         {
66 66
             throw new \InvalidArgumentException("Missing chunk header");
67 67
         }
Please login to merge, or discard this patch.
src/Workers/Chunks/ChunkAssemblyStorages/FileStorage.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     private function ensureTempDirectoryExists()
27 27
     {
28
-        if(! is_dir($this->tempDirPath))
28
+        if( ! is_dir($this->tempDirPath))
29 29
         {
30 30
             mkdir($this->tempDirPath, 0755, true);
31 31
         }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $filepath = $this->computeFilepath($uuid);
62 62
 
63
-        if(! $stream = fopen($filepath, 'r+'))
63
+        if( ! $stream = fopen($filepath, 'r+'))
64 64
         {
65 65
             throw new \RuntimeException("Unable to open file $filepath");
66 66
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
         if(is_file($filepath))
44 44
         {
45
-            throw new \LogicException("File $filepath already exists");
45
+            throw new \LogicException("file $filepath already exists");
46 46
         }
47 47
 
48 48
         $success = touch($filepath);
Please login to merge, or discard this patch.
src/Clients/ChunkedMessageClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     {
21 21
         $this->changeRoutingKeyPrefix(self::DEFAULT_ROUTING_KEY_PREFIX);
22 22
 
23
-        if(! $memory instanceof MemoryManagementStrategy)
23
+        if( ! $memory instanceof MemoryManagementStrategy)
24 24
         {
25 25
             $memory = new NullMemoryManagementStrategy();
26 26
         }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $streamedContent = $chunkedMessage->getBodyInTransportFormat();
45 45
 
46
-        if(! $streamedContent instanceof \Generator)
46
+        if( ! $streamedContent instanceof \Generator)
47 47
         {
48 48
             return $this->client->publish($exchangeName, $chunkedMessage);
49 49
         }
Please login to merge, or discard this patch.
src/Messages/Bodies/StreamedFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
         $stream = fopen($this->filepath, 'r');
54 54
 
55
-        while(! feof($stream))
55
+        while( ! feof($stream))
56 56
         {
57 57
             $content = fread($stream, $this->chunkSize->toBytes());
58 58
             $playhead++;
Please login to merge, or discard this patch.
src/Messages/Chunks/ChunkedMessageMetadata.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
         foreach($requiredKeys as $key)
28 28
         {
29
-            if(! isset($headers[$key]))
29
+            if( ! isset($headers[$key]))
30 30
             {
31 31
                 throw new \InvalidArgumentException("Missing $key in chunked message metadata");
32 32
             }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         {
29 29
             if(! isset($headers[$key]))
30 30
             {
31
-                throw new \InvalidArgumentException("Missing $key in chunked message metadata");
31
+                throw new \InvalidArgumentException("missing $key in chunked message metadata");
32 32
             }
33 33
         }
34 34
 
Please login to merge, or discard this patch.
src/Messages/Chunks/ChunkMetadata.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
         foreach($requiredKeys as $key)
24 24
         {
25
-            if(! isset($headers[$key]))
25
+            if( ! isset($headers[$key]))
26 26
             {
27 27
                 throw new \InvalidArgumentException("Missing $key in chunk metadata");
28 28
             }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         {
25 25
             if(! isset($headers[$key]))
26 26
             {
27
-                throw new \InvalidArgumentException("Missing $key in chunk metadata");
27
+                throw new \InvalidArgumentException("missing $key in chunk metadata");
28 28
             }
29 29
         }
30 30
 
Please login to merge, or discard this patch.
test-receive.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
 $consumer = new Insomniac();
25 25
 
26
-$tracker = new MultipleTracker(function () {
26
+$tracker = new MultipleTracker(function() {
27 27
     return new SingleTrackingInMemory();
28 28
 });
29 29
 
Please login to merge, or discard this patch.