Completed
Push — master ( 0ffa26...ca3451 )
by Vladimir
02:21
created
src/Manager/DataManager.php 2 patches
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.
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.
src/Object/ContentItem.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,10 +177,13 @@
 block discarded – undo
177 177
                     break;
178 178
             }
179 179
 
180
-            if (!is_null($pd)) // No parser needed
180
+            if (!is_null($pd))
181
+            {
182
+                // No parser needed
181 183
             {
182 184
                 $this->bodyContent = $pd->parse($this->bodyContent);
183 185
             }
186
+            }
184 187
 
185 188
             $this->bodyContentEvaluated = true;
186 189
         }
Please login to merge, or discard this patch.
src/System/FileSystem.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,9 @@
 block discarded – undo
76 76
             while (false !== $entry = $dir->read())
77 77
             {
78 78
                 // Skip pointers
79
-                if ($entry == '.' || $entry == '..') { continue; }
79
+                if ($entry == '.' || $entry == '..')
80
+                {
81
+continue; }
80 82
 
81 83
                 $this->copy("$originFile/$entry", "$targetFile/$entry", true);
82 84
             }
Please login to merge, or discard this patch.
src/Core/StakxLogger.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function log ($level, $message, array $context = array())
95 95
     {
96
-        if (!isset($this->verbosityLevelMap[$level])) {
96
+        if (!isset($this->verbosityLevelMap[$level]))
97
+        {
97 98
             throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level));
98 99
         }
99 100
 
@@ -144,8 +145,10 @@  discard block
 block discarded – undo
144 145
     {
145 146
         // build a replacement array with braces around the context keys
146 147
         $replace = array();
147
-        foreach ($context as $key => $val) {
148
-            if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) {
148
+        foreach ($context as $key => $val)
149
+        {
150
+            if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString')))
151
+            {
149 152
                 $replace[sprintf('{%s}', $key)] = $val;
150 153
             }
151 154
         }
Please login to merge, or discard this patch.
src/Utlities/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.
src/System/FileExplorer.php 2 patches
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.
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.
src/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   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -522,7 +522,9 @@  discard block
 block discarded – undo
522 522
      */
523 523
     final public function deleteFrontMatter ($key)
524 524
     {
525
-        if (!isset($this->writableFrontMatter[$key])) { return; }
525
+        if (!isset($this->writableFrontMatter[$key]))
526
+        {
527
+return; }
526 528
 
527 529
         unset($this->writableFrontMatter[$key]);
528 530
     }
@@ -593,7 +595,9 @@  discard block
 block discarded – undo
593 595
     public function offsetExists ($offset)
594 596
     {
595 597
         if ($this->isMagicGet($offset))
596
-            return true;
598
+        {
599
+                    return true;
600
+        }
597 601
 
598 602
         $fxnCall = 'get' . ucfirst($offset);
599 603
         return method_exists($this, $fxnCall) && in_array($fxnCall, static::$whiteListFunctions);
Please login to merge, or discard this patch.
src/Engines/FrontMatter/FrontMatterParser.php 1 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
 
@@ -119,7 +121,9 @@  discard block
 block discarded – undo
119 121
             {
120 122
                 $itemDate = new \DateTime($date);
121 123
             }
122
-            catch (\Exception $e) { return; }
124
+            catch (\Exception $e)
125
+            {
126
+return; }
123 127
         }
124 128
 
125 129
         if (!$itemDate === false)
@@ -271,7 +275,9 @@  discard block
 block discarded – undo
271 275
 
272 276
             if (is_array($value) || is_bool($value))
273 277
             {
274
-                if ($ignoreArrays) { continue; }
278
+                if ($ignoreArrays)
279
+                {
280
+continue; }
275 281
 
276 282
                 throw new YamlUnsupportedVariableException("Yaml variable `$variable` for `$key` is not a supported data type.");
277 283
             }
Please login to merge, or discard this patch.
src/Manager/PageManager.php 2 patches
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,7 +72,9 @@  discard block
 block discarded – undo
72 72
 
73 73
     public function setCollections (&$collections)
74 74
     {
75
-        if (empty($collections)) { return; }
75
+        if (empty($collections))
76
+        {
77
+return; }
76 78
 
77 79
         $this->collections = &$collections;
78 80
     }
@@ -123,7 +125,8 @@  discard block
 block discarded – undo
123 125
     {
124 126
         static $jailedMenu = array();
125 127
 
126
-        if (!empty($jailedMenu)) {
128
+        if (!empty($jailedMenu))
129
+        {
127 130
             return $jailedMenu;
128 131
         }
129 132
 
@@ -143,7 +146,9 @@  discard block
 block discarded – undo
143 146
      */
144 147
     public function parsePageViews ($pageViewFolders)
145 148
     {
146
-        if (empty($pageViewFolders)) { return; }
149
+        if (empty($pageViewFolders))
150
+        {
151
+return; }
147 152
 
148 153
         /**
149 154
          * The name of the folder where PageViews are located
@@ -303,7 +308,8 @@  discard block
 block discarded – undo
303 308
         {
304 309
             $this->addToSiteMenu($pageView);
305 310
 
306
-            if (!empty($pageView->title)) {
311
+            if (!empty($pageView->title))
312
+            {
307 313
                 $this->flatPages[$pageView->title] = $pageView->createJail();
308 314
             }
309 315
         }
@@ -550,7 +556,9 @@  discard block
 block discarded – undo
550 556
      */
551 557
     private function trackParentTwigTemplate ($template, &$pageView)
552 558
     {
553
-        if (!$this->tracking) { return; }
559
+        if (!$this->tracking)
560
+        {
561
+return; }
554 562
 
555 563
         /** @var Twig_Template $parent */
556 564
         $parent = $template->getParent(array());
Please login to merge, or discard this patch.
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.