summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Doursenaud <rdoursenaud@gpcsolutions.fr>2014-04-22 15:08:18 +0200
committerRaphaël Doursenaud <rdoursenaud@gpcsolutions.fr>2014-04-22 15:08:18 +0200
commitd156c47f0951cf681d16ed047f322e8332eb485e (patch)
tree1b97d1cb437fd7b2c0262640b7a70026e054413f
parent919e5d51a4cc4a2928cd34c8c575d4c003bb9a74 (diff)
Better documentation
These changes have been automatically suggested by scrutinizer-ci.com
-rw-r--r--actions/task_assign_color_user.php4
-rw-r--r--actions/task_assign_current_user.php6
-rw-r--r--actions/task_assign_specific_user.php4
-rw-r--r--actions/task_close.php4
-rw-r--r--actions/task_duplicate_another_project.php4
-rw-r--r--controllers/base.php2
-rw-r--r--core/event.php4
-rw-r--r--core/response.php3
-rw-r--r--core/router.php7
-rw-r--r--models/acl.php2
-rw-r--r--models/base.php2
-rw-r--r--models/config.php2
-rw-r--r--models/ldap.php2
-rw-r--r--models/remember_me.php1
14 files changed, 30 insertions, 17 deletions
diff --git a/actions/task_assign_color_user.php b/actions/task_assign_color_user.php
index 66002b80..cd8bee44 100644
--- a/actions/task_assign_color_user.php
+++ b/actions/task_assign_color_user.php
@@ -17,7 +17,7 @@ class TaskAssignColorUser extends Base
*
* @access public
* @param integer $project_id Project id
- * @param Task $task Task model instance
+ * @param \Model\Task $task Task model instance
*/
public function __construct($project_id, \Model\Task $task)
{
@@ -44,7 +44,7 @@ class TaskAssignColorUser extends Base
* Get the required parameter for the event
*
* @access public
- * @return array
+ * @return string[]
*/
public function getEventRequiredParameters()
{
diff --git a/actions/task_assign_current_user.php b/actions/task_assign_current_user.php
index 35b8f89a..c3843d85 100644
--- a/actions/task_assign_current_user.php
+++ b/actions/task_assign_current_user.php
@@ -17,8 +17,8 @@ class TaskAssignCurrentUser extends Base
*
* @access public
* @param integer $project_id Project id
- * @param Task $task Task model instance
- * @param Acl $acl Acl model instance
+ * @param \Model\Task $task Task model instance
+ * @param \Model\Acl $acl Acl model instance
*/
public function __construct($project_id, \Model\Task $task, \Model\Acl $acl)
{
@@ -44,7 +44,7 @@ class TaskAssignCurrentUser extends Base
* Get the required parameter for the event
*
* @access public
- * @return array
+ * @return string[]
*/
public function getEventRequiredParameters()
{
diff --git a/actions/task_assign_specific_user.php b/actions/task_assign_specific_user.php
index edde560e..0d5b1b51 100644
--- a/actions/task_assign_specific_user.php
+++ b/actions/task_assign_specific_user.php
@@ -17,7 +17,7 @@ class TaskAssignSpecificUser extends Base
*
* @access public
* @param integer $project_id Project id
- * @param Task $task Task model instance
+ * @param \Model\Task $task Task model instance
*/
public function __construct($project_id, \Model\Task $task)
{
@@ -43,7 +43,7 @@ class TaskAssignSpecificUser extends Base
* Get the required parameter for the event
*
* @access public
- * @return array
+ * @return string[]
*/
public function getEventRequiredParameters()
{
diff --git a/actions/task_close.php b/actions/task_close.php
index 3c45ebc0..8a6c8999 100644
--- a/actions/task_close.php
+++ b/actions/task_close.php
@@ -17,7 +17,7 @@ class TaskClose extends Base
*
* @access public
* @param integer $project_id Project id
- * @param Task $task Task model instance
+ * @param \Model\Task $task Task model instance
*/
public function __construct($project_id, \Model\Task $task)
{
@@ -42,7 +42,7 @@ class TaskClose extends Base
* Get the required parameter for the event
*
* @access public
- * @return array
+ * @return string[]
*/
public function getEventRequiredParameters()
{
diff --git a/actions/task_duplicate_another_project.php b/actions/task_duplicate_another_project.php
index e898f757..614e2dda 100644
--- a/actions/task_duplicate_another_project.php
+++ b/actions/task_duplicate_another_project.php
@@ -17,7 +17,7 @@ class TaskDuplicateAnotherProject extends Base
*
* @access public
* @param integer $project_id Project id
- * @param Task $task Task model instance
+ * @param \Model\Task $task Task model instance
*/
public function __construct($project_id, \Model\Task $task)
{
@@ -43,7 +43,7 @@ class TaskDuplicateAnotherProject extends Base
* Get the required parameter for the event
*
* @access public
- * @return array
+ * @return string[]
*/
public function getEventRequiredParameters()
{
diff --git a/controllers/base.php b/controllers/base.php
index 5f482f7e..ebc946fc 100644
--- a/controllers/base.php
+++ b/controllers/base.php
@@ -14,7 +14,7 @@ abstract class Base
* Constructor
*
* @access public
- * @param Core\Registry $registry
+ * @param \Core\Registry $registry
*/
public function __construct(\Core\Registry $registry)
{
diff --git a/core/event.php b/core/event.php
index 672146f3..0941acac 100644
--- a/core/event.php
+++ b/core/event.php
@@ -9,6 +9,10 @@ namespace Core;
* @author Frederic Guillot
*/
interface Listener {
+
+ /**
+ * @return boolean
+ */
public function execute(array $data);
}
diff --git a/core/response.php b/core/response.php
index 4a00ed79..0973bf95 100644
--- a/core/response.php
+++ b/core/response.php
@@ -9,6 +9,9 @@ class Response
header('Content-Disposition: attachment; filename="'.$filename.'"');
}
+ /**
+ * @param integer $status_code
+ */
public function status($status_code)
{
if (strpos(php_sapi_name(), 'apache') !== false) {
diff --git a/core/router.php b/core/router.php
index 5a27276c..56a95e52 100644
--- a/core/router.php
+++ b/core/router.php
@@ -20,11 +20,18 @@ class Router
$this->action = empty($_GET['action']) ? $controller : $_GET['action'];
}
+ /**
+ * @param string $default_value
+ */
public function sanitize($value, $default_value)
{
return ! ctype_alpha($value) || empty($value) ? $default_value : strtolower($value);
}
+ /**
+ * @param string $filename
+ * @param string $class
+ */
public function load($filename, $class, $method)
{
if (file_exists($filename)) {
diff --git a/models/acl.php b/models/acl.php
index c8a39ee4..622aca9a 100644
--- a/models/acl.php
+++ b/models/acl.php
@@ -110,7 +110,7 @@ class Acl extends Base
* Get the connected user id
*
* @access public
- * @return bool
+ * @return integer
*/
public function getUserId()
{
diff --git a/models/base.php b/models/base.php
index 70a24321..7731b584 100644
--- a/models/base.php
+++ b/models/base.php
@@ -43,7 +43,7 @@ abstract class Base
*
* @access public
* @param PicoDb\Database $db Database instance
- * @param Core\Event $event Event dispatcher instance
+ * @param \Core\Event $event Event dispatcher instance
*/
public function __construct(\PicoDb\Database $db, \Core\Event $event)
{
diff --git a/models/config.php b/models/config.php
index 60764e64..d18b8ec5 100644
--- a/models/config.php
+++ b/models/config.php
@@ -60,7 +60,7 @@ class Config extends Base
*
* @access public
* @param string $name Parameter name
- * @param mixed $default_value Default value of the parameter
+ * @param string $default_value Default value of the parameter
* @return mixed
*/
public function get($name, $default_value = '')
diff --git a/models/ldap.php b/models/ldap.php
index 95401211..69fe9bec 100644
--- a/models/ldap.php
+++ b/models/ldap.php
@@ -18,7 +18,7 @@ class Ldap extends Base
* @access public
* @param string $username Username
* @param string $password Password
- * @return bool
+ * @return null|boolean
*/
public function authenticate($username, $password)
{
diff --git a/models/remember_me.php b/models/remember_me.php
index 2454cc95..be6b4e53 100644
--- a/models/remember_me.php
+++ b/models/remember_me.php
@@ -37,7 +37,6 @@ class RememberMe extends Base
* Get a remember me record
*
* @access public
- * @param integer $user_id User id
* @return mixed
*/
public function find($token, $sequence)