Completed
Push — master ( 4513c4...1bdcd4 )
by Vladimir
02:30
created
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
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 File|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 File|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.
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(File &$file)
151
+    protected function addFileToTracker(File & $file)
152 152
     {
153 153
         $this->trackedItemsFlattened[$file->getRelativeFilePath()] = &$file;
154 154
     }
155 155
 
156
-    protected function delFileFromTracker(File &$file)
156
+    protected function delFileFromTracker(File & $file)
157 157
     {
158 158
         unset($this->trackedItemsFlattened[$file->getRelativeFilePath()]);
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.
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.
src/allejo/stakx/Command/ContainerAwareCommand.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@
 block discarded – undo
14 14
 {
15 15
     private $container;
16 16
 
17
+    /**
18
+     * @return \Symfony\Component\DependencyInjection\ContainerInterface
19
+     */
17 20
     public function getContainer()
18 21
     {
19 22
         if ($this->container === null)
Please login to merge, or discard this patch.
src/allejo/stakx/Compiler.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -110,6 +110,9 @@  discard block
 block discarded – undo
110 110
     // Twig parent templates
111 111
     ///
112 112
 
113
+    /**
114
+     * @param string $filePath
115
+     */
113 116
     public function isImportDependency($filePath)
114 117
     {
115 118
         return isset($this->importDependencies[$filePath]);
@@ -162,6 +165,9 @@  discard block
 block discarded – undo
162 165
         }
163 166
     }
164 167
 
168
+    /**
169
+     * @param string $filePath
170
+     */
165 171
     public function compileImportDependencies($filePath)
166 172
     {
167 173
         foreach ($this->importDependencies[$filePath] as &$dependent)
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      *
196 196
      * @since 0.1.1
197 197
      */
198
-    public function compilePageView(PageView &$pageView)
198
+    public function compilePageView(PageView & $pageView)
199 199
     {
200 200
         $this->twig->addGlobal('__currentTemplate', $pageView->getAbsoluteFilePath());
201 201
         $this->output->debug('Compiling {type} PageView: {pageview}', array(
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      *
243 243
      * @since 0.1.1
244 244
      */
245
-    private function compileStaticPageView(PageView &$pageView)
245
+    private function compileStaticPageView(PageView & $pageView)
246 246
     {
247 247
         $targetFile = $pageView->getTargetFile();
248 248
         $output = $this->renderStaticPageView($pageView);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      *
259 259
      * @since 0.1.1
260 260
      */
261
-    private function compileDynamicPageViews(DynamicPageView &$pageView)
261
+    private function compileDynamicPageViews(DynamicPageView & $pageView)
262 262
     {
263 263
         $contentItems = $pageView->getRepeatableItems();
264 264
         $template = $this->createTwigTemplate($pageView);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      *
292 292
      * @since 0.1.1
293 293
      */
294
-    private function compileRepeaterPageViews(RepeaterPageView &$pageView)
294
+    private function compileRepeaterPageViews(RepeaterPageView & $pageView)
295 295
     {
296 296
         $pageView->rewindPermalink();
297 297
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
      *
317 317
      * @param ContentItem $contentItem
318 318
      */
319
-    public function compileContentItem(ContentItem &$contentItem)
319
+    public function compileContentItem(ContentItem & $contentItem)
320 320
     {
321 321
         $pageView = &$contentItem->getPageView();
322 322
         $template = $this->createTwigTemplate($pageView);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      *
343 343
      * @since 0.1.1
344 344
      */
345
-    private function compileStandardRedirects(PermalinkDocument &$pageView)
345
+    private function compileStandardRedirects(PermalinkDocument & $pageView)
346 346
     {
347 347
         $redirects = $pageView->getRedirects();
348 348
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
      *
366 366
      * @since 0.1.1
367 367
      */
368
-    private function compileExpandedRedirects(RepeaterPageView &$pageView)
368
+    private function compileExpandedRedirects(RepeaterPageView & $pageView)
369 369
     {
370 370
         $permalinks = $pageView->getRepeaterPermalinks();
371 371
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      *
404 404
      * @return string
405 405
      */
406
-    private function renderRepeaterPageView(Twig_Template &$template, RepeaterPageView &$pageView, ExpandedValue &$expandedValue)
406
+    private function renderRepeaterPageView(Twig_Template & $template, RepeaterPageView & $pageView, ExpandedValue & $expandedValue)
407 407
     {
408 408
         $pageView->setFrontMatter(array(
409 409
             'permalink' => $expandedValue->getEvaluated(),
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
      * @since  0.1.1
427 427
      *
428 428
      */
429
-    private function renderDynamicPageView(Twig_Template &$template, TwigDocument &$twigItem)
429
+    private function renderDynamicPageView(Twig_Template & $template, TwigDocument & $twigItem)
430 430
     {
431 431
         return $template
432 432
             ->render(array(
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
      *
448 448
      * @return string
449 449
      */
450
-    private function renderStaticPageView(PageView &$pageView)
450
+    private function renderStaticPageView(PageView & $pageView)
451 451
     {
452 452
         return $this
453 453
             ->createTwigTemplate($pageView)
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
      *
470 470
      * @return Twig_Template
471 471
      */
472
-    private function createTwigTemplate(PageView &$pageView)
472
+    private function createTwigTemplate(PageView & $pageView)
473 473
     {
474 474
         try
475 475
         {
Please login to merge, or discard this patch.
src/allejo/stakx/Document/ReadableDocument.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     protected $fs;
22 22
 
23 23
     /**
24
-     * @param string $filePath
24
+     * @param File $filePath
25 25
      */
26 26
     public function __construct(File $filePath)
27 27
     {
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/PageManager.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @deprecated Been replaced by getPageViewsFlattened()
87 87
      * @since      0.1.0
88 88
      *
89
-     * @return PageView[][]
89
+     * @return \allejo\stakx\Document\TrackableDocument[]
90 90
      */
91 91
     public function getAllPageViews()
92 92
     {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      *
99 99
      * @since  0.1.1
100 100
      *
101
-     * @return PageView[][]
101
+     * @return \allejo\stakx\Document\TrackableDocument[]
102 102
      */
103 103
     public function &getPageViews()
104 104
     {
Please login to merge, or discard this patch.