summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--app/Model/Base.php4
-rw-r--r--app/Model/Board.php3
-rw-r--r--app/Model/ProjectDailyStats.php4
-rw-r--r--app/Model/Subtask.php5
-rw-r--r--plugins/.gitignore2
6 files changed, 13 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index dd9d05bb..56091512 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,4 +22,4 @@ before_script:
- php -i
script:
- - phpunit -c tests/units.$DB.xml \ No newline at end of file
+ - phpunit -c tests/units.$DB.xml
diff --git a/app/Model/Base.php b/app/Model/Base.php
index c1b2fae3..6fe3d74a 100644
--- a/app/Model/Base.php
+++ b/app/Model/Base.php
@@ -2,6 +2,8 @@
namespace Kanboard\Model;
+use PicoDb\Database;
+
/**
* Base model class
*
@@ -20,7 +22,7 @@ abstract class Base extends \Kanboard\Core\Base
*/
public function persist($table, array $values)
{
- return $this->db->transaction(function ($db) use ($table, $values) {
+ return $this->db->transaction(function (Database $db) use ($table, $values) {
if (! $db->table($table)->save($values)) {
return false;
diff --git a/app/Model/Board.php b/app/Model/Board.php
index 3af2e83d..79a1a92d 100644
--- a/app/Model/Board.php
+++ b/app/Model/Board.php
@@ -4,6 +4,7 @@ namespace Kanboard\Model;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
+use PicoDb\Database;
/**
* Board model
@@ -173,7 +174,7 @@ class Board extends Base
*/
public function saveColumnPositions(array $columns)
{
- return $this->db->transaction(function ($db) use ($columns) {
+ return $this->db->transaction(function (Database $db) use ($columns) {
foreach ($columns as $column_id => $position) {
if (! $db->table(Board::TABLE)->eq('id', $column_id)->update(array('position' => $position))) {
diff --git a/app/Model/ProjectDailyStats.php b/app/Model/ProjectDailyStats.php
index 538aea1a..b3d09adc 100644
--- a/app/Model/ProjectDailyStats.php
+++ b/app/Model/ProjectDailyStats.php
@@ -2,6 +2,8 @@
namespace Kanboard\Model;
+use use PicoDb\Database;
+
/**
* Project Daily Stats
*
@@ -29,7 +31,7 @@ class ProjectDailyStats extends Base
{
$lead_cycle_time = $this->projectAnalytic->getAverageLeadAndCycleTime($project_id);
- return $this->db->transaction(function ($db) use ($project_id, $date, $lead_cycle_time) {
+ return $this->db->transaction(function (Database $db) use ($project_id, $date, $lead_cycle_time) {
// This call will fail if the record already exists
// (cross database driver hack for INSERT..ON DUPLICATE KEY UPDATE)
diff --git a/app/Model/Subtask.php b/app/Model/Subtask.php
index f81e5b1c..664e41e1 100644
--- a/app/Model/Subtask.php
+++ b/app/Model/Subtask.php
@@ -2,6 +2,7 @@
namespace Kanboard\Model;
+use PicoDb\Database;
use Kanboard\Event\SubtaskEvent;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
@@ -293,7 +294,7 @@ class Subtask extends Base
*/
public function savePositions(array $subtasks)
{
- return $this->db->transaction(function ($db) use ($subtasks) {
+ return $this->db->transaction(function (Database $db) use ($subtasks) {
foreach ($subtasks as $subtask_id => $position) {
if (! $db->table(Subtask::TABLE)->eq('id', $subtask_id)->update(array('position' => $position))) {
@@ -433,7 +434,7 @@ class Subtask extends Base
*/
public function duplicate($src_task_id, $dst_task_id)
{
- return $this->db->transaction(function ($db) use ($src_task_id, $dst_task_id) {
+ return $this->db->transaction(function (Database $db) use ($src_task_id, $dst_task_id) {
$subtasks = $db->table(Subtask::TABLE)
->columns('title', 'time_estimated', 'position')
diff --git a/plugins/.gitignore b/plugins/.gitignore
index aa0e8eb1..120f485d 100644
--- a/plugins/.gitignore
+++ b/plugins/.gitignore
@@ -1,2 +1,2 @@
*
-!/.gitignore \ No newline at end of file
+!/.gitignore