diff --git a/app/core/App.php b/app/core/App.php index f273a46..6cc1be1 100644 --- a/app/core/App.php +++ b/app/core/App.php @@ -26,7 +26,8 @@ class App // Require model file require __DIR__ . '/../model/' . $model . '.php'; // Instantiate model - if (!$injection) { + if (!$injection) + { $injection = $this->database; } return new $model($injection); diff --git a/app/core/Config.php b/app/core/Config.php index 593427c..10dcef9 100644 --- a/app/core/Config.php +++ b/app/core/Config.php @@ -7,10 +7,10 @@ class Config public function __construct(string $path) { - if (!file_exists($path)) { + if (!file_exists($path)) + { echo("Could not find $path"); throw new Exception("Could not find $path"); - } $this->config = require $path; } diff --git a/app/core/Session.php b/app/core/Session.php index c0fe5eb..eb94e6f 100644 --- a/app/core/Session.php +++ b/app/core/Session.php @@ -49,10 +49,12 @@ class Session public function flash(string $msg, string $type = 'info'): void { $key = 'flashed_messages'; - if (!$this->has($key)) { + if (!$this->has($key)) + { $this->set($key, []); } - if (count($this->get($key)) >= 100) { + if (count($this->get($key)) >= 100) + { $this->remove($key); throw new Exception('Too many flashed messages!'); } @@ -70,7 +72,8 @@ class Session public function getFlashedMessages(): ?array { $key = 'flashed_messages'; - if ($this->has($key)) { + if ($this->has($key)) + { $msgs = $this->get($key); $this->remove($key); return $msgs;