@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * initialize autoloaders |
31 | 31 | */ |
32 | 32 | // load classes from Phile-core |
33 | -spl_autoload_register(function ($className) { |
|
33 | +spl_autoload_register(function($className) { |
|
34 | 34 | $fileName = LIB_DIR . str_replace("\\", DS, $className) . '.php'; |
35 | 35 | if (file_exists($fileName)) { |
36 | 36 | require_once $fileName; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Setup global application-object |
44 | 44 | */ |
45 | -require 'container.php' ; |
|
45 | +require 'container.php'; |
|
46 | 46 | $app = Phile\Core\Container::getInstance()->get('Phile_App'); |
47 | 47 | |
48 | 48 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | use Phile\Core\Event; |
54 | 54 | use Phile\Core\Registry; |
55 | 55 | |
56 | -$app->addBootstrap(function (Event $eventBus, Config $config) { |
|
56 | +$app->addBootstrap(function(Event $eventBus, Config $config) { |
|
57 | 57 | // Load configuration files into global $config configuration |
58 | 58 | $configDir = $config->get('config_dir'); |
59 | 59 | Bootstrap::loadConfiguration($configDir . 'defaults.php', $config); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | use Phile\Core\RequestHandler; |
92 | 92 | |
93 | -$app->addMiddleware(function (RequestHandler $middleware, Event $eventBus, Config $config) use ($app) { |
|
93 | +$app->addMiddleware(function(RequestHandler $middleware, Event $eventBus, Config $config) use ($app) { |
|
94 | 94 | // Inject middleware from Phile-plugins |
95 | 95 | $eventBus->trigger('phile.core.middleware.add', ['middleware' => $middleware]); |
96 | 96 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | protected $needsSetup; |
23 | 23 | |
24 | 24 | /** |
25 | - * @var array event subscription |
|
25 | + * @var array event subscription |
|
26 | 26 | */ |
27 | 27 | protected $events = [ |
28 | 28 | 'config_loaded' => 'onConfigLoaded', |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function outputPluginSettings($data = null) |
51 | 51 | { |
52 | - // you can access this plugins' config in $this->settings |
|
52 | + // you can access this plugins' config in $this->settings |
|
53 | 53 | $settings = $this->settings; |
54 | 54 | |
55 | 55 | $content = $data['content']; |
@@ -10,8 +10,6 @@ |
||
10 | 10 | * @license http://opensource.org/licenses/MIT |
11 | 11 | */ |
12 | 12 | |
13 | -use Psr\Http\Message\ServerRequestInterface; |
|
14 | - |
|
15 | 13 | $config = [ |
16 | 14 | 'types' => [ |
17 | 15 | 'Phile_App' => Phile\Phile::class, |
@@ -31,14 +31,14 @@ |
||
31 | 31 | $container = new Phile\Core\Container($config); |
32 | 32 | Phile\Core\Container::setInstance($container); |
33 | 33 | |
34 | -$container->set('Phile_EventBus', function () { |
|
34 | +$container->set('Phile_EventBus', function() { |
|
35 | 35 | return new Phile\Core\Event; |
36 | 36 | }); |
37 | 37 | |
38 | -$container->set('Phile_Config', function () { |
|
38 | +$container->set('Phile_Config', function() { |
|
39 | 39 | return new Phile\Core\Config; |
40 | 40 | }); |
41 | 41 | |
42 | -$container->set('Phile_App', function ($container) { |
|
42 | +$container->set('Phile_App', function($container) { |
|
43 | 43 | return new Phile\Phile($container->get('Phile_EventBus'), $container->get('Phile_Config')); |
44 | 44 | }); |