Completed
Pull Request — master (#99)
by Vladimir
02:09
created
src/allejo/stakx/Server/RouteMapper.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
     /**
101 101
      * Retrieve all of the URL routes registered.
102 102
      *
103
-     * @return string[]
103
+     * @return integer[]
104 104
      */
105 105
     public function getRoutes()
106 106
     {
Please login to merge, or discard this patch.
src/allejo/stakx/Server/Controller.php 1 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/Server/WebServer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,8 @@
 block discarded – undo
60 60
     {
61 61
         $routes = Controller::create($routeMapper, $compiler);
62 62
 
63
-        return new Server(function (ServerRequestInterface $request) use ($routes, $compiler) {
63
+        return new Server(function (ServerRequestInterface $request) use ($routes, $compiler)
64
+        {
64 65
             $httpMethod = $request->getMethod();
65 66
             $urlPath = Controller::normalizeUrl($request->getUri()->getPath());
66 67
 
Please login to merge, or discard this patch.