Run php-cs-fixer on the code base
This commit is contained in:
@@ -11,7 +11,7 @@ use Kanboard\Model\User;
|
||||
use Kanboard\Core\Session;
|
||||
use Kanboard\Model\UserSession;
|
||||
|
||||
class SubTaskTest extends Base
|
||||
class SubtaskTest extends Base
|
||||
{
|
||||
public function onSubtaskCreated($event)
|
||||
{
|
||||
|
||||
@@ -28,8 +28,8 @@ class TaskCreationTest extends Base
|
||||
$tc = new TaskCreation($this->container);
|
||||
$tf = new TaskFinder($this->container);
|
||||
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {});
|
||||
|
||||
$this->assertEquals(1, $p->create(array('name' => 'test')));
|
||||
$this->assertEquals(0, $tc->create(array('title' => 'test', 'project_id' => 0)));
|
||||
@@ -45,8 +45,8 @@ class TaskCreationTest extends Base
|
||||
$tc = new TaskCreation($this->container);
|
||||
$tf = new TaskFinder($this->container);
|
||||
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {});
|
||||
|
||||
$this->assertEquals(1, $p->create(array('name' => 'test')));
|
||||
$this->assertEquals(1, $tc->create(array('project_id' => 1)));
|
||||
@@ -68,7 +68,7 @@ class TaskCreationTest extends Base
|
||||
$tc = new TaskCreation($this->container);
|
||||
$tf = new TaskFinder($this->container);
|
||||
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, array($this, 'onCreate'));
|
||||
|
||||
$this->assertEquals(1, $p->create(array('name' => 'test')));
|
||||
|
||||
@@ -75,8 +75,8 @@ class TaskDuplicationTest extends Base
|
||||
$this->assertEquals(2, $task['category_id']);
|
||||
$this->assertEquals(4.4, $task['time_spent']);
|
||||
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {});
|
||||
|
||||
// We duplicate our task
|
||||
$this->assertEquals(2, $td->duplicate(1));
|
||||
@@ -117,8 +117,8 @@ class TaskDuplicationTest extends Base
|
||||
// We create a task
|
||||
$this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 2, 'owner_id' => 1, 'category_id' => 1)));
|
||||
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {});
|
||||
$this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {});
|
||||
|
||||
// We duplicate our task to the 2nd project
|
||||
$this->assertEquals(2, $td->duplicateToProject(1, 2));
|
||||
|
||||
@@ -30,7 +30,6 @@ class TaskExportTest extends Base
|
||||
$this->assertNotFalse($c->create(array('name' => 'Category #3', 'project_id' => 1)));
|
||||
|
||||
for ($i = 1; $i <= 100; $i++) {
|
||||
|
||||
$task = array(
|
||||
'title' => 'Task #'.$i,
|
||||
'project_id' => 1,
|
||||
|
||||
@@ -272,9 +272,7 @@ class TaskPositionTest extends Base
|
||||
$task_per_column = 5;
|
||||
|
||||
foreach (array(1, 2, 3, 4) as $column_id) {
|
||||
|
||||
for ($i = 1; $i <= $task_per_column; $i++, $counter++) {
|
||||
|
||||
$task = array(
|
||||
'title' => 'Task #'.$i.'-'.$column_id,
|
||||
'project_id' => 1,
|
||||
|
||||
Reference in New Issue
Block a user