Completed
Push — master ( cdef91...bfb886 )
by Klaus
22s queued 19s
created
Tests/ProcessorTest.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -167,6 +167,10 @@
 block discarded – undo
167 167
         $this->assertFileEquals($dataDir.'/expected.' . $fileType, $workingDir.'/'.$testCase['config']['file'], $testCase['title']);
168 168
     }
169 169
 
170
+    /**
171
+     * @param string $dataDir
172
+     * @param string $workingDir
173
+     */
170 174
     private function initializeTestCase(array $testCase, $dataDir, $workingDir, $fileType)
171 175
     {
172 176
         $fs = new Filesystem();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -138,23 +138,23 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function testParameterHandling($testCaseName, $fileType)
140 140
     {
141
-        $dataDir = __DIR__.'/fixtures/testcases/'. $fileType . '/' .$testCaseName;
141
+        $dataDir = __DIR__.'/fixtures/testcases/'.$fileType.'/'.$testCaseName;
142 142
 
143 143
         $testCase = array_replace_recursive(
144 144
             array(
145 145
                 'title' => 'unknown test',
146 146
                 'config' => array(
147
-                    'file' => 'parameters.' . $fileType,
147
+                    'file' => 'parameters.'.$fileType,
148 148
                     'file-type' => $fileType,
149 149
                 ),
150
-                'dist-file' => 'parameters.'. $fileType .'.dist',
150
+                'dist-file' => 'parameters.'.$fileType.'.dist',
151 151
                 'environment' => array(),
152 152
                 'interactive' => false,
153 153
             ),
154 154
             (array) Yaml::parse(file_get_contents($dataDir.'/setup.yml'))
155 155
         );
156 156
 
157
-        $workingDir = sys_get_temp_dir() . '/incenteev_parameter_handler';
157
+        $workingDir = sys_get_temp_dir().'/incenteev_parameter_handler';
158 158
         $exists = $this->initializeTestCase($testCase, $dataDir, $workingDir, $fileType);
159 159
 
160 160
         $message = sprintf('<info>%s the "%s" file</info>', $exists ? 'Updating' : 'Creating', $testCase['config']['file']);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         $this->processor->processFile($testCase['config']);
166 166
 
167
-        $this->assertFileEquals($dataDir.'/expected.' . $fileType, $workingDir.'/'.$testCase['config']['file'], $testCase['title']);
167
+        $this->assertFileEquals($dataDir.'/expected.'.$fileType, $workingDir.'/'.$testCase['config']['file'], $testCase['title']);
168 168
     }
169 169
 
170 170
     private function initializeTestCase(array $testCase, $dataDir, $workingDir, $fileType)
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
             $fs->remove($workingDir);
176 176
         }
177 177
 
178
-        $fs->copy($dataDir.'/dist.' . $fileType, $workingDir.'/'. $testCase['dist-file']);
178
+        $fs->copy($dataDir.'/dist.'.$fileType, $workingDir.'/'.$testCase['dist-file']);
179 179
 
180
-        if ($exists = file_exists($dataDir.'/existing.' . $fileType)) {
181
-            $fs->copy($dataDir.'/existing.' . $fileType, $workingDir.'/'.$testCase['config']['file']);
180
+        if ($exists = file_exists($dataDir.'/existing.'.$fileType)) {
181
+            $fs->copy($dataDir.'/existing.'.$fileType, $workingDir.'/'.$testCase['config']['file']);
182 182
         }
183 183
 
184 184
         foreach ($testCase['environment'] as $var => $value) {
Please login to merge, or discard this patch.
FileHandler/YamlHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function save($filePath, $data)
22 22
     {
23
-        return file_put_contents($filePath, "# This file is auto-generated during the composer install\n" . Yaml::dump($data, 99));
23
+        return file_put_contents($filePath, "# This file is auto-generated during the composer install\n".Yaml::dump($data, 99));
24 24
     }
25 25
 
26 26
     /**
Please login to merge, or discard this patch.
FileHandlerFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@
 block discarded – undo
20 20
     public static function createFileHandler($fileType)
21 21
     {
22 22
         if (!isset(self::$handlers[$fileType])) {
23
-            throw new \RuntimeException('Unsupported file type: ' . $fileType);
23
+            throw new \RuntimeException('Unsupported file type: '.$fileType);
24 24
         }
25 25
 
26
-        $className = '\\Incenteev\\ParameterHandler\\FileHandler\\' . self::$handlers[$fileType];
26
+        $className = '\\Incenteev\\ParameterHandler\\FileHandler\\'.self::$handlers[$fileType];
27 27
 
28 28
         return new $className();
29 29
     }
Please login to merge, or discard this patch.
Processor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         }
79 79
 
80 80
         if (empty($config['dist-file'])) {
81
-            $config['dist-file'] = $config['file'] . '.dist';
81
+            $config['dist-file'] = $config['file'].'.dist';
82 82
         }
83 83
 
84 84
         if (!is_file($config['dist-file'])) {
Please login to merge, or discard this patch.
Tests/fixtures/testcases/php/custom_dist_file/existing.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3 3
 return array (
4
-  'parameters' =>
5
-  array (
4
+    'parameters' =>
5
+    array (
6 6
     'foo' => 'bar',
7 7
     'boolean' => false,
8
-  ),
8
+    ),
9 9
 );
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3
-return array (
3
+return array(
4 4
   'parameters' =>
5
-  array (
5
+  array(
6 6
     'foo' => 'bar',
7 7
     'boolean' => false,
8 8
   ),
Please login to merge, or discard this patch.
Tests/fixtures/testcases/php/custom_dist_file/expected.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3 3
 return array (
4
-  'parameters' => 
5
-  array (
4
+    'parameters' => 
5
+    array (
6 6
     'foo' => 'bar',
7 7
     'boolean' => false,
8
-  ),
8
+    ),
9 9
 );
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3
-return array (
3
+return array(
4 4
   'parameters' => 
5
-  array (
5
+  array(
6 6
     'foo' => 'bar',
7 7
     'boolean' => false,
8 8
   ),
Please login to merge, or discard this patch.
Tests/fixtures/testcases/php/existent/expected.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3 3
 return array (
4
-  'parameters' => 
5
-  array (
4
+    'parameters' => 
5
+    array (
6 6
     'foo' => 'existing_foo',
7 7
     'boolean' => false,
8 8
     'another' => NULL,
9 9
     'nested' => 
10 10
     array (
11
-      'foo' => 'bar',
12
-      'bar' => 'baz',
11
+        'foo' => 'bar',
12
+        'bar' => 'baz',
13
+    ),
13 14
     ),
14
-  ),
15 15
 );
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3
-return array (
3
+return array(
4 4
   'parameters' => 
5
-  array (
5
+  array(
6 6
     'foo' => 'existing_foo',
7 7
     'boolean' => false,
8 8
     'another' => NULL,
9 9
     'nested' => 
10
-    array (
10
+    array(
11 11
       'foo' => 'bar',
12 12
       'bar' => 'baz',
13 13
     ),
Please login to merge, or discard this patch.
Tests/fixtures/testcases/php/existent_empty/expected.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3 3
 return array (
4
-  'parameters' => 
5
-  array (
4
+    'parameters' => 
5
+    array (
6 6
     'foo' => 'bar',
7
-  ),
7
+    ),
8 8
 );
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // This file is auto-generated during the composer install
3
-return array (
3
+return array(
4 4
   'parameters' => 
5
-  array (
5
+  array(
6 6
     'foo' => 'bar',
7 7
   ),
8 8
 );
Please login to merge, or discard this patch.