Completed
Push — master ( 4ccb7a...3447cd )
by
unknown
04:37 queued 02:40
created
src/Sculpin/Tests/Functional/FunctionalTestCase.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected function executeSculpin($command): void
75 75
     {
76
-        $binPath    = __DIR__ . '/../../../../bin';
76
+        $binPath    = __DIR__.'/../../../../bin';
77 77
         $projectDir = static::projectDir();
78 78
         exec("$binPath/sculpin $command --project-dir $projectDir --env=test", $this->executeOutput);
79 79
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     protected function executeSculpinAsync(string $command, bool $start = true, ?callable $callback = null): Process
93 93
     {
94
-        $binPath    = __DIR__ . '/../../../../bin';
94
+        $binPath    = __DIR__.'/../../../../bin';
95 95
         $projectDir = static::projectDir();
96 96
         $process    = new Process("$binPath/sculpin $command --project-dir $projectDir --env=test");
97 97
 
@@ -143,12 +143,12 @@  discard block
 block discarded – undo
143 143
         // Add the file directories
144 144
         $hasDirectoryPath = !empty($dirPathParts);
145 145
         if ($hasDirectoryPath) {
146
-            $dirPath = '/' . join('/', $dirPathParts);
146
+            $dirPath = '/'.join('/', $dirPathParts);
147 147
             $this->addProjectDirectory($dirPath);
148 148
         }
149 149
 
150 150
         // Create the file
151
-        static::$fs->touch(static::projectDir() . $filePath);
151
+        static::$fs->touch(static::projectDir().$filePath);
152 152
 
153 153
         // Add content to the file
154 154
         if (!is_null($content)) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     protected function copyFixtureToProject(string $fixturePath, string $projectPath): void
164 164
     {
165
-        static::$fs->copy($fixturePath, static::projectDir() . $projectPath);
165
+        static::$fs->copy($fixturePath, static::projectDir().$projectPath);
166 166
     }
167 167
 
168 168
     /**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     {
174 174
         $msg = $msg ?: "Expected project to contain file at path $filePath.";
175 175
 
176
-        $this->assertTrue(static::$fs->exists(static::projectDir() . $filePath), $msg);
176
+        $this->assertTrue(static::$fs->exists(static::projectDir().$filePath), $msg);
177 177
     }
178 178
 
179 179
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $msg = $msg ?: "Expected project to NOT contain file at path $filePath.";
186 186
 
187
-        $this->assertFalse(static::$fs->exists(static::projectDir() . $filePath), $msg);
187
+        $this->assertFalse(static::$fs->exists(static::projectDir().$filePath), $msg);
188 188
     }
189 189
 
190 190
     /**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $outputDir = '/output_test';
197 197
 
198 198
         $msg = $msg ?: "Expected project to have generated file at path $filePath.";
199
-        $this->assertProjectHasFile($outputDir . $filePath, $msg);
199
+        $this->assertProjectHasFile($outputDir.$filePath, $msg);
200 200
     }
201 201
 
202 202
     /**
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
         $outputDir = '/output_test';
210 210
 
211 211
         $msg        = $msg ?: "Expected generated file at path $filePath to have content '$expected'.";
212
-        $fullPath   = static::projectDir() . $outputDir . $filePath;
212
+        $fullPath   = static::projectDir().$outputDir.$filePath;
213 213
         $fileExists = static::$fs->exists($fullPath);
214 214
 
215
-        $this->assertTrue($fileExists, $msg . ' (File Not Found!)');
215
+        $this->assertTrue($fileExists, $msg.' (File Not Found!)');
216 216
 
217 217
         $contents = file_get_contents($fullPath);
218 218
         $this->assertContains($expected, $contents, $msg);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     protected function writeToProjectFile(string $filePath, string $content): void
226 226
     {
227
-        static::$fs->dumpFile(static::projectDir() . $filePath, $content);
227
+        static::$fs->dumpFile(static::projectDir().$filePath, $content);
228 228
     }
229 229
 
230 230
     /**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     protected function crawlGeneratedProjectFile(string $filePath): Crawler
235 235
     {
236
-        return $this->crawlProjectFile('/output_test' . $filePath);
236
+        return $this->crawlProjectFile('/output_test'.$filePath);
237 237
     }
238 238
 
239 239
     /**
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      */
243 243
     protected function crawlProjectFile(string $filePath): Crawler
244 244
     {
245
-        return $this->crawlFile(static::projectDir() . $filePath);
245
+        return $this->crawlFile(static::projectDir().$filePath);
246 246
     }
247 247
 
248 248
     /**
@@ -279,6 +279,6 @@  discard block
 block discarded – undo
279 279
      */
280 280
     protected static function projectDir(): string
281 281
     {
282
-        return __DIR__ . static::PROJECT_DIR;
282
+        return __DIR__.static::PROJECT_DIR;
283 283
     }
284 284
 }
Please login to merge, or discard this patch.
src/Sculpin/Tests/Functional/GenerateFromMarkdownTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /** @test */
10 10
     public function shouldGenerateAnHtmlFileFromMarkdown(): void
11 11
     {
12
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/hello_world.md');
12
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/hello_world.md');
13 13
 
14 14
         $this->executeSculpin('generate');
15 15
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     /** @test */
20 20
     public function shouldGenerateHtmlContentFromMarkdown(): void
21 21
     {
22
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/hello_world.md');
22
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/hello_world.md');
23 23
 
24 24
         $this->executeSculpin('generate');
25 25
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     /** @test */
32 32
     public function shouldGenerateIntoNestedDirectories(): void
33 33
     {
34
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/hello/world.md');
34
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/hello/world.md');
35 35
 
36 36
         $this->executeSculpin('generate');
37 37
 
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
     /** @test */
166 166
     public function shouldPassThruFilesWithNoExtension(): void
167 167
     {
168
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/hello_world');
169
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/hello_world2');
168
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/hello_world');
169
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/hello_world2');
170 170
 
171 171
         $this->executeSculpin('generate');
172 172
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     /** @test */
181 181
     public function shouldSkipContentTypeFilesWithNoExtension(): void
182 182
     {
183
-        $this->addProjectDirectory(__DIR__ . '/Fixture/source/_posts');
183
+        $this->addProjectDirectory(__DIR__.'/Fixture/source/_posts');
184 184
         $this->writeToProjectFile(
185 185
             '/app/config/sculpin_kernel.yml',
186 186
             <<<EOF
@@ -190,14 +190,14 @@  discard block
 block discarded – undo
190 190
 EOF
191 191
         );
192 192
 
193
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/_posts/hello_world');
194
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/_posts/hello_world2');
195
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/_posts/hello_world3.md');
193
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/_posts/hello_world');
194
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/_posts/hello_world2');
195
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/_posts/hello_world3.md');
196 196
 
197 197
         $this->executeSculpin('generate');
198 198
 
199 199
         $actualOutput = implode("\n", $this->executeOutput);
200
-        $this->assertContains('Skipping empty or unknown file: _posts/hello_world' . PHP_EOL, $actualOutput);
200
+        $this->assertContains('Skipping empty or unknown file: _posts/hello_world'.PHP_EOL, $actualOutput);
201 201
         $this->assertContains('Skipping empty or unknown file: _posts/hello_world2', $actualOutput);
202 202
         $this->assertNotContains('Skipping empty or unknown file: _posts/hello_world3.md', $actualOutput);
203 203
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     /** @test */
215 215
     public function shouldSkipHiddenFilesSilently(): void
216 216
     {
217
-        $this->addProjectDirectory(__DIR__ . '/Fixture/source/_posts');
217
+        $this->addProjectDirectory(__DIR__.'/Fixture/source/_posts');
218 218
         $this->writeToProjectFile(
219 219
             '/app/config/sculpin_kernel.yml',
220 220
             <<<EOF
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
         $this->addProjectFile('/source/_posts/.DS_Store');
228 228
         $this->addProjectFile('/source/_posts/.hello_world2.swp');
229
-        $this->copyFixtureToProject(__DIR__ . '/Fixture/source/hello_world.md', '/source/_posts/hello_world3.md');
229
+        $this->copyFixtureToProject(__DIR__.'/Fixture/source/hello_world.md', '/source/_posts/hello_world3.md');
230 230
 
231 231
         $this->executeSculpin('generate');
232 232
 
Please login to merge, or discard this patch.
Sculpin/Contrib/ProxySourceCollection/ProxySourceCollectionDataProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 // Files without a newline after the YAML front matter
98 98
                 // also fall into this category.
99 99
                 if (!$source->canBeFormatted()) {
100
-                    echo 'Skipping empty or unknown file: ' . $source->relativePathname() . PHP_EOL;
100
+                    echo 'Skipping empty or unknown file: '.$source->relativePathname().PHP_EOL;
101 101
 
102 102
                     $source->setShouldBeSkipped();
103 103
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         }
119 119
 
120 120
         if (!$foundAtLeastOne) {
121
-            echo 'Didn\'t find at least one of this type : ' . $this->dataProviderName . PHP_EOL;
121
+            echo 'Didn\'t find at least one of this type : '.$this->dataProviderName.PHP_EOL;
122 122
         }
123 123
 
124 124
         $this->collection->init();
Please login to merge, or discard this patch.