Completed
Branch master (5ee980)
by Vladimir
04:05
created
src/Object/Configuration.php 2 patches
Doc Comments   +10 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * Configuration constructor.
35 35
      *
36 36
      * @param string                                $configFile
37
-     * @param ConsoleInterface|OutputInterface|null $output
37
+     * @param ConsoleInterface $output
38 38
      */
39 39
     public function __construct($configFile, $output = null)
40 40
     {
@@ -83,11 +83,17 @@  discard block
 block discarded – undo
83 83
         return $base;
84 84
     }
85 85
 
86
+    /**
87
+     * @return string[]
88
+     */
86 89
     public function getDataFolders ()
87 90
     {
88 91
         return $this->returnConfigOption('data');
89 92
     }
90 93
 
94
+    /**
95
+     * @return string[]
96
+     */
91 97
     public function getDataSets ()
92 98
     {
93 99
         return $this->returnConfigOption('datasets');
@@ -133,6 +139,9 @@  discard block
 block discarded – undo
133 139
         return $this->configuration['twig']['autoescape'];
134 140
     }
135 141
 
142
+    /**
143
+     * @param string $name
144
+     */
136 145
     private function returnConfigOption ($name, $default = null)
137 146
     {
138 147
         return (isset($this->configuration[$name]) ? $this->configuration[$name] : $default);
Please login to merge, or discard this 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/System/FileSystem.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -140,6 +140,9 @@
 block discarded – undo
140 140
         return pathinfo($filename, PATHINFO_EXTENSION);
141 141
     }
142 142
 
143
+    /**
144
+     * @param string $folderPath
145
+     */
143 146
     public function isDir ($folderPath)
144 147
     {
145 148
         return is_dir($folderPath);
Please login to merge, or discard this patch.
src/System/Folder.php 2 patches
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -62,6 +62,10 @@  discard block
 block discarded – undo
62 62
         }
63 63
     }
64 64
 
65
+    /**
66
+     * @param string $absolutePath
67
+     * @param string $targetPath
68
+     */
65 69
     public function copyFile ($absolutePath, $targetPath)
66 70
     {
67 71
         $targetPath = ltrim($targetPath, DIRECTORY_SEPARATOR);
@@ -73,6 +77,10 @@  discard block
 block discarded – undo
73 77
         );
74 78
     }
75 79
 
80
+    /**
81
+     * @param string $targetPath
82
+     * @param string $fileContent
83
+     */
76 84
     public function writeFile ($targetPath, $fileContent)
77 85
     {
78 86
         $outputFolder   = $this->fs->getFolderPath($targetPath);
@@ -98,6 +106,9 @@  discard block
 block discarded – undo
98 106
         ));
99 107
     }
100 108
 
109
+    /**
110
+     * @param string $pathFragments
111
+     */
101 112
     private function buildPath ($pathFragments)
102 113
     {
103 114
         $paths = func_get_args();
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
         if (substr($folderPath, 0, 1) === DIRECTORY_SEPARATOR)
26 26
         {
27 27
             $this->absolutePath = $folderPath;
28
-        }
29
-        else
28
+        } else
30 29
         {
31 30
             $this->absolutePath = $this->fs->absolutePath($folderPath);
32 31
         }
@@ -55,8 +54,7 @@  discard block
 block discarded – undo
55 54
         if (is_null($folderName) || empty($folderName))
56 55
         {
57 56
             $this->targetDirectories = array();
58
-        }
59
-        else
57
+        } else
60 58
         {
61 59
             $this->targetDirectories[] = trim($folderName, DIRECTORY_SEPARATOR);
62 60
         }
Please login to merge, or discard this patch.
src/Twig/TextFilter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /**
16 16
      * Returns a list of filters.
17 17
      *
18
-     * @return array
18
+     * @return Twig_SimpleFilter[]
19 19
      */
20 20
     public function getFilters()
21 21
     {
Please login to merge, or discard this patch.
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.