summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Core/Base.php2
-rw-r--r--app/Model/NotificationType.php2
-rw-r--r--app/Model/UserMetadata.php2
-rw-r--r--app/ServiceProvider/DatabaseProvider.php9
-rw-r--r--index.php3
5 files changed, 9 insertions, 9 deletions
diff --git a/app/Core/Base.php b/app/Core/Base.php
index b7be45d1..d402fb37 100644
--- a/app/Core/Base.php
+++ b/app/Core/Base.php
@@ -56,6 +56,8 @@ use Pimple\Container;
* @property \Kanboard\Model\ProjectDailyStats $projectDailyStats
* @property \Kanboard\Model\ProjectMetadata $projectMetadata
* @property \Kanboard\Model\ProjectPermission $projectPermission
+ * @property \Kanboard\Model\ProjectNotification $projectNotification
+ * @property \Kanboard\Model\ProjectNotificationType $projectNotificationType
* @property \Kanboard\Model\Subtask $subtask
* @property \Kanboard\Model\SubtaskExport $subtaskExport
* @property \Kanboard\Model\SubtaskTimeTracking $subtaskTimeTracking
diff --git a/app/Model/NotificationType.php b/app/Model/NotificationType.php
index bc9c6fdc..9d8317b7 100644
--- a/app/Model/NotificationType.php
+++ b/app/Model/NotificationType.php
@@ -120,7 +120,7 @@ abstract class NotificationType extends Base
{
$classes = $this->classes;
- return array_filter($types, function($type) use ($classes) {
+ return array_filter($types, function ($type) use ($classes) {
return isset($classes[$type]);
});
}
diff --git a/app/Model/UserMetadata.php b/app/Model/UserMetadata.php
index 6f1222e2..411837bd 100644
--- a/app/Model/UserMetadata.php
+++ b/app/Model/UserMetadata.php
@@ -27,4 +27,4 @@ class UserMetadata extends Metadata
{
return 'user_id';
}
-} \ No newline at end of file
+}
diff --git a/app/ServiceProvider/DatabaseProvider.php b/app/ServiceProvider/DatabaseProvider.php
index 43c4b813..b2115644 100644
--- a/app/ServiceProvider/DatabaseProvider.php
+++ b/app/ServiceProvider/DatabaseProvider.php
@@ -2,6 +2,8 @@
namespace Kanboard\ServiceProvider;
+use LogicException;
+use RuntimeException;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use PicoDb\Database;
@@ -27,24 +29,21 @@ class DatabaseProvider implements ServiceProviderInterface
case 'sqlite':
$db = $this->getSqliteInstance();
break;
-
case 'mysql':
$db = $this->getMysqlInstance();
break;
-
case 'postgres':
$db = $this->getPostgresInstance();
break;
-
default:
- die('Database driver not supported');
+ throw new LogicException('Database driver not supported');
}
if ($db->schema()->check(\Schema\VERSION)) {
return $db;
} else {
$errors = $db->getLogMessages();
- die('Unable to migrate database schema: <br/><br/><strong>'.(isset($errors[0]) ? $errors[0] : 'Unknown error').'</strong>');
+ throw new RuntimeException('Unable to migrate database schema: '.(isset($errors[0]) ? $errors[0] : 'Unknown error'));
}
}
diff --git a/index.php b/index.php
index 90a4c464..2ca0731f 100644
--- a/index.php
+++ b/index.php
@@ -1,8 +1,7 @@
<?php
-require __DIR__.'/app/common.php';
-
try {
+ require __DIR__.'/app/common.php';
$container['router']->dispatch($_SERVER['REQUEST_URI'], isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '');
} catch (Exception $e) {
echo 'Internal Error: '.$e->getMessage();