@@ -72,11 +72,11 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $nodes = $this->nodes; |
| 74 | 74 | // http://stackoverflow.com/a/10985500 |
| 75 | - @usort($nodes, function (IFile $a, IFile $b) { |
|
| 75 | + @usort($nodes, function(IFile $a, IFile $b) { |
|
| 76 | 76 | return strnatcmp($a->getName(), $b->getName()); |
| 77 | 77 | }); |
| 78 | 78 | $this->nodes = array_values($nodes); |
| 79 | - $this->size = array_reduce($this->nodes, function ($size, IFile $file) { |
|
| 79 | + $this->size = array_reduce($this->nodes, function($size, IFile $file) { |
|
| 80 | 80 | return $size + $file->getSize(); |
| 81 | 81 | }, 0); |
| 82 | 82 | return true; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | $stream = $this->getStream($this->nodes[$nodeIndex]); |
| 116 | 116 | $nodeOffset = $offset - $nodeStart; |
| 117 | - if(fseek($stream, $nodeOffset) === -1) { |
|
| 117 | + if (fseek($stream, $nodeOffset) === -1) { |
|
| 118 | 118 | return false; |
| 119 | 119 | } |
| 120 | 120 | $this->currentNode = $nodeIndex; |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | fclose($this->currentStream); |
| 155 | 155 | $currentNodeSize = $this->nodes[$this->currentNode]->getSize(); |
| 156 | 156 | if ($this->currentNodeRead < $currentNodeSize) { |
| 157 | - throw new \Exception('Stream from assembly node shorter than expected, got ' . $this->currentNodeRead . ' bytes, expected ' . $currentNodeSize); |
|
| 157 | + throw new \Exception('Stream from assembly node shorter than expected, got '.$this->currentNodeRead.' bytes, expected '.$currentNodeSize); |
|
| 158 | 158 | } |
| 159 | 159 | $this->currentNode++; |
| 160 | 160 | $this->currentNodeRead = 0; |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | if (isset($context[$name])) { |
| 252 | 252 | $context = $context[$name]; |
| 253 | 253 | } else { |
| 254 | - throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set'); |
|
| 254 | + throw new \BadMethodCallException('Invalid context, "'.$name.'" options not set'); |
|
| 255 | 255 | } |
| 256 | 256 | if (isset($context['nodes']) and is_array($context['nodes'])) { |
| 257 | 257 | $this->nodes = $context['nodes']; |