@@ -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'); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class CDIFactoryTest extends CDIFactoryDefault |
| 10 | 10 | { |
| 11 | - /** |
|
| 11 | + /** |
|
| 12 | 12 | * Construct. |
| 13 | 13 | * |
| 14 | 14 | */ |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class CDIFactoryDocumentation extends CDIFactoryDefault |
| 10 | 10 | { |
| 11 | - /** |
|
| 11 | + /** |
|
| 12 | 12 | * Construct. |
| 13 | 13 | * |
| 14 | 14 | */ |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | parent::__construct(); |
| 18 | 18 | |
| 19 | - $this->set('documentation', function () { |
|
| 19 | + $this->set('documentation', function() { |
|
| 20 | 20 | $fc = new \Anax\Content\CFileContent(); |
| 21 | 21 | $fc->setBasePath(ANAX_INSTALL_PATH . 'docs/documentation'); |
| 22 | 22 | return $fc; |
@@ -10,9 +10,9 @@ discard block |
||
| 10 | 10 | * @param string $class The fully-qualified class name. |
| 11 | 11 | * @return void |
| 12 | 12 | */ |
| 13 | -spl_autoload_register(function ($class) { |
|
| 13 | +spl_autoload_register(function($class) { |
|
| 14 | 14 | $path = ANAX_SOURCE_PATH . "/{$class}/{$class}.php"; |
| 15 | - if(is_file($path)) { |
|
| 15 | + if (is_file($path)) { |
|
| 16 | 16 | require($path); |
| 17 | 17 | } |
| 18 | 18 | }); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param string $class The fully-qualified class name. |
| 31 | 31 | * @return void |
| 32 | 32 | */ |
| 33 | -spl_autoload_register(function ($className) { |
|
| 33 | +spl_autoload_register(function($className) { |
|
| 34 | 34 | |
| 35 | 35 | $path = ANAX_SOURCE_PATH . DIRECTORY_SEPARATOR; |
| 36 | 36 | $className = ltrim($className, '\\'); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; |
| 46 | 46 | |
| 47 | - if(is_file($fileName)) { |
|
| 47 | + if (is_file($fileName)) { |
|
| 48 | 48 | require $fileName; |
| 49 | 49 | } |
| 50 | 50 | }); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * @param string $class The fully-qualified class name. |
| 59 | 59 | * @return void |
| 60 | 60 | */ |
| 61 | -spl_autoload_register(function ($class) { |
|
| 61 | +spl_autoload_register(function($class) { |
|
| 62 | 62 | |
| 63 | 63 | // project-specific namespace prefix |
| 64 | 64 | $prefix = 'Anax\\'; |
@@ -10,9 +10,9 @@ |
||
| 10 | 10 | { |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | - * Properties |
|
| 14 | - * |
|
| 15 | - */ |
|
| 13 | + * Properties |
|
| 14 | + * |
|
| 15 | + */ |
|
| 16 | 16 | private $name; // A name for this route |
| 17 | 17 | private $rule; // The rule for this route |
| 18 | 18 | private $action; // The controller action to handle this route |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | * Properties |
| 14 | 14 | * |
| 15 | 15 | */ |
| 16 | - private $name; // A name for this route |
|
| 17 | - private $rule; // The rule for this route |
|
| 16 | + private $name; // A name for this route |
|
| 17 | + private $rule; // The rule for this route |
|
| 18 | 18 | private $action; // The controller action to handle this route |
| 19 | 19 | |
| 20 | 20 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'id' => null, |
| 29 | 29 | 'class' => null, |
| 30 | 30 | 'wrapper' => 'nav', |
| 31 | - 'create_url' => function ($url) { |
|
| 31 | + 'create_url' => function($url) { |
|
| 32 | 32 | return $url; |
| 33 | 33 | }, |
| 34 | 34 | ); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // Create the ul li menu from the array, use an anonomous recursive function that returns an |
| 38 | 38 | // array of values. |
| 39 | - $createMenu = function ($items, $callback) use (&$createMenu, $menu) { |
|
| 39 | + $createMenu = function($items, $callback) use (&$createMenu, $menu) { |
|
| 40 | 40 | |
| 41 | 41 | $html = null; |
| 42 | 42 | $hasItemIsSelected = false; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // Is there a class set for this item, then use it |
| 71 | - $class = isset($item['class']) && ! is_null($item['class']) |
|
| 71 | + $class = isset($item['class']) && !is_null($item['class']) |
|
| 72 | 72 | ? $item['class'] |
| 73 | 73 | : null; |
| 74 | 74 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | |
| 98 | 98 | // Set the id & class element, only if it exists in the menu-array |
| 99 | - $id = isset($menu['id']) ? " id='{$menu['id']}'" : null; |
|
| 99 | + $id = isset($menu['id']) ? " id='{$menu['id']}'" : null; |
|
| 100 | 100 | $class = isset($menu['class']) ? " class='{$menu['class']}'" : null; |
| 101 | 101 | $wrapper = $menu['wrapper']; |
| 102 | 102 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | |
| 16 | - /** |
|
| 16 | + /** |
|
| 17 | 17 | * Display a page for a HTTP status code. |
| 18 | 18 | * |
| 19 | 19 | * @param string code status code to set the http header. |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | - * Properties |
|
| 15 | - * |
|
| 16 | - */ |
|
| 14 | + * Properties |
|
| 15 | + * |
|
| 16 | + */ |
|
| 17 | 17 | private $headers; // Set all headers to send |
| 18 | 18 | |
| 19 | 19 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | |
| 19 | - /** |
|
| 19 | + /** |
|
| 20 | 20 | * Set a message. |
| 21 | 21 | * |
| 22 | 22 | * @param string a message. |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | - /** |
|
| 33 | + /** |
|
| 34 | 34 | * Get the message. |
| 35 | 35 | * |
| 36 | 36 | * @return void |