@@ -88,7 +88,7 @@ |
||
88 | 88 | $outputFilePath = $pathInfo['dirname'] . '/' . $outputFileName; |
89 | 89 | |
90 | 90 | $output = $file->getClone() |
91 | - ->setPath($outputFilePath); |
|
91 | + ->setPath($outputFilePath); |
|
92 | 92 | |
93 | 93 | $this->log(LogLevel::INFO, "Retrieving the last {lines} from file {file}", [ |
94 | 94 | 'lines' => $this->lines, |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $outputFilePath = $pathInfo['dirname'] . '/' . $outputFileName; |
93 | 93 | |
94 | 94 | $output = $file->getClone() |
95 | - ->setPath($outputFilePath); |
|
95 | + ->setPath($outputFilePath); |
|
96 | 96 | |
97 | 97 | if (is_array($fromText)) { |
98 | 98 | if (is_array($toText) && |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $outputFilePath = $pathInfo['dirname'] . '/' . $outputFileName; |
89 | 89 | |
90 | 90 | $output = $file->getClone() |
91 | - ->setPath($outputFilePath); |
|
91 | + ->setPath($outputFilePath); |
|
92 | 92 | |
93 | 93 | $this->log(LogLevel::INFO, "Retrieving the last {lines} from file {file}", [ |
94 | 94 | 'lines' => $this->lines, |
@@ -23,7 +23,7 @@ |
||
23 | 23 | return null; |
24 | 24 | } |
25 | 25 | |
26 | - $commonPath = $this->reduce(function ($commonPath, FileNodeInterface $file) { |
|
26 | + $commonPath = $this->reduce(function($commonPath, FileNodeInterface $file) { |
|
27 | 27 | if (is_null($commonPath)) { |
28 | 28 | return $file->getPath(); |
29 | 29 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $process->shouldReceive('isSuccessful')->andReturn(false); |
120 | 120 | |
121 | 121 | $this->processFactory->shouldReceive('createProcess') |
122 | - ->andReturn($process); |
|
122 | + ->andReturn($process); |
|
123 | 123 | |
124 | 124 | $file = new LocalFile(static::$dir . 'failed_find_encoding_process.test'); |
125 | 125 | $file->put('random stuff and things 2!'); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $process->shouldReceive('isSuccessful')->andReturn(false); |
136 | 136 | |
137 | 137 | $this->processFactory->shouldReceive('createProcess') |
138 | - ->andReturn($process); |
|
138 | + ->andReturn($process); |
|
139 | 139 | |
140 | 140 | $file = new LocalFile(static::$dir . 'failed_find_encoding_process.test'); |
141 | 141 | $file->put('random stuff and things 2!'); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $process->shouldReceive('getOutput')->andReturn('text/plain; charset=utf-8 compressed-encoding=application/lzop; charset=binary; charset=binary'); |
154 | 154 | |
155 | 155 | $this->processFactory->shouldReceive('createProcess') |
156 | - ->andReturn($process); |
|
156 | + ->andReturn($process); |
|
157 | 157 | |
158 | 158 | $file = new LocalFile(static::$dir . 'unknown_compression.test'); |
159 | 159 | $file->put('random stuff and things 2!'); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $process->shouldReceive('getOutput')->andReturn('some random stuff with no charset'); |
170 | 170 | |
171 | 171 | $this->processFactory->shouldReceive('createProcess') |
172 | - ->andReturn($process); |
|
172 | + ->andReturn($process); |
|
173 | 173 | |
174 | 174 | $file = new LocalFile(static::$dir . 'unknown_compression.test'); |
175 | 175 | $file->put('random stuff and things 2!'); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $process = m::mock(Process::class)->makePartial(); |
95 | 95 | $processFactory = m::mock(ProcessFactory::class); |
96 | 96 | $processFactory->shouldReceive('createProcess') |
97 | - ->andReturn($process); |
|
97 | + ->andReturn($process); |
|
98 | 98 | $this->gzip->setProcessFactory($processFactory); |
99 | 99 | $process->shouldReceive('run')->once(); |
100 | 100 | $process->shouldReceive('isSuccessful')->once()->andReturn(false); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $process = m::mock(Process::class)->makePartial(); |
119 | 119 | $processFactory = m::mock(ProcessFactory::class); |
120 | 120 | $processFactory->shouldReceive('createProcess') |
121 | - ->andReturn($process); |
|
121 | + ->andReturn($process); |
|
122 | 122 | $this->gzip->setProcessFactory($processFactory); |
123 | 123 | $process->shouldReceive('run')->once(); |
124 | 124 | $process->shouldReceive('isSuccessful')->once()->andReturn(false); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | { |
104 | 104 | $process = m::mock(Process::class)->makePartial(); |
105 | 105 | $this->processFactory->shouldReceive('createProcess') |
106 | - ->andReturn($process); |
|
106 | + ->andReturn($process); |
|
107 | 107 | $process->shouldReceive('run')->once(); |
108 | 108 | $process->shouldReceive('isSuccessful')->once()->andReturn(false); |
109 | 109 | $process->shouldReceive('getCommandLine')->andReturn(''); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | $process = m::mock(Process::class)->makePartial(); |
127 | 127 | $this->processFactory->shouldReceive('createProcess') |
128 | - ->andReturn($process); |
|
128 | + ->andReturn($process); |
|
129 | 129 | $process->shouldReceive('run')->once(); |
130 | 130 | $process->shouldReceive('isSuccessful')->once()->andReturn(false); |
131 | 131 | $process->shouldReceive('getCommandLine')->andReturn(''); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | $collection = m::mock(FileNodeCollectionInterface::class); |
46 | 46 | $collection->shouldReceive('getIterator') |
47 | - ->andReturn([]); |
|
47 | + ->andReturn([]); |
|
48 | 48 | |
49 | 49 | $node = m::mock(LocalFile::class); |
50 | 50 | static::assertTrue($this->merge->canContract($collection, $node)); |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | $collection = new FileNodeCollection(); |
56 | 56 | $file1 = m::mock(LocalFile::class); |
57 | 57 | $file1->shouldReceive('exists') |
58 | - ->andReturn(true); |
|
58 | + ->andReturn(true); |
|
59 | 59 | $file1->shouldReceive('getCompression') |
60 | - ->andReturn(CompressionType::NONE); |
|
60 | + ->andReturn(CompressionType::NONE); |
|
61 | 61 | $collection->add($file1); |
62 | 62 | |
63 | 63 | $out = m::mock(LocalFile::class); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $file2 = m::mock(FileNodeInterface::class); |
68 | 68 | $file2->shouldReceive('getCompression') |
69 | - ->andReturn(CompressionType::NONE); |
|
69 | + ->andReturn(CompressionType::NONE); |
|
70 | 70 | $collection->add($file2); |
71 | 71 | |
72 | 72 | static::assertFalse($this->merge->canContract($collection, $out)); |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $collection = new FileNodeCollection(); |
78 | 78 | $file1 = m::mock(LocalFile::class); |
79 | 79 | $file1->shouldReceive('exists') |
80 | - ->andReturn(true); |
|
80 | + ->andReturn(true); |
|
81 | 81 | $file1->shouldReceive('getCompression') |
82 | - ->andReturn(CompressionType::NONE); |
|
82 | + ->andReturn(CompressionType::NONE); |
|
83 | 83 | $collection->add($file1); |
84 | 84 | |
85 | 85 | $out = m::mock(LocalFile::class); |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | |
89 | 89 | $file2 = m::mock(LocalFile::class); |
90 | 90 | $file2->shouldReceive('exists') |
91 | - ->andReturn(false); |
|
91 | + ->andReturn(false); |
|
92 | 92 | $file2->shouldReceive('getCompression') |
93 | - ->andReturn(CompressionType::NONE); |
|
93 | + ->andReturn(CompressionType::NONE); |
|
94 | 94 | $collection->add($file2); |
95 | 95 | |
96 | 96 | static::assertFalse($this->merge->canContract($collection, $out)); |
@@ -101,9 +101,9 @@ discard block |
||
101 | 101 | $collection = new FileNodeCollection(); |
102 | 102 | $file1 = m::mock(LocalFile::class); |
103 | 103 | $file1->shouldReceive('exists') |
104 | - ->andReturn(true); |
|
104 | + ->andReturn(true); |
|
105 | 105 | $file1->shouldReceive('getCompression') |
106 | - ->andReturn(CompressionType::NONE); |
|
106 | + ->andReturn(CompressionType::NONE); |
|
107 | 107 | $collection->add($file1); |
108 | 108 | |
109 | 109 | $out = m::mock(LocalFile::class); |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | |
113 | 113 | $file2 = m::mock(LocalFile::class); |
114 | 114 | $file2->shouldReceive('exists') |
115 | - ->andReturn(true); |
|
115 | + ->andReturn(true); |
|
116 | 116 | $file2->shouldReceive('getCompression') |
117 | - ->andReturn(CompressionType::GZIP); |
|
117 | + ->andReturn(CompressionType::GZIP); |
|
118 | 118 | $collection->add($file2); |
119 | 119 | |
120 | 120 | static::assertFalse($this->merge->canContract($collection, $out)); |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | $collection = new FileNodeCollection(); |
126 | 126 | $file = m::mock(LocalFile::class); |
127 | 127 | $file->shouldReceive('exists') |
128 | - ->andReturn(true); |
|
128 | + ->andReturn(true); |
|
129 | 129 | $file->shouldReceive('getCompression') |
130 | - ->andReturn(CompressionType::NONE); |
|
130 | + ->andReturn(CompressionType::NONE); |
|
131 | 131 | $collection->add($file); |
132 | 132 | |
133 | 133 | $target = m::mock(FileNodeInterface::class); |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | $collection = new FileNodeCollection(); |
141 | 141 | $file = m::mock(LocalFile::class); |
142 | 142 | $file->shouldReceive('exists') |
143 | - ->andReturn(false); |
|
143 | + ->andReturn(false); |
|
144 | 144 | $file->shouldReceive('getCompression') |
145 | - ->andReturn(CompressionType::NONE); |
|
145 | + ->andReturn(CompressionType::NONE); |
|
146 | 146 | $collection->add($file); |
147 | 147 | |
148 | 148 | $target = m::mock(LocalFile::class); |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | $collection = new FileNodeCollection(); |
158 | 158 | $file = m::mock(LocalFile::class); |
159 | 159 | $file->shouldReceive('exists') |
160 | - ->andReturn(true); |
|
160 | + ->andReturn(true); |
|
161 | 161 | $file->shouldReceive('getCompression') |
162 | - ->andReturn(CompressionType::NONE); |
|
162 | + ->andReturn(CompressionType::NONE); |
|
163 | 163 | $collection->add($file); |
164 | 164 | |
165 | 165 | $target = m::mock(FileNodeInterface::class); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | { |
255 | 255 | $process = m::mock('Symfony\Component\Process\Process')->makePartial(); |
256 | 256 | $this->processFactory->shouldReceive('createProcess') |
257 | - ->andReturn($process); |
|
257 | + ->andReturn($process); |
|
258 | 258 | |
259 | 259 | $process->shouldReceive('isSuccessful')->andReturn(false); |
260 | 260 |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $file->getContents() |
194 | 194 | ); |
195 | 195 | |
196 | - $exists = $collection->filter(function (FileNodeInterface $item) { |
|
196 | + $exists = $collection->filter(function(FileNodeInterface $item) { |
|
197 | 197 | return $item->exists(); |
198 | 198 | }); |
199 | 199 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $file->getContents() |
244 | 244 | ); |
245 | 245 | |
246 | - $exists = $collection->filter(function (FileNodeInterface $item) { |
|
246 | + $exists = $collection->filter(function(FileNodeInterface $item) { |
|
247 | 247 | return $item->exists(); |
248 | 248 | }); |
249 | 249 | |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | $file->getContents() |
297 | 297 | ); |
298 | 298 | |
299 | - $exists = $collection->filter(function (FileNodeInterface $item) { |
|
299 | + $exists = $collection->filter(function(FileNodeInterface $item) { |
|
300 | 300 | return $item->exists(); |
301 | 301 | }); |
302 | 302 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | |
330 | 330 | static::assertFalse(file_exists($collection->getAll()[0]->getDirectory())); |
331 | 331 | |
332 | - $exists = $collection->filter(function (FileNodeInterface $item) { |
|
332 | + $exists = $collection->filter(function(FileNodeInterface $item) { |
|
333 | 333 | return $item->exists(); |
334 | 334 | }); |
335 | 335 |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | { |
187 | 187 | $file = m::mock(FileNodeInterface::class); |
188 | 188 | $file->shouldReceive('__toString') |
189 | - ->andReturn('some/file/here'); |
|
189 | + ->andReturn('some/file/here'); |
|
190 | 190 | |
191 | 191 | $this->expectException(InvalidArgumentException::class); |
192 | 192 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $process = m::mock(Process::class)->makePartial(); |
211 | 211 | $process->shouldReceive('isSuccessful')->andReturn(false); |
212 | 212 | $this->processFactory->shouldReceive('createProcess') |
213 | - ->andReturn($process); |
|
213 | + ->andReturn($process); |
|
214 | 214 | |
215 | 215 | $file = new LocalFile(static::$dir . 'failed_replace_text.test'); |
216 | 216 | $file->put('some text that text should be replaced'); |