@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | /** |
67 | 67 | * @param string $compression |
68 | 68 | * |
69 | - * @return CompressorInterface |
|
69 | + * @return CompressionTypeInterface |
|
70 | 70 | * @throws InvalidCompressionTypeException |
71 | 71 | */ |
72 | 72 | public function getCompressor($compression) |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * @param string $compression CompressionType:: |
83 | 83 | * |
84 | - * @return DeCompressorInterface |
|
84 | + * @return CompressionTypeInterface |
|
85 | 85 | * @throws InvalidCompressionTypeException |
86 | 86 | */ |
87 | 87 | public function getDeCompressor($compression) |
@@ -5,8 +5,6 @@ |
||
5 | 5 | use Graze\DataFile\FileInfo; |
6 | 6 | use Graze\DataFile\Helper\Process\ProcessFactory; |
7 | 7 | use Graze\DataFile\Modify\Compress\CompressionFactory; |
8 | -use Graze\DataFile\Modify\Compress\CompressionType; |
|
9 | -use Graze\DataFile\Modify\Compress\Compressor; |
|
10 | 8 | use Graze\DataFile\Modify\Compress\Gzip; |
11 | 9 | use Graze\DataFile\Modify\Compress\Zip; |
12 | 10 | use Graze\DataFile\Node\LocalFile; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Graze\DataFile\Helper\Process\ProcessFactory; |
6 | 6 | use Graze\DataFile\Modify\Compress\CompressionFactory; |
7 | -use Graze\DataFile\Modify\Compress\Compressor; |
|
8 | 7 | use Graze\DataFile\Modify\Compress\CompressorInterface; |
9 | 8 | use Graze\DataFile\Modify\Compress\DeCompressorInterface; |
10 | 9 | use Graze\DataFile\Modify\Compress\Gzip; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Graze\DataFile\Helper\Process\ProcessFactory; |
6 | 6 | use Graze\DataFile\Modify\Compress\CompressionFactory; |
7 | -use Graze\DataFile\Modify\Compress\Compressor; |
|
8 | 7 | use Graze\DataFile\Modify\Compress\CompressorInterface; |
9 | 8 | use Graze\DataFile\Modify\Compress\DeCompressorInterface; |
10 | 9 | use Graze\DataFile\Modify\Compress\Zip; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Graze\DataFile\Helper\Process\ProcessFactory; |
6 | 6 | use Graze\DataFile\Modify\Compress\CompressionFactory; |
7 | -use Graze\DataFile\Modify\Compress\CompressionType; |
|
8 | 7 | use Graze\DataFile\Modify\Compress\Gzip; |
9 | 8 | use Graze\DataFile\Modify\Contract\FileContractorInterface; |
10 | 9 | use Graze\DataFile\Modify\Contract\MergeFiles; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $collection = m::mock(FileNodeCollectionInterface::class); |
48 | 48 | $collection->shouldReceive('getIterator') |
49 | - ->andReturn([]); |
|
49 | + ->andReturn([]); |
|
50 | 50 | |
51 | 51 | $node = m::mock(LocalFile::class); |
52 | 52 | static::assertTrue($this->merge->canContract($collection, $node)); |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | $collection = new FileNodeCollection(); |
58 | 58 | $file1 = m::mock(LocalFile::class); |
59 | 59 | $file1->shouldReceive('exists') |
60 | - ->andReturn(true); |
|
60 | + ->andReturn(true); |
|
61 | 61 | $file1->shouldReceive('getCompression') |
62 | - ->andReturn(CompressionFactory::TYPE_NONE); |
|
62 | + ->andReturn(CompressionFactory::TYPE_NONE); |
|
63 | 63 | $collection->add($file1); |
64 | 64 | |
65 | 65 | $out = m::mock(LocalFile::class); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $file2 = m::mock(FileNodeInterface::class); |
70 | 70 | $file2->shouldReceive('getCompression') |
71 | - ->andReturn(CompressionFactory::TYPE_NONE); |
|
71 | + ->andReturn(CompressionFactory::TYPE_NONE); |
|
72 | 72 | $collection->add($file2); |
73 | 73 | |
74 | 74 | static::assertFalse($this->merge->canContract($collection, $out)); |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | $collection = new FileNodeCollection(); |
80 | 80 | $file1 = m::mock(LocalFile::class); |
81 | 81 | $file1->shouldReceive('exists') |
82 | - ->andReturn(true); |
|
82 | + ->andReturn(true); |
|
83 | 83 | $file1->shouldReceive('getCompression') |
84 | - ->andReturn(CompressionFactory::TYPE_NONE); |
|
84 | + ->andReturn(CompressionFactory::TYPE_NONE); |
|
85 | 85 | $collection->add($file1); |
86 | 86 | |
87 | 87 | $out = m::mock(LocalFile::class); |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | |
91 | 91 | $file2 = m::mock(LocalFile::class); |
92 | 92 | $file2->shouldReceive('exists') |
93 | - ->andReturn(false); |
|
93 | + ->andReturn(false); |
|
94 | 94 | $file2->shouldReceive('getCompression') |
95 | - ->andReturn(CompressionFactory::TYPE_NONE); |
|
95 | + ->andReturn(CompressionFactory::TYPE_NONE); |
|
96 | 96 | $collection->add($file2); |
97 | 97 | |
98 | 98 | static::assertFalse($this->merge->canContract($collection, $out)); |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | $collection = new FileNodeCollection(); |
104 | 104 | $file1 = m::mock(LocalFile::class); |
105 | 105 | $file1->shouldReceive('exists') |
106 | - ->andReturn(true); |
|
106 | + ->andReturn(true); |
|
107 | 107 | $file1->shouldReceive('getCompression') |
108 | - ->andReturn(CompressionFactory::TYPE_NONE); |
|
108 | + ->andReturn(CompressionFactory::TYPE_NONE); |
|
109 | 109 | $collection->add($file1); |
110 | 110 | |
111 | 111 | $out = m::mock(LocalFile::class); |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | |
115 | 115 | $file2 = m::mock(LocalFile::class); |
116 | 116 | $file2->shouldReceive('exists') |
117 | - ->andReturn(true); |
|
117 | + ->andReturn(true); |
|
118 | 118 | $file2->shouldReceive('getCompression') |
119 | - ->andReturn(Gzip::NAME); |
|
119 | + ->andReturn(Gzip::NAME); |
|
120 | 120 | $collection->add($file2); |
121 | 121 | |
122 | 122 | static::assertFalse($this->merge->canContract($collection, $out)); |
@@ -127,9 +127,9 @@ discard block |
||
127 | 127 | $collection = new FileNodeCollection(); |
128 | 128 | $file = m::mock(LocalFile::class); |
129 | 129 | $file->shouldReceive('exists') |
130 | - ->andReturn(false); |
|
130 | + ->andReturn(false); |
|
131 | 131 | $file->shouldReceive('getCompression') |
132 | - ->andReturn(CompressionFactory::TYPE_NONE); |
|
132 | + ->andReturn(CompressionFactory::TYPE_NONE); |
|
133 | 133 | $collection->add($file); |
134 | 134 | |
135 | 135 | $target = m::mock(LocalFile::class); |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | $collection = new FileNodeCollection(); |
145 | 145 | $file = m::mock(LocalFile::class); |
146 | 146 | $file->shouldReceive('exists') |
147 | - ->andReturn(true); |
|
147 | + ->andReturn(true); |
|
148 | 148 | $file->shouldReceive('getCompression') |
149 | - ->andReturn(CompressionFactory::TYPE_NONE); |
|
149 | + ->andReturn(CompressionFactory::TYPE_NONE); |
|
150 | 150 | $collection->add($file); |
151 | 151 | |
152 | 152 | $target = m::mock(FileNodeInterface::class); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | { |
244 | 244 | $process = m::mock('Symfony\Component\Process\Process')->makePartial(); |
245 | 245 | $this->processFactory->shouldReceive('createProcess') |
246 | - ->andReturn($process); |
|
246 | + ->andReturn($process); |
|
247 | 247 | |
248 | 248 | $process->shouldReceive('isSuccessful')->andReturn(false); |
249 | 249 |
@@ -25,8 +25,8 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | $outputFile = $node->getClone() |
28 | - ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename'] . '.' . $this->getExtension()) |
|
29 | - ->setCompression($this->getName()); |
|
28 | + ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename'] . '.' . $this->getExtension()) |
|
29 | + ->setCompression($this->getName()); |
|
30 | 30 | |
31 | 31 | $this->log(LogLevel::INFO, "Compressing file: {file} into {target} using {compression}", [ |
32 | 32 | 'file' => $node, |
@@ -25,8 +25,8 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | $outputFile = $node->getClone() |
28 | - ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename']) |
|
29 | - ->setCompression(CompressionFactory::TYPE_NONE); |
|
28 | + ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename']) |
|
29 | + ->setCompression(CompressionFactory::TYPE_NONE); |
|
30 | 30 | |
31 | 31 | $this->log(LogLevel::INFO, "DeCompressing file: {file} into {target} using {compression}", [ |
32 | 32 | 'file' => $node, |