@@ -51,7 +51,7 @@ discard block |
||
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 |
||
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 | } |
@@ -27,7 +27,7 @@ |
||
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(); |
@@ -51,7 +51,7 @@ discard block |
||
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 |
||
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 | } |
@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 | } |
@@ -42,7 +42,7 @@ |
||
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); |
@@ -20,7 +20,7 @@ discard block |
||
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 |
||
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 | } |
@@ -52,7 +52,7 @@ |
||
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++; |
@@ -26,7 +26,7 @@ |
||
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 | } |
@@ -28,7 +28,7 @@ |
||
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 |
@@ -22,7 +22,7 @@ |
||
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 | } |
@@ -24,7 +24,7 @@ |
||
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 |
@@ -23,7 +23,7 @@ |
||
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 |