Completed
Pull Request — master (#75)
by Vladimir
02:23
created
src/allejo/stakx/MarkupEngine/MarkdownEngine.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             try
72 72
             {
73 73
                 $highlighted = $this->highlighter->highlight($language, $block['element']['text']['text']);
74
-                $block['markup'] = "<pre><code class=\"hljs ${cssClass}\">" . $highlighted->value . '</code></pre>';
74
+                $block['markup'] = "<pre><code class=\"hljs ${cssclass}\">" . $highlighted->value . '</code></pre>';
75 75
 
76 76
                 // Only return the block if Highlighter knew the language and how to handle it.
77 77
                 return $block;
Please login to merge, or discard this patch.
src/allejo/stakx/Server/RouteDispatcher.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,6 +152,9 @@  discard block
 block discarded – undo
152 152
         });
153 153
     }
154 154
 
155
+    /**
156
+     * @param string $url
157
+     */
155 158
     public static function normalizeUrl($url)
156 159
     {
157 160
         return str_replace(self::$baseUrl, '/', $url);
@@ -163,7 +166,7 @@  discard block
 block discarded – undo
163 166
      * @param DynamicPageView $pageView
164 167
      * @param                 $permalink
165 168
      *
166
-     * @return CollectableItem|ReadableDocument|TemplateReadyDocument|null
169
+     * @return CollectableItem|null
167 170
      */
168 171
     private static function getContentItem(DynamicPageView $pageView, $permalink)
169 172
     {
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,10 +38,12 @@  discard block
 block discarded – undo
38 38
      */
39 39
     private function staticPageViewController(StaticPageView $pageView, Compiler $compiler)
40 40
     {
41
-        return function () use ($pageView, $compiler) {
41
+        return function () use ($pageView, $compiler)
42
+        {
42 43
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
43 44
 
44
-            if ($this->hasBeenTouched($pageView)) {
45
+            if ($this->hasBeenTouched($pageView))
46
+            {
45 47
                 $pageView->readContent();
46 48
             }
47 49
 
@@ -65,7 +67,8 @@  discard block
 block discarded – undo
65 67
      */
66 68
     private function dynamicPageViewController(DynamicPageView $pageView, Compiler $compiler)
67 69
     {
68
-        return function (ServerRequestInterface $request) use ($pageView, $compiler) {
70
+        return function (ServerRequestInterface $request) use ($pageView, $compiler)
71
+        {
69 72
             Service::setOption('currentTemplate', $pageView->getAbsoluteFilePath());
70 73
 
71 74
             $contentItem = self::getContentItem($pageView, self::normalizeUrl($request->getUri()->getPath()));
@@ -107,7 +110,8 @@  discard block
 block discarded – undo
107 110
                 return $this->dynamicPageViewController($pageView, $compiler);
108 111
 
109 112
             default:
110
-                return function () {
113
+                return function ()
114
+                {
111 115
                     $errMsg = 'This URL type has not yet been implemented.';
112 116
 
113 117
                     return new Response(501, ['Content-Type' => 'text/plain'], $errMsg);
@@ -147,7 +151,8 @@  discard block
 block discarded – undo
147 151
     {
148 152
         self::$baseUrl = $router->getBaseUrl();
149 153
 
150
-        return \FastRoute\simpleDispatcher(function (RouteCollector $r) use ($router, $compiler) {
154
+        return \FastRoute\simpleDispatcher(function (RouteCollector $r) use ($router, $compiler)
155
+        {
151 156
             $dispatcher = new RouteDispatcher();
152 157
 
153 158
             foreach ($router->getRouteMapping() as $route => $pageView)
Please login to merge, or discard this patch.
src/allejo/stakx/Server/DevServer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@
 block discarded – undo
43 43
     {
44 44
         $dispatcher = RouteDispatcher::create($router, $compiler);
45 45
 
46
-        return new Server(function (ServerRequestInterface $request) use ($router, $dispatcher) {
46
+        return new Server(function (ServerRequestInterface $request) use ($router, $dispatcher)
47
+        {
47 48
             $httpMethod = $request->getMethod();
48 49
             $urlPath = RouteDispatcher::normalizeUrl($request->getUri()->getPath());
49 50
 
Please login to merge, or discard this patch.