Completed
Push — master ( d47983...d9cc9d )
by Markus
03:49
created
vendor/anax/mvc/webroot/dice.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 // Prepare the page content
43 43
 
44 44
 $app->theme->addStylesheet("css/dice.css")
45
-           ->setVariable('title', "Throw a dice")
46
-           ->setVariable('main', "
45
+            ->setVariable('title', "Throw a dice")
46
+            ->setVariable('main', "
47 47
     <h1>Throw a dice</h1>
48 48
     <p>This is a sample pagecontroller showing how to use <i>application specific modules</i> in a pagecontroller.</p>
49 49
     <p>How many rolls do you want to do, <a href='?roll=1'>1 roll</a>, <a href='?roll=3'>3 rolls</a> or <a href='?roll=6'>6 rolls</a>? </p>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  */
6 6
 
7 7
 // Get environment & autoloader.
8
-require __DIR__.'/config_with_app.php'; 
8
+require __DIR__ . '/config_with_app.php'; 
9 9
 
10 10
 
11 11
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     ? $_GET['roll'] 
18 18
     : 0;
19 19
 
20
-if($roll > 100) {
20
+if ($roll > 100) {
21 21
     throw new Exception("To many rolls on the dice. Not allowed.");
22 22
 }
23 23
 
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 
26 26
 // Make roll and prepare reply
27 27
 $html = null;
28
-if($roll) {
28
+if ($roll) {
29 29
     $dice->roll($roll);
30 30
 
31 31
     $html = "<p>You made {$roll} roll(s) and you got this serie.</p>\n<ul class='dice'>";
32
-    foreach($dice->getResults() as $val) {
32
+    foreach ($dice->getResults() as $val) {
33 33
         $html .= "\n<li class='dice-{$val}'></li>";
34 34
     }
35 35
     $html .= "\n</ul>\n";
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/test/add-views-using-forward.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
  */
6 6
 
7 7
 // Get environment & autoloader.
8
-require __DIR__.'/../config.php';
8
+require __DIR__ . '/../config.php';
9 9
 
10 10
 // Create services and inject into the app. 
11 11
 $di  = new \Anax\DI\CDIFactoryTest();
12 12
 $app = new \Anax\Kernel\CAnax($di);
13 13
 
14 14
 
15
-$di->set('TestController', function () use ($di) {
15
+$di->set('TestController', function() use ($di) {
16 16
     $controller = new TestController();
17 17
     $controller->setDI($di);
18 18
     return $controller;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 
74 74
 
75
-$app->router->add('', function () use ($app) {
75
+$app->router->add('', function() use ($app) {
76 76
 
77 77
     $app->dispatcher->forward(['controller' => 'test']);
78 78
 });
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/test/create-urls.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  */
6 6
 
7 7
 // Get environment & autoloader.
8
-require __DIR__.'/../config.php';
8
+require __DIR__ . '/../config.php';
9 9
 
10 10
 
11 11
 // Create services and inject into the app. 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 
17 17
 // Create the home route
18
-$app->router->add('*', function () use ($app) {
18
+$app->router->add('*', function() use ($app) {
19 19
 
20 20
     $app->theme->setTitle("Creating urls");
21 21
     $app->views->add('default/page', [
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/test/di-loaded-services.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
  */
6 6
 
7 7
 // Get environment & autoloader.
8
-require __DIR__.'/../config.php';
8
+require __DIR__ . '/../config.php';
9 9
 
10 10
 // Create services and inject into the app. 
11 11
 $di  = new \Anax\DI\CDIFactoryTest();
12 12
 $app = new \Anax\Kernel\CAnax($di);
13 13
 
14 14
 
15
-$app->router->add('', function () use ($app, $di) {
15
+$app->router->add('', function() use ($app, $di) {
16 16
 
17 17
     $html  = "<pre>" . print_r($di->getServices(), true) . "</pre>";
18 18
     $html .= "<h2>These services are active</h2>";
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/test/exception-as-http-error-page.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  */
6 6
 // Get environment & autoloader.
7
-require __DIR__.'/../config.php';
7
+require __DIR__ . '/../config.php';
8 8
 
9 9
 // Create services and inject into the app. 
10 10
 $di  = new \Anax\DI\CDIFactoryTest();
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 
15 15
 // Home route
16
-$app->router->add('', function () use ($app) {
16
+$app->router->add('', function() use ($app) {
17 17
 
18 18
     $app->theme->setTitle("Throw exceptions to generate HTTP error pages");
19 19
     $app->views->add('default/page', [
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 
42 42
 // Throw ForbiddenException to get a 403 page
43
-$app->router->add('403', function () use ($app) {
43
+$app->router->add('403', function() use ($app) {
44 44
 
45 45
     throw new \Anax\Exception\ForbiddenException("Here is the details, if any.");
46 46
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 
51 51
 // Throw NotFoundException to get a 404 page
52
-$app->router->add('404', function () use ($app) {
52
+$app->router->add('404', function() use ($app) {
53 53
 
54 54
     throw new \Anax\Exception\NotFoundException("Here is the details, if any.");
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 
60 60
 // Throw InternalServerErrorException to get a 500 page
61
-$app->router->add('500', function () use ($app) {
61
+$app->router->add('500', function() use ($app) {
62 62
 
63 63
     throw new \Anax\Exception\InternalServerErrorException("Here is the details, if any.");
64 64
 
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/test/error-message-verbosity.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,21 +5,21 @@  discard block
 block discarded – undo
5 5
  */
6 6
 
7 7
 // Get environment & autoloader.
8
-require __DIR__.'/../config.php';
8
+require __DIR__ . '/../config.php';
9 9
 
10 10
 // Create services and inject into the app. 
11 11
 $di  = new \Anax\DI\CDIFactoryTest();
12 12
 $app = new \Anax\Kernel\CAnax($di);
13 13
 
14 14
 
15
-$di->set('TestController', function () use ($di) {
15
+$di->set('TestController', function() use ($di) {
16 16
     $controller = new TestController();
17 17
     $controller->setDI($di);
18 18
     return $controller;
19 19
 });
20 20
 
21 21
 
22
-$di->set('fails', function () {
22
+$di->set('fails', function() {
23 23
     throw new \Exception("Custom exception thrown by callback creating service.");
24 24
 });
25 25
 
@@ -139,41 +139,41 @@  discard block
 block discarded – undo
139 139
 
140 140
 
141 141
 
142
-$app->router->add('', function () use ($app) {
142
+$app->router->add('', function() use ($app) {
143 143
 
144 144
     $app->dispatcher->forward(['controller' => 'test']);
145 145
 
146 146
 });
147 147
 
148 148
 
149
-$app->router->add('t1', function () use ($app) {
149
+$app->router->add('t1', function() use ($app) {
150 150
 
151 151
     $app->dispatchNO;
152 152
 
153 153
 });
154 154
 
155 155
 
156
-$app->router->add('t2', function () use ($app) {
156
+$app->router->add('t2', function() use ($app) {
157 157
 
158 158
     $app->dispatchNO();
159 159
 
160 160
 });
161 161
 
162 162
 
163
-$app->router->add('t3', function () use ($app) {
163
+$app->router->add('t3', function() use ($app) {
164 164
 
165 165
     $app->dispatcher->forward(['controller' => 'testNO']);
166 166
 
167 167
 });
168 168
 
169 169
 
170
-$app->router->add('t4', function () use ($app) {
170
+$app->router->add('t4', function() use ($app) {
171 171
 
172 172
     $app->dispatcher->forward(['controller' => 'test', 'action' => 'NONE']);
173 173
 
174 174
 });
175 175
 
176
-$app->router->add('t5', function () use ($app) {
176
+$app->router->add('t5', function() use ($app) {
177 177
 
178 178
     $app->dispatcher->forward(['controller' => 'test', 'action' => 'private']);
179 179
 
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/test/navigation-bar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  */
6 6
 
7 7
 // Get environment & autoloader.
8
-require __DIR__.'/../config.php';
8
+require __DIR__ . '/../config.php';
9 9
 
10 10
 
11 11
 // Create services and inject into the app. 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 
17 17
 // Create the home route
18
-$app->router->add('*', function () use ($app) {
18
+$app->router->add('*', function() use ($app) {
19 19
 
20 20
     $app->theme->setTitle("Testing navigation bar");
21 21
     $app->views->add('default/page', [
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     // Create the navbar as a view
27 27
     $app->theme->addStylesheet('css/navbar.css');
28 28
     $app->views->addCallback(
29
-        function () use ($app) {
29
+        function() use ($app) {
30 30
             return $app->navbar->create();
31 31
         },
32 32
         [],
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/404.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
  *
5 5
  */
6 6
 // Get environment & autoloader.
7
-require __DIR__.'/config_with_app.php';
7
+require __DIR__ . '/config_with_app.php';
8 8
 
9 9
 
10 10
 
11 11
 // Home route
12
-$app->router->add('', function () use ($app) {
12
+$app->router->add('', function() use ($app) {
13 13
     throw new \Anax\Exception\NotFoundException();
14 14
 });
15 15
 
Please login to merge, or discard this patch.
vendor/anax/mvc/webroot/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  *
11 11
  */
12 12
 define('ANAX_INSTALL_PATH', realpath(__DIR__ . '/../') . '/');
13
-define('ANAX_APP_PATH',     ANAX_INSTALL_PATH . 'app/');
13
+define('ANAX_APP_PATH', ANAX_INSTALL_PATH . 'app/');
14 14
 
15 15
 
16 16
 
Please login to merge, or discard this patch.