Completed
Pull Request — master (#75)
by Vladimir
02:08
created
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 ($dispatcher) {
46
+        return new Server(function (ServerRequestInterface $request) use ($dispatcher)
47
+        {
47 48
             $httpMethod = $request->getMethod();
48 49
             $urlPath = $request->getUri()->getPath();
49 50
 
Please login to merge, or discard this patch.
src/allejo/stakx/Document/DataItem.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,8 @@
 block discarded – undo
170 170
             return call_user_func_array([$this, $fxnCall], []);
171 171
         }
172 172
 
173
-        if (isset($this->data[$offset])) {
173
+        if (isset($this->data[$offset]))
174
+        {
174 175
             return $this->data[$offset];
175 176
         }
176 177
 
Please login to merge, or discard this patch.
src/allejo/stakx/Server/RouteDispatcher.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,8 +36,10 @@  discard block
 block discarded – undo
36 36
      */
37 37
     private function staticPageViewController(StaticPageView $pageView, Compiler $compiler)
38 38
     {
39
-        return function () use ($pageView, $compiler) {
40
-            if ($this->hasBeenTouched($pageView)) {
39
+        return function () use ($pageView, $compiler)
40
+        {
41
+            if ($this->hasBeenTouched($pageView))
42
+            {
41 43
                 $pageView->readContent();
42 44
             }
43 45
 
@@ -61,7 +63,8 @@  discard block
 block discarded – undo
61 63
      */
62 64
     private function dynamicPageViewController(DynamicPageView $pageView, Compiler $compiler)
63 65
     {
64
-        return function (ServerRequestInterface $request) use ($pageView, $compiler) {
66
+        return function (ServerRequestInterface $request) use ($pageView, $compiler)
67
+        {
65 68
             $contentItem = self::getContentItem($pageView, $request->getUri()->getPath());
66 69
 
67 70
             if ($contentItem === null)
@@ -101,7 +104,8 @@  discard block
 block discarded – undo
101 104
                 return $this->dynamicPageViewController($pageView, $compiler);
102 105
 
103 106
             default:
104
-                return function () {
107
+                return function ()
108
+                {
105 109
                     $errMsg = 'This URL type has not yet been implemented.';
106 110
 
107 111
                     return new Response(501, ['Content-Type' => 'text/plain'], $errMsg);
@@ -139,7 +143,8 @@  discard block
 block discarded – undo
139 143
      */
140 144
     public static function create(PageViewRouter $router, Compiler $compiler)
141 145
     {
142
-        return \FastRoute\simpleDispatcher(function (RouteCollector $r) use ($router, $compiler) {
146
+        return \FastRoute\simpleDispatcher(function (RouteCollector $r) use ($router, $compiler)
147
+        {
143 148
             $dispatcher = new RouteDispatcher();
144 149
 
145 150
             foreach ($router->getRouteMapping() as $route => $pageView)
Please login to merge, or discard this patch.