Completed
Push — master ( e108fc...ba18e3 )
by Pascal
01:23
created
Command/TranslationConverterCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $dumper = $this->getDumper($outputFormat);
80 80
         $this->getTranslationWriter()->addDumper($outputFormat, $dumper);
81 81
 
82
-        $files = $this->finder->files()->name('/[a-z]+\.[a-z]{2}\.'.$inputFormat.'/')->in($path);
82
+        $files = $this->finder->files()->name('/[a-z]+\.[a-z]{2}\.' . $inputFormat . '/')->in($path);
83 83
 
84 84
         foreach ($files as $file) {
85 85
             list($domain, $language) = explode('.', $file->getFilename());
Please login to merge, or discard this patch.
Tests/App/AppKernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,6 +38,6 @@
 block discarded – undo
38 38
      */
39 39
     public function registerContainerConfiguration(LoaderInterface $loader)
40 40
     {
41
-        $loader->load(__DIR__.'/config.yml');
41
+        $loader->load(__DIR__ . '/config.yml');
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
Tests/Command/TranslationCommandTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function setUp()
21 21
     {
22
-        $this->exportPath = __DIR__.'/../../export';
23
-        $this->importPath =  __DIR__.'/../fixtures';
22
+        $this->exportPath = __DIR__ . '/../../export';
23
+        $this->importPath = __DIR__ . '/../fixtures';
24 24
 
25 25
         static::$kernel = static::createKernel();
26 26
         static::$kernel->boot();
27 27
 
28
-        $this->command     = new TranslationConverterCommand(
28
+        $this->command = new TranslationConverterCommand(
29 29
             static::$kernel->getContainer()->get('itkg_translation.finder'),
30 30
             static::$kernel->getContainer()->get('filesystem')
31 31
         );
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
             'command' => 'itkg_translation:translation:converter',
41 41
             '--input' => 'yml',
42 42
             '--output' => 'csv',
43
-            '--path' => $this->importPath.'/data',
43
+            '--path' => $this->importPath . '/data',
44 44
             '--output-path' => $this->exportPath
45 45
         ));
46 46
 
47
-        $this->assertEquals(file_get_contents($this->exportPath.'/domain.en.csv'), file_get_contents($this->importPath.'/result/domain.en.csv'));
48
-        $this->assertEquals(file_get_contents($this->exportPath.'/messages.fr.csv'), file_get_contents($this->importPath.'/result/messages.fr.csv'));
47
+        $this->assertEquals(file_get_contents($this->exportPath . '/domain.en.csv'), file_get_contents($this->importPath . '/result/domain.en.csv'));
48
+        $this->assertEquals(file_get_contents($this->exportPath . '/messages.fr.csv'), file_get_contents($this->importPath . '/result/messages.fr.csv'));
49 49
     }
50 50
 
51 51
     public function testExportSpecificDomain()
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
             '--input'  => 'yml',
56 56
             '--output' => 'csv',
57 57
             '--domain' => 'domain',
58
-            '--path'   => $this->importPath.'/data',
59
-            '--output-path' => $this->exportPath.'/domain'
58
+            '--path'   => $this->importPath . '/data',
59
+            '--output-path' => $this->exportPath . '/domain'
60 60
         ));
61 61
 
62
-        $this->assertCount(1, glob($this->exportPath.'/domain'));
63
-        $this->assertEquals(file_get_contents($this->exportPath.'/domain/domain.en.csv'), file_get_contents($this->importPath.'/result/domain.en.csv'));
62
+        $this->assertCount(1, glob($this->exportPath . '/domain'));
63
+        $this->assertEquals(file_get_contents($this->exportPath . '/domain/domain.en.csv'), file_get_contents($this->importPath . '/result/domain.en.csv'));
64 64
     }
65 65
 
66 66
     public function testImport()
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
             'command' => 'itkg_translation:translation:converter',
70 70
             '--input' => 'csv',
71 71
             '--output' => 'yml',
72
-            '--path' => $this->importPath.'/data',
72
+            '--path' => $this->importPath . '/data',
73 73
             '--output-path' => $this->exportPath
74 74
         ));
75 75
 
76
-        $this->assertEquals(file_get_contents($this->exportPath.'/domain.en.yml'), file_get_contents($this->importPath.'/result/domain.en.yml'));
77
-        $this->assertEquals(file_get_contents($this->exportPath.'/messages.fr.yml'), file_get_contents($this->importPath.'/result/messages.fr.yml'));
76
+        $this->assertEquals(file_get_contents($this->exportPath . '/domain.en.yml'), file_get_contents($this->importPath . '/result/domain.en.yml'));
77
+        $this->assertEquals(file_get_contents($this->exportPath . '/messages.fr.yml'), file_get_contents($this->importPath . '/result/messages.fr.yml'));
78 78
     }
79 79
 }
Please login to merge, or discard this patch.