Completed
Push — master ( 4e7200...c701d8 )
by Vladimir
02:43
created
src/allejo/stakx/FrontMatter/FrontMatterParser.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
      *
195 195
      * @param  string $frontMatterKey     The current hierarchy of the Front Matter keys being used
196 196
      * @param  string $expandableValue    The Front Matter value that will be expanded
197
-     * @param  array  $arrayVariableNames The Front Matter variable names that reference arrays
197
+     * @param  string[]  $arrayVariableNames The Front Matter variable names that reference arrays
198 198
      *
199 199
      * @return array
200 200
      *
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,9 @@  discard block
 block discarded – undo
100 100
      */
101 101
     private function handleDateField ()
102 102
     {
103
-        if (!isset($this->frontMatter['date'])) { return; }
103
+        if (!isset($this->frontMatter['date']))
104
+        {
105
+return; }
104 106
 
105 107
         $date = &$this->frontMatter['date'];
106 108
         $itemDate = $this->guessDateTime($date);
@@ -258,7 +260,9 @@  discard block
 block discarded – undo
258 260
 
259 261
             if (is_array($value) || is_bool($value))
260 262
             {
261
-                if ($ignoreArrays) { continue; }
263
+                if ($ignoreArrays)
264
+                {
265
+continue; }
262 266
 
263 267
                 throw new YamlUnsupportedVariableException("Yaml variable `$variable` for `$key` is not a supported data type.");
264 268
             }
@@ -348,6 +352,8 @@  discard block
 block discarded – undo
348 352
         {
349 353
             return (new \DateTime($guess));
350 354
         }
351
-        catch (\Exception $e) { return false; }
355
+        catch (\Exception $e)
356
+        {
357
+return false; }
352 358
     }
353 359
 }
354 360
\ No newline at end of file
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/DataManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /**
33 33
      * Get all of the DataItems and DataSets in this manager
34 34
      *
35
-     * @return array
35
+     * @return string
36 36
      */
37 37
     public function getDataItems ()
