Completed
Branch master (5ee980)
by Vladimir
04:05
created
src/Command/BuildCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
             $output->writeln(sprintf("Your site built successfully! It can be found at: %s",
34 34
                 $this->website->getConfiguration()->getTargetFolder() . DIRECTORY_SEPARATOR
35 35
             ));
36
-        }
37
-        catch (\Exception $e)
36
+        } catch (\Exception $e)
38 37
         {
39 38
             $output->writeln(sprintf("Your website failed to build with the following error: %s",
40 39
                 $e->getMessage()
Please login to merge, or discard this patch.
src/Command/WatchCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
             ));
29 29
 
30 30
             $this->website->watch();
31
-        }
32
-        catch (\Exception $e)
31
+        } catch (\Exception $e)
33 32
         {
34 33
             $output->writeln(sprintf("Your website failed to build with the following error: %s",
35 34
                 $e->getMessage()
Please login to merge, or discard this patch.
src/Manager/PageManager.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,8 +88,7 @@
 block discarded – undo
88 88
                 if ($newPageView->isDynamicPage())
89 89
                 {
90 90
                     $this->dynamicPageViews[] = $newPageView;
91
-                }
92
-                else
91
+                } else
93 92
                 {
94 93
                     $this->addToSiteMenu($newPageView->getFrontMatter());
95 94
                     $this->staticPageViews[] = $newPageView;
Please login to merge, or discard this patch.
src/Manager/DataManager.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@
 block discarded – undo
127 127
             {
128 128
                 $this->handleDependencies($ext);
129 129
                 $dataItems[$name] = $this->$fxnName($content);
130
-            }
131
-            else
130
+            } else
132 131
             {
133 132
                 $this->output->warning("There is no function to handle '$ext' file format.");
134 133
             }
Please login to merge, or discard this patch.
src/Utlities/ArrayUtilities.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,18 +20,15 @@
 block discarded – undo
20 20
                     $valueMerged = true;
21 21
 
22 22
                     break;
23
-                }
24
-                else if ($mergedKey == $key)
23
+                } else if ($mergedKey == $key)
25 24
                 {
26 25
                     if (is_numeric($mergedKey))
27 26
                     {
28 27
                         $merged[] = $value;
29
-                    }
30
-                    else if (is_array($item))
28
+                    } else if (is_array($item))
31 29
                     {
32 30
                         $item = array_unique(array_merge($item, $value));
33
-                    }
34
-                    else
31
+                    } else
35 32
                     {
36 33
                         $item = $value;
37 34
                     }
Please login to merge, or discard this patch.
src/Engines/Markdown/MarkdownEngine.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
             {
25 25
                 $highlighted = $this->highlighter->highlight($language, $block['element']['text']['text']);
26 26
                 $block['element']['text']['text'] = $highlighted->value;
27
-            }
28
-            catch (\DomainException $exception) {}
27
+            } catch (\DomainException $exception) {}
29 28
         }
30 29
 
31 30
         return $block;
Please login to merge, or discard this patch.
src/Object/Website.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -182,8 +182,7 @@  discard block
 block discarded – undo
182 182
             try
183 183
             {
184 184
                 $this->build(false);
185
-            }
186
-            catch (\Exception $e)
185
+            } catch (\Exception $e)
187 186
             {
188 187
                 $this->output->error(sprintf("Your website failed to build with the following error: %s",
189 188
                     $e->getMessage()
@@ -236,8 +235,7 @@  discard block
 block discarded – undo
236 235
         if (count($_paths) > 1 && (in_array($_paths[0], $collectionDirs) || in_array($_paths[0], $pageViewDirs)))
237 236
         {
238 237
 
239
-        }
240
-        else
238
+        } else
241 239
         {
242 240
             $this->copyToCompiledSite($filePath);
243 241
         }
@@ -324,8 +322,7 @@  discard block
 block discarded – undo
324 322
             try
325 323
             {
326 324
                 $loader->addPath($this->fs->absolutePath('_themes', $this->configuration->getTheme()));
327
-            }
328
-            catch (\Twig_Error_Loader $e)
325
+            } catch (\Twig_Error_Loader $e)
329 326
             {
330 327
                 $this->output->error("The following theme could not be loaded: {theme}", array(
331 328
                     "theme" => $theme
@@ -436,8 +433,7 @@  discard block
 block discarded – undo
436 433
         try
437 434
         {
438 435
             $this->outputDirectory->copyFile($filePath, $siteTargetPath);
439
-        }
440
-        catch (\Exception $e)
436
+        } catch (\Exception $e)
441 437
         {
442 438
             $this->output->error($e->getMessage());
443 439
         }
Please login to merge, or discard this patch.
src/Object/Configuration.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
             try
48 48
             {
49 49
                 $this->configuration = Yaml::parse(file_get_contents($configFile));
50
-            }
51
-            catch (ParseException $e)
50
+            } catch (ParseException $e)
52 51
             {
53 52
                 $this->output->error("Parsing the configuration failed: {message}", array(
54 53
                     "message" => $e->getMessage()
@@ -158,8 +157,7 @@  discard block
 block discarded – undo
158 157
         if (is_array($this->configuration))
159 158
         {
160 159
             $this->configuration = ArrayUtilities::array_merge_defaults($defaultConfig, $this->configuration, 'name');
161
-        }
162
-        else
160
+        } else
163 161
         {
164 162
             $this->configuration = $defaultConfig;
165 163
         }
Please login to merge, or discard this patch.
src/Object/ContentItem.php 1 patch
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -177,10 +177,12 @@  discard block
 block discarded – undo
177 177
                     break;
178 178
             }
179 179
 
180
-            if (!is_null($pd)) // No parser needed
180
+            if (!is_null($pd)) {
181
+                // No parser needed
181 182
             {
182 183
                 $this->bodyContent = $pd->parse($this->bodyContent);
183 184
             }
185
+            }
184 186
 
185 187
             $this->bodyContentEvaluated = true;
186 188
         }
@@ -200,8 +202,7 @@  discard block
 block discarded – undo
200 202
         if ($this->frontMatter === null)
201 203
         {
202 204
             $this->frontMatter = array();
203
-        }
204
-        else if (!$this->frontMatterEvaluated && $evaluateYaml && !empty($evaluateYaml))
205
+        } else if (!$this->frontMatterEvaluated && $evaluateYaml && !empty($evaluateYaml))
205 206
         {
206 207
             $this->evaluateYaml($this->frontMatter);
207 208
             $this->frontMatterEvaluated = true;
@@ -274,8 +275,7 @@  discard block
 block discarded – undo
274 275
             if (is_array($yaml[$key]))
275 276
             {
276 277
                 $this->evaluateYaml($yaml[$key]);
277
-            }
278
-            else
278
+            } else
279 279
             {
280 280
                 $yaml[$key] = $this->evaluateYamlVar($value, $this->frontMatter);
281 281
             }
@@ -328,8 +328,7 @@  discard block
 block discarded – undo
328 328
             {
329 329
                 // Coming from a string variable
330 330
                 $itemDate = new \DateTime($this->frontMatter['date']);
331
-            }
332
-            catch (\Exception $e)
331
+            } catch (\Exception $e)
333 332
             {
334 333
                 // YAML has parsed them to Epoch time
335 334
                 $itemDate = \DateTime::createFromFormat('U', $this->frontMatter['date']);
Please login to merge, or discard this patch.