Completed
Push — develop ( 667cd2...043012 )
by Vladimir
01:48
created
src/allejo/stakx/Manager/CollectionManager.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,8 @@
 block discarded – undo
105 105
      */
106 106
     public function getJailedCollections()
107 107
     {
108
-        return self::getJailedTrackedItems($this->trackedItemsFlattened, function ($contentItem) {
108
+        return self::getJailedTrackedItems($this->trackedItemsFlattened, function ($contentItem)
109
+        {
109 110
             return $contentItem['basename'];
110 111
         });
111 112
     }
Please login to merge, or discard this patch.
src/allejo/stakx/Document/BasePageView.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     /**
41 41
      * Create the appropriate object type when parsing a PageView.
42 42
      *
43
-     * @return DynamicPageView|StaticPageView|RepeaterPageView
43
+     * @return BasePageView
44 44
      */
45 45
     public static function create(File $filePath, array $complexVariables = [])
46 46
     {
Please login to merge, or discard this patch.
tests/allejo/stakx/Test/PHPUnit_Stakx_TestCase.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     }
260 260
 
261 261
     /**
262
-     * @return Configuration|\PHPUnit_Framework_MockObject_MockObject
262
+     * @return Configuration
263 263
      */
264 264
     protected function getMockConfiguration()
265 265
     {
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     /**
378 378
      * Get a mock EventDispatcher.
379 379
      *
380
-     * @return EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject
380
+     * @return EventDispatcherInterface
381 381
      */
382 382
     protected function getMockEventDistpatcher()
383 383
     {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     /**
388 388
      * Get a mock logger.
389 389
      *
390
-     * @return LoggerInterface|\PHPUnit_Framework_MockObject_MockObject
390
+     * @return LoggerInterface
391 391
      */
392 392
     protected function getMockLogger()
393 393
     {
Please login to merge, or discard this patch.
src/allejo/stakx/AssetEngine/Sass/SourceMapGenerator.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -27,6 +27,9 @@
 block discarded – undo
27 27
         $this->generatorOptions = $options;
28 28
     }
29 29
 
30
+    /**
31
+     * @return string
32
+     */
30 33
     public function getSourceMapContents()
31 34
     {
32 35
         return $this->sourceMapContent;
Please login to merge, or discard this patch.
src/allejo/stakx/Service.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -13,11 +13,18 @@  discard block
 block discarded – undo
13 13
     protected static $runTimeStatus;
14 14
     protected static $options;
15 15
 
16
+    /**
17
+     * @param string $key
18
+     * @param string $value
19
+     */
16 20
     public static function setOption($key, $value)
17 21
     {
18 22
         self::$options[$key] = $value;
19 23
     }
20 24
 
25
+    /**
26
+     * @param string $key
27
+     */
21 28
     public static function getOption($key)
22 29
     {
23 30
         return isset(self::$options[$key]) ? self::$options[$key] : null;
@@ -48,6 +55,9 @@  discard block
 block discarded – undo
48 55
         return self::$workingDirectory;
49 56
     }
50 57
 
58
+    /**
59
+     * @param \string|null $directory
60
+     */
51 61
     public static function setWorkingDirectory($directory)
52 62
     {
53 63
         self::$workingDirectory = $directory;
Please login to merge, or discard this patch.
src/allejo/stakx/AssetEngine/Sass/SassEngine.php 3 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,8 +167,8 @@
 block discarded – undo
167 167
     {
168 168
         if (($themeName = $this->configuration->getTheme()))
169 169
         {
170
-            $themePath = "../_themes/${themeName}/_sass";
171
-            $content = preg_replace("/(@import ['\"])(@theme)(.+)/", "$1${themePath}$3", $content);
170
+            $themePath = "../_themes/${themename}/_sass";
171
+            $content = preg_replace("/(@import ['\"])(@theme)(.+)/", "$1${themepath}$3", $content);
172 172
         }
173 173
     }
174 174
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -211,6 +211,9 @@
 block discarded – undo
211 211
         $this->configureSourceMap();
212 212
     }
213 213
 
214
+    /**
215
+     * @param string $content
216
+     */
214 217
     private function handleThemeImports(&$content)
215 218
     {
216 219
         if (($themeName = $this->configuration->getTheme()))
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
         if ($this->cacheDirectory)
200 200
         {
201 201
             $cacheOptions = [
202
-                'cacheDir' => (string) $this->cacheDirectory->getFilesystemPath(),
202
+                'cacheDir' => (string)$this->cacheDirectory->getFilesystemPath(),
203 203
                 'forceRefresh' => false,
204 204
             ];
205 205
         }
Please login to merge, or discard this patch.
src/allejo/stakx/Server/Controller.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      *
207 207
      * @param string $url
208 208
      *
209
-     * @return mixed
209
+     * @return string
210 210
      */
211 211
     public static function normalizeUrl($url)
212 212
     {
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
      * Find a ContentItem from a Dynamic PageView or null if it doesn't exist.
218 218
      *
219 219
      * @param DynamicPageView $pageView
220
-     * @param                 $permalink
220
+     * @param                 string $permalink
221 221
      *
222
-     * @return CollectableItem|ReadableDocument|TemplateReadyDocument|null
222
+     * @return CollectableItem|null
223 223
      */
224 224
     private static function getContentItem(DynamicPageView $pageView, $permalink)
225 225
     {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      * Find the ExpandedValue from a Repeater PageView or null if it doesn't exist.
241 241
      *
242 242
      * @param RepeaterPageView $pageView
243
-     * @param                  $permalink
243
+     * @param                  string $permalink
244 244
      *
245 245
      * @return ExpandedValue|null
246 246
      */
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@  discard block
 block discarded – undo
45 45
      */
46 46
     private function staticPageViewAction(StaticPageView $pageView, Compiler $compiler)
47 47
     {
48
-        return function () use ($pageView, $compiler) {
48
+        return function () use ($pageView, $compiler)
49
+        {
49 50
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
50 51
 
51 52
             $compiler->getTemplateBridge()->clearTemplateCache();
@@ -75,7 +76,8 @@  discard block
 block discarded – undo
75 76
      */
76 77
     private function dynamicPageViewAction(DynamicPageView $pageView, Compiler $compiler)
77 78
     {
78
-        return function (ServerRequestInterface $request) use ($pageView, $compiler) {
79
+        return function (ServerRequestInterface $request) use ($pageView, $compiler)
80
+        {
79 81
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
80 82
 
81 83
             $compiler->getTemplateBridge()->clearTemplateCache();
@@ -111,7 +113,8 @@  discard block
 block discarded – undo
111 113
      */
112 114
     private function repeaterPageViewAction(RepeaterPageView $pageView, Compiler $compiler)
113 115
     {
114
-        return function (ServerRequestInterface $request) use ($pageView, $compiler) {
116
+        return function (ServerRequestInterface $request) use ($pageView, $compiler)
117
+        {
115 118
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
116 119
 
117 120
             $compiler->getTemplateBridge()->clearTemplateCache();
@@ -154,7 +157,8 @@  discard block
 block discarded – undo
154 157
                 return $this->repeaterPageViewAction($pageView, $compiler);
155 158
 
156 159
             default:
157
-                return function () {
160
+                return function ()
161
+                {
158 162
                     $errMsg = 'This URL type has not yet been implemented.';
159 163
 
160 164
                     return new Response(501, ['Content-Type' => 'text/plain'], $errMsg);
@@ -171,7 +175,8 @@  discard block
 block discarded – undo
171 175
      */
172 176
     private function createRedirectAction($to)
173 177
     {
174
-        return function () use ($to) {
178
+        return function () use ($to)
179
+        {
175 180
             return new Response(302, [
176 181
                 'Location' => $to,
177 182
             ]);
Please login to merge, or discard this patch.
src/allejo/stakx/Utilities/HtmlUtils.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -9,6 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 abstract class HtmlUtils
11 11
 {
12
+    /**
13
+     * @param string $xpathQuery
14
+     */
12 15
     public static function htmlXPath(\DOMDocument &$DOMDocument, $html, $xpathQuery)
13 16
     {
14 17
         $html = self::normalizeHTML($html);
@@ -38,6 +41,9 @@  discard block
 block discarded – undo
38 41
         return $xpath->query($xpathQuery);
39 42
     }
40 43
 
44
+    /**
45
+     * @return string
46
+     */
41 47
     private static function normalizeHTML($html)
42 48
     {
43 49
         if (strpos($html, '<body>') === false || strpos($html, '</body>') === false)
Please login to merge, or discard this patch.
src/allejo/stakx/Server/MimeDetector.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -783,6 +783,9 @@
 block discarded – undo
783 783
         'zmm' => 'application/vnd.handheld-entertainment+xml',
784 784
     ];
785 785
 
786
+    /**
787
+     * @return \allejo\stakx\Document\StaticPageView
788
+     */
786 789
     public static function getMimeType($extension)
787 790
     {
788 791
         return isset(self::$mimes[$extension]) ? self::$mimes[$extension] : null;
Please login to merge, or discard this patch.