38 38
     {
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function parseDataItems ($folders)
66 66
     {
67
-        if ($folders === null) { return; }
67
+        if ($folders === null)
68
+        {
69
+return; }
68 70
 
69 71
         foreach ($folders as $folder)
70 72
         {
@@ -84,7 +86,9 @@  discard block
 block discarded – undo
84 86
      */
85 87
     public function parseDataSets ($dataSets)
86 88
     {
87
-        if ($dataSets === null) { return; }
89
+        if ($dataSets === null)
90
+        {
91
+return; }
88 92
 
89 93
         /**
90 94
          * The information which each DataSet has from the configuration file
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/PageManager.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -90,6 +90,9 @@
 block discarded – undo
90 90
         $this->targetDir = &$folder;
91 91
     }
92 92
 
93
+    /**
94
+     * @param \allejo\stakx\Object\Configuration $configuration
95
+     */
93 96
     public function configureTwig ($configuration, $options)
94 97
     {
95 98
         $this->twigOpts['configuration'] = $configuration;
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,7 +161,9 @@  discard block
 block discarded – undo
161 161
      */
162 162
     public function parsePageViews ($pageViewFolders)
163 163
     {
164
-        if (empty($pageViewFolders)) { return; }
164
+        if (empty($pageViewFolders))
165
+        {
166
+return; }
165 167
 
166 168
         /**
167 169
          * The name of the folder where PageViews are located
@@ -343,7 +345,9 @@  discard block
 block discarded – undo
343 345
      */
344 346
     private function handleTrackableStaticPageView ($pageView)
345 347
     {
346
-        if (empty($pageView['title'])) { return; }
348
+        if (empty($pageView['title']))
349
+        {
350
+return; }
347 351
 
348 352
         $this->addToSiteMenu($pageView);
349 353
         $this->flatPages[$pageView['title']] = $pageView->createJail();
@@ -611,7 +615,9 @@  discard block
 block discarded – undo
611 615
      */
612 616
     private function trackParentTwigTemplate ($template, &$pageView)
613 617
     {
614
-        if (!$this->tracking) { return; }
618
+        if (!$this->tracking)
619
+        {
620
+return; }
615 621
 
616 622
         /** @var Twig_Template $parent */
617 623
         $parent = $template->getParent(array());
Please login to merge, or discard this patch.
src/allejo/stakx/Object/Configuration.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -163,6 +163,9 @@
 block discarded – undo
163 163
         return $this->configuration['twig']['autoescape'];
164 164
     }
165 165
 
166
+    /**
167
+     * @return false|string
168
+     */
166 169
     public function getRedirectTemplate ()
167 170
     {
168 171
         return $this->configuration['templates']['redirect'];
Please login to merge, or discard this patch.
src/allejo/stakx/Object/FrontMatterObject.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@
 block discarded – undo
318 318
     /**
319 319
      * Get the original file path
320 320
      *
321
-     * @return string
321
+     * @return SplFileInfo
322 322
      */
323 323
     final public function getFilePath ()
324 324
     {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -392,7 +392,9 @@
 block discarded – undo
392 392
      */
393 393
     final public function deleteFrontMatter ($key)
394 394
     {
395
-        if (!isset($this->writableFrontMatter[$key])) { return; }
395
+        if (!isset($this->writableFrontMatter[$key]))
396
+        {
397
+return; }
396 398
 
397 399
         unset($this->writableFrontMatter[$key]);
398 400
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Object/Website.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -322,6 +322,9 @@  discard block
 block discarded – undo
322 322
         $this->noClean = $noClean;
323 323
     }
324 324
 
325
+    /**
326
+     * @param string $filePath
327
+     */
325 328
     private function creationWatcher ($filePath)
326 329
     {
327 330
         $this->output->writeln(sprintf("File creation detected: %s", $filePath));
@@ -363,6 +366,9 @@  discard block
 block discarded – undo
363 366
         }
364 367
     }
365 368
 
369
+    /**
370
+     * @param string $filePath
371
+     */
366 372
     private function modificationWatcher ($filePath)
367 373
     {
368 374
         $this->output->writeln(sprintf("File change detected: %s", $filePath));
Please login to merge, or discard this patch.
src/allejo/stakx/System/FileExplorer.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
      * FileExplorer constructor.
64 64
      *
65 65
      * @param \RecursiveIterator $iterator
66
-     * @param array              $excludes
67
-     * @param array              $includes
66
+     * @param string[]              $excludes
67
+     * @param string[]              $includes
68 68
      * @param int|null           $flags
69 69
      */
70 70
     public function __construct(\RecursiveIterator $iterator, array $excludes = array(), array $includes = array(), $flags = null)
Please login to merge, or discard this patch.
Braces   +13 added lines, -4 removed lines patch added patch discarded remove patch
@@ -143,11 +143,17 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function matchesPattern ($filePath)
145 145
     {
146
-        if ($this->strpos_array($filePath, $this->includes)) { return true; }
147
-        if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir()) { return false; }
146
+        if ($this->strpos_array($filePath, $this->includes))
147
+        {
148
+return true; }
149
+        if (($this->flags & self::INCLUDE_ONLY_FILES) && !$this->current()->isDir())
150
+        {
151
+return false; }
148 152
 
149 153
         if (!($this->flags & self::ALLOW_DOT_FILES) &&
150
-            preg_match('#(^|\\\\|\/)\..+(\\\\|\/|$)#', $filePath) === 1) { return false; }
154
+            preg_match('#(^|\\\\|\/)\..+(\\\\|\/|$)#', $filePath) === 1)
155
+        {
156
+return false; }
151 157
 
152 158
         return ($this->strpos_array($filePath, $this->excludes) === false);
153 159
     }
@@ -192,10 +198,13 @@  discard block
 block discarded – undo
192 198
                 return true;
193 199
             }
194 200
 
195
-            if (strpos($haystack, $query, $offset) !== false) // stop on first true result
201
+            if (strpos($haystack, $query, $offset) !== false)
202
+            {
203
+                // stop on first true result
196 204
             {
197 205
                 return true;
198 206
             }
207
+            }
199 208
         }
200 209
 
201 210
         return false;
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/TextExtension.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/allejo/stakx/Utilities/ArrayUtilities.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@
 block discarded – undo
9 9
         foreach ($array as $element)
10 10
         {
11 11
             if (is_array($element))
12
-                return true;
12
+            {
13
+                            return true;
14
+            }
13 15
         }
14 16
 
15 17
         return false;
Please login to merge, or discard this patch.