summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Model/Notification.php10
-rw-r--r--app/Model/ProjectDailySummary.php2
-rw-r--r--app/Model/TaskCreation.php2
-rw-r--r--app/ServiceProvider/DatabaseProvider.php8
-rw-r--r--app/Subscriber/Base.php12
-rw-r--r--app/Subscriber/WebhookSubscriber.php6
6 files changed, 22 insertions, 18 deletions
diff --git a/app/Model/Notification.php b/app/Model/Notification.php
index ccda1488..0fa4c9da 100644
--- a/app/Model/Notification.php
+++ b/app/Model/Notification.php
@@ -3,9 +3,7 @@
namespace Model;
use Core\Session;
-use Core\Translator;
use Core\Template;
-use Event\NotificationListener;
use Swift_Message;
use Swift_Mailer;
use Swift_TransportException;
@@ -29,8 +27,8 @@ class Notification extends Base
* Get a list of people with notifications enabled
*
* @access public
- * @param integer $project_id Project id
- * @param array $exlude_users List of user_id to exclude
+ * @param integer $project_id Project id
+ * @param array $exclude_users List of user_id to exclude
* @return array
*/
public function getUsersWithNotification($project_id, array $exclude_users = array())
@@ -61,8 +59,8 @@ class Notification extends Base
* Get the list of users to send the notification for a given project
*
* @access public
- * @param integer $project_id Project id
- * @param array $exlude_users List of user_id to exclude
+ * @param integer $project_id Project id
+ * @param array $exclude_users List of user_id to exclude
* @return array
*/
public function getUsersList($project_id, array $exclude_users = array())
diff --git a/app/Model/ProjectDailySummary.php b/app/Model/ProjectDailySummary.php
index 6c29758a..0a06bbd4 100644
--- a/app/Model/ProjectDailySummary.php
+++ b/app/Model/ProjectDailySummary.php
@@ -2,8 +2,6 @@
namespace Model;
-use Core\Template;
-
/**
* Project daily summary
*
diff --git a/app/Model/TaskCreation.php b/app/Model/TaskCreation.php
index 6a2c0f9c..7d523214 100644
--- a/app/Model/TaskCreation.php
+++ b/app/Model/TaskCreation.php
@@ -24,7 +24,7 @@ class TaskCreation extends Base
$this->prepare($values);
$task_id = $this->persist(Task::TABLE, $values);
- if ($task_id) {
+ if ($task_id !== false) {
$this->fireEvents($task_id, $values);
}
diff --git a/app/ServiceProvider/DatabaseProvider.php b/app/ServiceProvider/DatabaseProvider.php
index fa5319a0..2ed87ace 100644
--- a/app/ServiceProvider/DatabaseProvider.php
+++ b/app/ServiceProvider/DatabaseProvider.php
@@ -16,7 +16,7 @@ class DatabaseProvider implements ServiceProviderInterface
/**
* Setup the database driver and execute schema migration
*
- * @return PicoDb\Database
+ * @return \PicoDb\Database
*/
public function getInstance()
{
@@ -49,7 +49,7 @@ class DatabaseProvider implements ServiceProviderInterface
/**
* Setup the Sqlite database driver
*
- * @return PicoDb\Database
+ * @return \PicoDb\Database
*/
function getSqliteInstance()
{
@@ -64,7 +64,7 @@ class DatabaseProvider implements ServiceProviderInterface
/**
* Setup the Mysql database driver
*
- * @return PicoDb\Database
+ * @return \PicoDb\Database
*/
function getMysqlInstance()
{
@@ -83,7 +83,7 @@ class DatabaseProvider implements ServiceProviderInterface
/**
* Setup the Postgres database driver
*
- * @return PicoDb\Database
+ * @return \PicoDb\Database
*/
public function getPostgresInstance()
{
diff --git a/app/Subscriber/Base.php b/app/Subscriber/Base.php
index 1ed15327..5f884b39 100644
--- a/app/Subscriber/Base.php
+++ b/app/Subscriber/Base.php
@@ -2,8 +2,6 @@
namespace Subscriber;
-use Event\TaskEvent;
-use Model\Task;
use Pimple\Container;
/**
@@ -11,6 +9,16 @@ use Pimple\Container;
*
* @package subscriber
* @author Frederic Guillot
+ *
+ * @property \Model\Config $config
+ * @property \Model\Notification $notification
+ * @property \Model\Project $project
+ * @property \Model\ProjectPermission $projectPermission
+ * @property \Model\ProjectAnalytic $projectAnalytic
+ * @property \Model\ProjectDailySummary $projectDailySummary
+ * @property \Model\Task $task
+ * @property \Model\TaskExport $taskExport
+ * @property \Model\TaskFinder $taskFinder
*/
abstract class Base
{
diff --git a/app/Subscriber/WebhookSubscriber.php b/app/Subscriber/WebhookSubscriber.php
index 20d765e2..6b5abf1b 100644
--- a/app/Subscriber/WebhookSubscriber.php
+++ b/app/Subscriber/WebhookSubscriber.php
@@ -23,15 +23,15 @@ class WebhookSubscriber extends Base implements EventSubscriberInterface
public function onTaskCreation(TaskEvent $event)
{
- $this->executeRequest('webhook_url_task_creation');
+ $this->executeRequest('webhook_url_task_creation', $event);
}
public function onTaskModification(TaskEvent $event)
{
- $this->executeRequest('webhook_url_task_modification');
+ $this->executeRequest('webhook_url_task_modification', $event);
}
- public function executeRequest($parameter)
+ public function executeRequest($parameter, TaskEvent $event)
{
$url = $this->config->get($parameter);