Completed
Push — master ( 6f7385...80d5dd )
by Vladimir
01:57
created
src/allejo/stakx/Manager/PageManager.php 1 patch
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     /**
65 65
      * Give this manager the collections we'll be using for dynamic PageViews.
66 66
      *
67
-     * @param ContentItem[][] $collections
67
+     * @param \allejo\stakx\Document\TrackableDocument[] $collections
68 68
      *
69 69
      * @since 0.1.0
70 70
      */
@@ -73,6 +73,9 @@  discard block
 block discarded – undo
73 73
         $this->collections = &$collections;
74 74
     }
75 75
 
76
+    /**
77
+     * @param \allejo\stakx\Document\TrackableDocument[] $datasets
78
+     */
76 79
     public function setDatasets($datasets)
77 80
     {
78 81
         $this->datasets = $datasets;
@@ -86,7 +89,7 @@  discard block
 block discarded – undo
86 89
      * @deprecated Been replaced by getPageViewsFlattened()
87 90
      * @since      0.1.0
88 91
      *
89
-     * @return PageView[][]
92
+     * @return \allejo\stakx\Document\TrackableDocument[]
90 93
      */
91 94
     public function getAllPageViews()
92 95
     {
@@ -98,7 +101,7 @@  discard block
 block discarded – undo
98 101
      *
99 102
      * @since  0.1.1
100 103
      *
101
-     * @return PageView[][]
104
+     * @return \allejo\stakx\Document\TrackableDocument[]
102 105
      */
103 106
     public function &getPageViews()
104 107
     {
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/BaseUrlFunction.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -32,6 +32,9 @@
 block discarded – undo
32 32
         ));
33 33
     }
34 34
 
35
+    /**
36
+     * @param boolean $absolute
37
+     */
35 38
     private function getUrl($absolute)
36 39
     {
37 40
         $url = '/';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,6 +95,6 @@
 block discarded – undo
95 95
             }
96 96
         }
97 97
 
98
-        return preg_replace('#(?<!:)/+#','/', join('/', $paths));
98
+        return preg_replace('#(?<!:)/+#', '/', join('/', $paths));
99 99
     }
100 100
 }
Please login to merge, or discard this patch.
src/allejo/stakx/Document/RepeatableItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,5 +46,5 @@
 block discarded – undo
46 46
      *
47 47
      * @return void
48 48
      */
49
-    public function setParentPageView(PageView &$pageView);
49
+    public function setParentPageView(PageView & $pageView);
50 50
 }
Please login to merge, or discard this patch.
src/allejo/stakx/Document/DataItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     /**
103 103
      * {@inheritdoc}
104 104
      */
105
-    public function setParentPageView(PageView &$pageView)
105
+    public function setParentPageView(PageView & $pageView)
106 106
     {
107 107
         $this->pageView = &$pageView;
108 108
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Document/DynamicPageView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @param RepeatableItem $repeatableItem
42 42
      */
43
-    public function addRepeatableItem(RepeatableItem &$repeatableItem)
43
+    public function addRepeatableItem(RepeatableItem & $repeatableItem)
44 44
     {
45 45
         $this->repeatableItems[$repeatableItem->getObjectName()] = &$repeatableItem;
46 46
         $repeatableItem->setParentPageView($this);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @param RepeatableItem $repeatableItem
53 53
      */
54
-    public function delRepeatableItem(RepeatableItem &$repeatableItem)
54
+    public function delRepeatableItem(RepeatableItem & $repeatableItem)
55 55
     {
56 56
         unset($this->repeatableItems[$repeatableItem->getObjectName()]);
57 57
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Document/ContentItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
      *
125 125
      * @param PageView $pageView
126 126
      */
127
-    public function setParentPageView(PageView &$pageView)
127
+    public function setParentPageView(PageView & $pageView)
128 128
     {
129 129
         $this->parentPageView = &$pageView;
130 130
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/TrackingManager.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -148,12 +148,12 @@  discard block
 block discarded – undo
148 148
     // Internal object handling
149 149
     ///
150 150
 
151
-    protected function addFileToTracker(SplFileInfo &$file)
151
+    protected function addFileToTracker(SplFileInfo & $file)
152 152
     {
153 153
         $this->trackedItemsFlattened[$file->getRelativePathname()] = &$file;
154 154
     }
155 155
 
156
-    protected function delFileFromTracker(SplFileInfo &$file)
156
+    protected function delFileFromTracker(SplFileInfo & $file)
157 157
     {
158 158
         unset($this->trackedItemsFlattened[$file->getRelativePathname()]);
159 159
     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * @param TrackableDocument $trackedItem
165 165
      * @param string|null       $namespace
166 166
      */
167
-    protected function addObjectToTracker(TrackableDocument &$trackedItem, $namespace = null)
167
+    protected function addObjectToTracker(TrackableDocument & $trackedItem, $namespace = null)
168 168
     {
169 169
         if ($namespace == null)
170 170
         {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @param TrackableDocument $trackedItem
185 185
      * @param string|null       $namespace
186 186
      */
187
-    protected function delObjectFromTracker(TrackableDocument &$trackedItem, $namespace = null)
187
+    protected function delObjectFromTracker(TrackableDocument & $trackedItem, $namespace = null)
188 188
     {
189 189
         if ($namespace == null)
190 190
         {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -300,7 +300,9 @@
 block discarded – undo
300 300
          */
301 301
         foreach ($elements as &$item)
302 302
         {
303
-            if (!Service::getParameter(BuildableCommand::USE_DRAFTS) && $item->isDraft()) { continue; }
303
+            if (!Service::getParameter(BuildableCommand::USE_DRAFTS) && $item->isDraft())
304
+            {
305
+continue; }
304 306
 
305 307
             if (empty($item->getNamespace()))
306 308
             {
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
     }
89 89
 
90 90
     /**
91
-     * @param SplFileInfo|string $filePath
91
+     * @param string $filePath
92 92
      *
93
-     * @return mixed|null
93
+     * @return PageView
94 94
      */
95 95
     public function createNewItem($filePath)
96 96
     {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     /**
136 136
      * Update the contents of a specified file.
137 137
      *
138
-     * @param SplFileInfo|string $filePath The relative path of the file
138
+     * @param string $filePath The relative path of the file
139 139
      *
140 140
      * @return PageView
141 141
      */
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     /**
287 287
      * Return an array of JailedDocuments created from the tracked items
288 288
      *
289
-     * @param array $elements
289
+     * @param TrackableDocument[] $elements
290 290
      *
291 291
      * @return JailedDocument[]|JailedDocument[][]
292 292
      */
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/TableOfContentsFilter.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,14 +55,20 @@
 block discarded – undo
55 55
 
56 56
             $headingID = $heading->attributes->getNamedItem('id');
57 57
 
58
-            if ($curr > $last) // If the current level is greater than the last level indent one level
58
+            if ($curr > $last)
59
+            {
60
+                // If the current level is greater than the last level indent one level
59 61
             {
60 62
                 $toc .= '<ul>';
61 63
             }
62
-            elseif ($curr < $last) // If the current level is less than the last level go up appropriate amount.
64
+            }
65
+            elseif ($curr < $last)
66
+            {
67
+                // If the current level is less than the last level go up appropriate amount.
63 68
             {
64 69
                 $toc .= str_repeat('</li></ul>', $last - $curr) . '</li>';
65 70
             }
71
+            }
66 72
             else // If the current level is equal to the last.
67 73
             {
68 74
                 $toc .= '</li>';
Please login to merge, or discard this patch.