@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $di = new \Anax\DI\CDI(); |
21 | 21 | $service = 'failsWithException'; |
22 | 22 | |
23 | - $di->set($service, function () { |
|
23 | + $di->set($service, function() { |
|
24 | 24 | throw new \Exception("Failed creating service."); |
25 | 25 | }); |
26 | 26 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $di = new \Anax\DI\CDIFactoryDefault(); |
41 | 41 | $service = 'session'; |
42 | 42 | |
43 | - $di->set($service, function () { |
|
43 | + $di->set($service, function() { |
|
44 | 44 | $session = new \Anax\Session\CSession(); |
45 | 45 | $session->configure(ANAX_APP_PATH . 'config/session.php'); |
46 | 46 | $session->name(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * |
12 | 12 | */ |
13 | 13 | define('ANAX_INSTALL_PATH', realpath(__DIR__ . '/../') . '/'); |
14 | -define('ANAX_APP_PATH', ANAX_INSTALL_PATH . 'app/'); |
|
14 | +define('ANAX_APP_PATH', ANAX_INSTALL_PATH . 'app/'); |
|
15 | 15 | |
16 | 16 | |
17 | 17 |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | public function providerCheck() |
17 | 17 | { |
18 | 18 | return [ |
19 | - [ null, ['pass'] ], |
|
20 | - [ 0, ['int'] ], |
|
21 | - [ 1, ['range' => [1, 100]] ], |
|
22 | - [ 100, ['range' => [1, 100]] ], |
|
19 | + [null, ['pass']], |
|
20 | + [0, ['int']], |
|
21 | + [1, ['range' => [1, 100]]], |
|
22 | + [100, ['range' => [1, 100]]], |
|
23 | 23 | ]; |
24 | 24 | } |
25 | 25 | |
@@ -69,10 +69,10 @@ discard block |
||
69 | 69 | public function providerCheckFail() |
70 | 70 | { |
71 | 71 | return [ |
72 | - [ null, ['fail'] ], |
|
73 | - [ "moped", ['int'] ], |
|
74 | - [ 0, ['range' => [1, 100]] ], |
|
75 | - [ 101, ['range' => [1, 100]] ], |
|
72 | + [null, ['fail']], |
|
73 | + ["moped", ['int']], |
|
74 | + [0, ['range' => [1, 100]]], |
|
75 | + [101, ['range' => [1, 100]]], |
|
76 | 76 | ]; |
77 | 77 | } |
78 | 78 |
@@ -29,10 +29,10 @@ |
||
29 | 29 | |
30 | 30 | class MarkdownExtra extends \Michelf\_MarkdownExtra_TmpImpl { |
31 | 31 | |
32 | - ### Parser Implementation ### |
|
32 | + ### Parser Implementation ### |
|
33 | 33 | |
34 | - # Temporarily, the implemenation is in the _MarkdownExtra_TmpImpl class. |
|
35 | - # See note above. |
|
34 | + # Temporarily, the implemenation is in the _MarkdownExtra_TmpImpl class. |
|
35 | + # See note above. |
|
36 | 36 | |
37 | 37 | } |
38 | 38 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | # Install PSR-0-compatible class autoloader |
8 | 8 | spl_autoload_register(function($class){ |
9 | - require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php'; |
|
9 | + require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php'; |
|
10 | 10 | }); |
11 | 11 | |
12 | 12 | # Get Markdown class |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | </head> |
25 | 25 | <body> |
26 | 26 | <?php |
27 | - # Put HTML content in the document |
|
28 | - echo $html; |
|
29 | - ?> |
|
27 | + # Put HTML content in the document |
|
28 | + echo $html; |
|
29 | + ?> |
|
30 | 30 | </body> |
31 | 31 | </html> |
@@ -5,8 +5,8 @@ |
||
5 | 5 | # you like. |
6 | 6 | |
7 | 7 | # Install PSR-0-compatible class autoloader |
8 | -spl_autoload_register(function($class){ |
|
9 | - require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php'; |
|
8 | +spl_autoload_register(function($class) { |
|
9 | + require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')) . '.php'; |
|
10 | 10 | }); |
11 | 11 | |
12 | 12 | # Get Markdown class |
@@ -13,9 +13,9 @@ |
||
13 | 13 | |
14 | 14 | |
15 | 15 | /** |
16 | - * Properties |
|
17 | - * |
|
18 | - */ |
|
16 | + * Properties |
|
17 | + * |
|
18 | + */ |
|
19 | 19 | private $template; // Template file or array |
20 | 20 | private $templateData = []; // Data to send to template file |
21 | 21 | private $sortOrder; // For sorting views |
@@ -16,10 +16,10 @@ |
||
16 | 16 | * Properties |
17 | 17 | * |
18 | 18 | */ |
19 | - private $template; // Template file or array |
|
19 | + private $template; // Template file or array |
|
20 | 20 | private $templateData = []; // Data to send to template file |
21 | - private $sortOrder; // For sorting views |
|
22 | - private $type; // Type of view |
|
21 | + private $sortOrder; // For sorting views |
|
22 | + private $type; // Type of view |
|
23 | 23 | |
24 | 24 | |
25 | 25 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | |
67 | 67 | |
68 | 68 | |
69 | - /** |
|
69 | + /** |
|
70 | 70 | * Magic method to get and create services as a method call. |
71 | 71 | * When created it is also stored as a parameter of this object. |
72 | 72 | * |
@@ -14,8 +14,8 @@ |
||
14 | 14 | * Properties |
15 | 15 | * |
16 | 16 | */ |
17 | - public $loaded = []; // Store all lazy loaded services, ready to be instantiated |
|
18 | - public $active = []; // A service is instantiated into this array, once its accessed |
|
17 | + public $loaded = []; // Store all lazy loaded services, ready to be instantiated |
|
18 | + public $active = []; // A service is instantiated into this array, once its accessed |
|
19 | 19 | |
20 | 20 | |
21 | 21 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | */ |
10 | 10 | class CDIFactoryDefault extends CDI |
11 | 11 | { |
12 | - /** |
|
12 | + /** |
|
13 | 13 | * Construct. |
14 | 14 | * |
15 | 15 | */ |
@@ -26,25 +26,25 @@ discard block |
||
26 | 26 | $this->set('route', '\Anax\Route\CRouteBasic'); |
27 | 27 | $this->set('view', '\Anax\View\CViewBasic'); |
28 | 28 | |
29 | - $this->set('ErrorController', function () { |
|
29 | + $this->set('ErrorController', function() { |
|
30 | 30 | $controller = new \Anax\MVC\ErrorController(); |
31 | 31 | $controller->setDI($this); |
32 | 32 | return $controller; |
33 | 33 | }); |
34 | 34 | |
35 | - $this->setShared('log', function () { |
|
35 | + $this->setShared('log', function() { |
|
36 | 36 | $log = new \Anax\Log\CLogger(); |
37 | 37 | $log->setContext('development'); |
38 | 38 | return $log; |
39 | 39 | }); |
40 | 40 | |
41 | - $this->setShared('request', function () { |
|
41 | + $this->setShared('request', function() { |
|
42 | 42 | $request = new \Anax\Request\CRequestBasic(); |
43 | 43 | $request->init(); |
44 | 44 | return $request; |
45 | 45 | }); |
46 | 46 | |
47 | - $this->setShared('url', function () { |
|
47 | + $this->setShared('url', function() { |
|
48 | 48 | $url = new \Anax\Url\CUrl(); |
49 | 49 | $url->setSiteUrl($this->request->getSiteUrl()); |
50 | 50 | $url->setBaseUrl($this->request->getBaseUrl()); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | return $url; |
56 | 56 | }); |
57 | 57 | |
58 | - $this->setShared('views', function () { |
|
58 | + $this->setShared('views', function() { |
|
59 | 59 | $views = new \Anax\View\CViewContainerBasic(); |
60 | 60 | $views->setBasePath(ANAX_APP_PATH . 'view'); |
61 | 61 | $views->setFileSuffix('.tpl.php'); |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | return $views; |
64 | 64 | }); |
65 | 65 | |
66 | - $this->setShared('router', function () { |
|
66 | + $this->setShared('router', function() { |
|
67 | 67 | |
68 | 68 | $router = new \Anax\Route\CRouterBasic(); |
69 | 69 | $router->setDI($this); |
70 | 70 | |
71 | - $router->addInternal('403', function () { |
|
71 | + $router->addInternal('403', function() { |
|
72 | 72 | $this->dispatcher->forward([ |
73 | 73 | 'controller' => 'error', |
74 | 74 | 'action' => 'statusCode', |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | ]); |
80 | 80 | })->setName('403'); |
81 | 81 | |
82 | - $router->addInternal('404', function () { |
|
82 | + $router->addInternal('404', function() { |
|
83 | 83 | $this->dispatcher->forward([ |
84 | 84 | 'controller' => 'error', |
85 | 85 | 'action' => 'statusCode', |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ]); |
91 | 91 | })->setName('404'); |
92 | 92 | |
93 | - $router->addInternal('500', function () { |
|
93 | + $router->addInternal('500', function() { |
|
94 | 94 | $this->dispatcher->forward([ |
95 | 95 | 'controller' => 'error', |
96 | 96 | 'action' => 'statusCode', |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | return $router; |
105 | 105 | }); |
106 | 106 | |
107 | - $this->setShared('dispatcher', function () { |
|
107 | + $this->setShared('dispatcher', function() { |
|
108 | 108 | $dispatcher = new \Anax\MVC\CDispatcherBasic(); |
109 | 109 | $dispatcher->setDI($this); |
110 | 110 | return $dispatcher; |
111 | 111 | }); |
112 | 112 | |
113 | - $this->setShared('session', function () { |
|
113 | + $this->setShared('session', function() { |
|
114 | 114 | $session = new \Anax\Session\CSession(); |
115 | 115 | $session->configure(ANAX_APP_PATH . 'config/session.php'); |
116 | 116 | $session->name(); |
@@ -118,27 +118,27 @@ discard block |
||
118 | 118 | return $session; |
119 | 119 | }); |
120 | 120 | |
121 | - $this->setShared('theme', function () { |
|
121 | + $this->setShared('theme', function() { |
|
122 | 122 | $themeEngine = new \Anax\ThemeEngine\CThemeBasic(); |
123 | 123 | $themeEngine->setDI($this); |
124 | 124 | $themeEngine->configure(ANAX_APP_PATH . 'config/theme.php'); |
125 | 125 | return $themeEngine; |
126 | 126 | }); |
127 | 127 | |
128 | - $this->setShared('navbar', function () { |
|
128 | + $this->setShared('navbar', function() { |
|
129 | 129 | $navbar = new \Anax\Navigation\CNavbar(); |
130 | 130 | $navbar->setDI($this); |
131 | 131 | $navbar->configure(ANAX_APP_PATH . 'config/navbar.php'); |
132 | 132 | return $navbar; |
133 | 133 | }); |
134 | 134 | |
135 | - $this->set('fileContent', function () { |
|
135 | + $this->set('fileContent', function() { |
|
136 | 136 | $fc = new \Anax\Content\CFileContent(); |
137 | 137 | $fc->setBasePath(ANAX_APP_PATH . 'content/'); |
138 | 138 | return $fc; |
139 | 139 | }); |
140 | 140 | |
141 | - $this->setShared('textFilter', function () { |
|
141 | + $this->setShared('textFilter', function() { |
|
142 | 142 | $filter = new \Anax\Content\CTextFilter(); |
143 | 143 | $filter->setDI($this); |
144 | 144 | $filter->configure(ANAX_APP_PATH . 'config/text_filter.php'); |