@@ -4,11 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | <p>How many rolls do you want to do, <a href='<?=$this->url->create("dice/roll?roll=1")?>'>1 roll</a>, <a href='<?=$this->url->create("dice/roll?roll=3")?>'>3 rolls</a> or <a href='<?=$this->url->create("dice/roll?roll=6")?>'>6 rolls</a>? </p> |
| 6 | 6 | |
| 7 | -<?php if(isset($roll)) : ?> |
|
| 7 | +<?php if (isset($roll)) : ?> |
|
| 8 | 8 | <p>You made <?=$roll?> roll(s) and you got this serie.</p> |
| 9 | 9 | |
| 10 | 10 | <ul class='dice'> |
| 11 | -<?php foreach($results as $val) : ?> |
|
| 11 | +<?php foreach ($results as $val) : ?> |
|
| 12 | 12 | <li class='dice-<?=$val?>'></li> |
| 13 | 13 | <?php endforeach; ?> |
| 14 | 14 | </ul> |
@@ -10,9 +10,9 @@ |
||
| 10 | 10 | { |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | - * Properties |
|
| 14 | - * |
|
| 15 | - */ |
|
| 13 | + * Properties |
|
| 14 | + * |
|
| 15 | + */ |
|
| 16 | 16 | private $lastRoll = []; |
| 17 | 17 | |
| 18 | 18 | |
@@ -14,9 +14,9 @@ |
||
| 14 | 14 | call_user_func(function() { |
| 15 | 15 | $loader = new \Anax\Loader\CPsr4Autoloader(); |
| 16 | 16 | $loader->addNameSpace('Anax', ANAX_INSTALL_PATH . 'src') |
| 17 | - ->addNameSpace('', ANAX_APP_PATH . 'src') |
|
| 18 | - ->addNameSpace('Michelf', ANAX_INSTALL_PATH . '3pp/php-markdown/Michelf') |
|
| 19 | - ->register(); |
|
| 17 | + ->addNameSpace('', ANAX_APP_PATH . 'src') |
|
| 18 | + ->addNameSpace('Michelf', ANAX_INSTALL_PATH . '3pp/php-markdown/Michelf') |
|
| 19 | + ->register(); |
|
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | 22 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | * |
| 27 | 27 | * @link https://getcomposer.org/doc/01-basic-usage.md#autoloading |
| 28 | 28 | */ |
| 29 | -if(is_file(ANAX_INSTALL_PATH . 'vendor/autoload.php')) { |
|
| 29 | +if (is_file(ANAX_INSTALL_PATH . 'vendor/autoload.php')) { |
|
| 30 | 30 | include ANAX_INSTALL_PATH . 'vendor/autoload.php'; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -8,8 +8,8 @@ discard block |
||
| 8 | 8 | * Set the error reporting. |
| 9 | 9 | * |
| 10 | 10 | */ |
| 11 | -error_reporting(-1); // Report all type of errors |
|
| 12 | -ini_set('display_errors', 1); // Display all errors |
|
| 11 | +error_reporting(-1); // Report all type of errors |
|
| 12 | +ini_set('display_errors', 1); // Display all errors |
|
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * Default exception handler. |
| 18 | 18 | * |
| 19 | 19 | */ |
| 20 | -set_exception_handler(function ($e) { |
|
| 20 | +set_exception_handler(function($e) { |
|
| 21 | 21 | echo "Anax: Uncaught exception: <p>" |
| 22 | 22 | . $e->getMessage() |
| 23 | 23 | . "</p><p>Code: " |
@@ -9,5 +9,5 @@ |
||
| 9 | 9 | * |
| 10 | 10 | */ |
| 11 | 11 | define('ANAX_INSTALL_PATH', realpath(__DIR__ . '/../../') . '/'); |
| 12 | -define('ANAX_APP_PATH', ANAX_INSTALL_PATH . 'app/'); |
|
| 12 | +define('ANAX_APP_PATH', ANAX_INSTALL_PATH . 'app/'); |
|
| 13 | 13 | |
@@ -96,11 +96,11 @@ |
||
| 96 | 96 | |
| 97 | 97 | |
| 98 | 98 | |
| 99 | - /** |
|
| 99 | + /** |
|
| 100 | 100 | * Callback to create the url, if needed, else comment out. |
| 101 | 101 | * |
| 102 | 102 | */ |
| 103 | - /* |
|
| 103 | + /* |
|
| 104 | 104 | 'create_url' => function ($url) { |
| 105 | 105 | return $this->di->get('url')->create($url); |
| 106 | 106 | }, |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * Callback tracing the current selected menu item base on scriptname |
| 77 | 77 | * |
| 78 | 78 | */ |
| 79 | - 'callback' => function ($url) { |
|
| 79 | + 'callback' => function($url) { |
|
| 80 | 80 | if ($url == $this->di->get('request')->getCurrentUrl(false)) { |
| 81 | 81 | return true; |
| 82 | 82 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * menuitems that has the setting 'mark-if-parent' set to true. |
| 90 | 90 | * |
| 91 | 91 | */ |
| 92 | - 'is_parent' => function ($parent) { |
|
| 92 | + 'is_parent' => function($parent) { |
|
| 93 | 93 | $route = $this->di->get('request')->getRoute(); |
| 94 | 94 | return !substr_compare($parent, $route, 0, strlen($parent)); |
| 95 | 95 | }, |
@@ -3,11 +3,11 @@ discard block |
||
| 3 | 3 | <head> |
| 4 | 4 | <meta charset='utf-8'/> |
| 5 | 5 | <title><?=$title . $title_append?></title> |
| 6 | -<?php if(isset($favicon)): ?><link rel='icon' href='<?=$this->url->asset($favicon)?>'/><?php endif; ?> |
|
| 7 | -<?php foreach($stylesheets as $stylesheet): ?> |
|
| 6 | +<?php if (isset($favicon)): ?><link rel='icon' href='<?=$this->url->asset($favicon)?>'/><?php endif; ?> |
|
| 7 | +<?php foreach ($stylesheets as $stylesheet): ?> |
|
| 8 | 8 | <link rel='stylesheet' type='text/css' href='<?=$this->url->asset($stylesheet)?>'/> |
| 9 | 9 | <?php endforeach; ?> |
| 10 | -<?php if(isset($style)): ?><style><?=$style?></style><?php endif; ?> |
|
| 10 | +<?php if (isset($style)): ?><style><?=$style?></style><?php endif; ?> |
|
| 11 | 11 | <script src='<?=$this->url->asset($modernizr)?>'></script> |
| 12 | 12 | </head> |
| 13 | 13 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | <div id='wrapper'> |
| 17 | 17 | |
| 18 | 18 | <div id='header'> |
| 19 | -<?php if(isset($header)) echo $header?> |
|
| 19 | +<?php if (isset($header)) echo $header?> |
|
| 20 | 20 | <?php $this->views->render('header')?> |
| 21 | 21 | </div> |
| 22 | 22 | |
@@ -27,24 +27,24 @@ discard block |
||
| 27 | 27 | <?php endif; ?> |
| 28 | 28 | |
| 29 | 29 | <div id='main'> |
| 30 | -<?php if(isset($main)) echo $main?> |
|
| 30 | +<?php if (isset($main)) echo $main?> |
|
| 31 | 31 | <?php $this->views->render('main')?> |
| 32 | 32 | </div> |
| 33 | 33 | |
| 34 | 34 | <div id='footer'> |
| 35 | -<?php if(isset($footer)) echo $footer?> |
|
| 35 | +<?php if (isset($footer)) echo $footer?> |
|
| 36 | 36 | <?php $this->views->render('footer')?> |
| 37 | 37 | </div> |
| 38 | 38 | |
| 39 | 39 | </div> |
| 40 | 40 | |
| 41 | -<?php if(isset($jquery)):?><script src='<?=$this->url->asset($jquery)?>'></script><?php endif; ?> |
|
| 41 | +<?php if (isset($jquery)):?><script src='<?=$this->url->asset($jquery)?>'></script><?php endif; ?> |
|
| 42 | 42 | |
| 43 | -<?php if(isset($javascript_include)): foreach($javascript_include as $val): ?> |
|
| 43 | +<?php if (isset($javascript_include)): foreach ($javascript_include as $val): ?> |
|
| 44 | 44 | <script src='<?=$this->url->asset($val)?>'></script> |
| 45 | 45 | <?php endforeach; endif; ?> |
| 46 | 46 | |
| 47 | -<?php if(isset($google_analytics)): ?> |
|
| 47 | +<?php if (isset($google_analytics)): ?> |
|
| 48 | 48 | <script> |
| 49 | 49 | var _gaq=[['_setAccount','<?=$google_analytics?>'],['_trackPageview']]; |
| 50 | 50 | (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; |
@@ -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 | |