diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-04 21:11:12 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-04 21:11:12 -0500 |
commit | a7f3e3bec50762f2083f70672a0ba3db533fc8bb (patch) | |
tree | c8e9961cb610042acf32e88096abc5fcb3eac4dd | |
parent | 38082096909424c23032224365c90aa5189eb6f0 (diff) |
PHPdoc cleanup
42 files changed, 97 insertions, 51 deletions
diff --git a/app/Action/Base.php b/app/Action/Base.php index e8449d0c..e5c65a17 100644 --- a/app/Action/Base.php +++ b/app/Action/Base.php @@ -132,6 +132,7 @@ abstract class Base extends \Kanboard\Core\Base * Set project id * * @access public + * @param integer $project_id * @return Base */ public function setProjectId($project_id) @@ -154,10 +155,10 @@ abstract class Base extends \Kanboard\Core\Base /** * Set an user defined parameter * - * @access public - * @param string $name Parameter name - * @param mixed $value Value - * @param Base + * @access public + * @param string $name Parameter name + * @param mixed $value Value + * @return Base */ public function setParam($name, $value) { @@ -271,6 +272,7 @@ abstract class Base extends \Kanboard\Core\Base * @access public * @param string $event * @param string $description + * @return Base */ public function addEvent($event, $description = '') { diff --git a/app/Analytic/AverageLeadCycleTimeAnalytic.php b/app/Analytic/AverageLeadCycleTimeAnalytic.php index fd85f864..5a7a3c0f 100644 --- a/app/Analytic/AverageLeadCycleTimeAnalytic.php +++ b/app/Analytic/AverageLeadCycleTimeAnalytic.php @@ -99,6 +99,7 @@ class AverageLeadCycleTimeAnalytic extends Base * Get the 1000 last created tasks * * @access private + * @param integer $project_id * @return array */ private function getTasks($project_id) diff --git a/app/Analytic/AverageTimeSpentColumnAnalytic.php b/app/Analytic/AverageTimeSpentColumnAnalytic.php index bef55419..11078323 100644 --- a/app/Analytic/AverageTimeSpentColumnAnalytic.php +++ b/app/Analytic/AverageTimeSpentColumnAnalytic.php @@ -126,6 +126,7 @@ class AverageTimeSpentColumnAnalytic extends Base * * @access private * @param array $task + * @return integer */ private function getTaskTimeSpentInCurrentColumn(array &$task) { diff --git a/app/Controller/App.php b/app/Controller/App.php index 1ce74506..b816764d 100644 --- a/app/Controller/App.php +++ b/app/Controller/App.php @@ -19,6 +19,7 @@ class App extends Base * @param integer $user_id * @param string $action * @param integer $max + * @return \Kanboard\Core\Paginator */ private function getProjectPaginator($user_id, $action, $max) { @@ -37,6 +38,7 @@ class App extends Base * @param integer $user_id * @param string $action * @param integer $max + * @return \Kanboard\Core\Paginator */ private function getTaskPaginator($user_id, $action, $max) { @@ -55,6 +57,7 @@ class App extends Base * @param integer $user_id * @param string $action * @param integer $max + * @return \Kanboard\Core\Paginator */ private function getSubtaskPaginator($user_id, $action, $max) { diff --git a/app/Controller/Auth.php b/app/Controller/Auth.php index 46b5a546..b882a720 100644 --- a/app/Controller/Auth.php +++ b/app/Controller/Auth.php @@ -14,6 +14,8 @@ class Auth extends Base * Display the form login * * @access public + * @param array $values + * @param array $errors */ public function login(array $values = array(), array $errors = array()) { diff --git a/app/Controller/Column.php b/app/Controller/Column.php index 66073b56..bbe12fe1 100644 --- a/app/Controller/Column.php +++ b/app/Controller/Column.php @@ -76,6 +76,8 @@ class Column extends Base * Display a form to edit a column * * @access public + * @param array $values + * @param array $errors */ public function edit(array $values = array(), array $errors = array()) { diff --git a/app/Core/Base.php b/app/Core/Base.php index d4ab6c81..e53f299a 100644 --- a/app/Core/Base.php +++ b/app/Core/Base.php @@ -31,7 +31,6 @@ use Pimple\Container; * @property \Kanboard\Core\ObjectStorage\ObjectStorageInterface $objectStorage * @property \Kanboard\Core\Plugin\Hook $hook * @property \Kanboard\Core\Plugin\Loader $pluginLoader - * @property \Kanboard\Core\Security\AccessMap $projectAccessMap * @property \Kanboard\Core\Security\AuthenticationManager $authenticationManager * @property \Kanboard\Core\Security\AccessMap $applicationAccessMap * @property \Kanboard\Core\Security\AccessMap $projectAccessMap diff --git a/app/Core/Cache/Base.php b/app/Core/Cache/Base.php index d62b8507..2879f1f1 100644 --- a/app/Core/Cache/Base.php +++ b/app/Core/Cache/Base.php @@ -11,6 +11,26 @@ namespace Kanboard\Core\Cache; abstract class Base { /** + * Fetch value from cache + * + * @abstract + * @access public + * @param string $key + * @return mixed Null when not found, cached value otherwise + */ + abstract public function get($key); + + /** + * Save a new value in the cache + * + * @abstract + * @access public + * @param string $key + * @param mixed $value + */ + abstract public function set($key, $value); + + /** * Proxy cache * * Note: Arguments must be scalar types diff --git a/app/Core/Csv.php b/app/Core/Csv.php index e45af24c..88010166 100644 --- a/app/Core/Csv.php +++ b/app/Core/Csv.php @@ -87,7 +87,8 @@ class Csv * * @static * @access public - * @return integer + * @param mixed $value + * @return int */ public static function getBooleanValue($value) { diff --git a/app/Core/Ldap/Client.php b/app/Core/Ldap/Client.php index 63149ae3..e35e4ea0 100644 --- a/app/Core/Ldap/Client.php +++ b/app/Core/Ldap/Client.php @@ -60,6 +60,7 @@ class Client * Establish server connection * * @access public + * @throws ClientException * @param string $server LDAP server hostname or IP * @param integer $port LDAP port * @param boolean $tls Start TLS @@ -98,6 +99,7 @@ class Client * Anonymous authentication * * @access public + * @throws ClientException * @return boolean */ public function useAnonymousAuthentication() @@ -113,6 +115,7 @@ class Client * Authentication with username/password * * @access public + * @throws ClientException * @param string $bind_rdn * @param string $bind_password * @return boolean diff --git a/app/Core/Ldap/Query.php b/app/Core/Ldap/Query.php index e03495ec..1779fa61 100644 --- a/app/Core/Ldap/Query.php +++ b/app/Core/Ldap/Query.php @@ -78,7 +78,7 @@ class Query * Get LDAP Entries * * @access public - * @return Entities + * @return Entries */ public function getEntries() { diff --git a/app/Core/Mail/Client.php b/app/Core/Mail/Client.php index e1f31696..641b6abe 100644 --- a/app/Core/Mail/Client.php +++ b/app/Core/Mail/Client.php @@ -41,7 +41,7 @@ class Client extends Base * @param string $name * @param string $subject * @param string $html - * @return EmailClient + * @return Client */ public function send($email, $name, $subject, $html) { @@ -70,7 +70,7 @@ class Client extends Base * * @access public * @param string $transport - * @return EmailClientInterface + * @return ClientInterface */ public function getTransport($transport) { @@ -83,7 +83,7 @@ class Client extends Base * @access public * @param string $transport * @param string $class - * @return EmailClient + * @return Client */ public function setTransport($transport, $class) { diff --git a/app/Core/ObjectStorage/FileStorage.php b/app/Core/ObjectStorage/FileStorage.php index dd049ca2..18453890 100644 --- a/app/Core/ObjectStorage/FileStorage.php +++ b/app/Core/ObjectStorage/FileStorage.php @@ -33,6 +33,7 @@ class FileStorage implements ObjectStorageInterface * Fetch object contents * * @access public + * @throws ObjectStorageException * @param string $key * @return string */ @@ -51,6 +52,7 @@ class FileStorage implements ObjectStorageInterface * Save object * * @access public + * @throws ObjectStorageException * @param string $key * @param string $blob */ @@ -67,6 +69,7 @@ class FileStorage implements ObjectStorageInterface * Output directly object content * * @access public + * @throws ObjectStorageException * @param string $key */ public function output($key) @@ -84,6 +87,7 @@ class FileStorage implements ObjectStorageInterface * Move local file to object storage * * @access public + * @throws ObjectStorageException * @param string $src_filename * @param string $key * @return boolean @@ -136,6 +140,7 @@ class FileStorage implements ObjectStorageInterface * Create object folder * * @access private + * @throws ObjectStorageException * @param string $key */ private function createFolder($key) diff --git a/app/Core/Plugin/Loader.php b/app/Core/Plugin/Loader.php index 530d9b40..ff4f2c14 100644 --- a/app/Core/Plugin/Loader.php +++ b/app/Core/Plugin/Loader.php @@ -55,6 +55,7 @@ class Loader extends \Kanboard\Core\Base * Load plugin * * @access public + * @throws LogicException * @param string $plugin */ public function load($plugin) diff --git a/app/Core/Security/AccessMap.php b/app/Core/Security/AccessMap.php index f34c4b00..2431a921 100644 --- a/app/Core/Security/AccessMap.php +++ b/app/Core/Security/AccessMap.php @@ -39,7 +39,7 @@ class AccessMap * * @access public * @param string $role - * @return Acl + * @return AccessMap */ public function setDefaultRole($role) { @@ -53,7 +53,7 @@ class AccessMap * @access public * @param string $role * @param array $subroles - * @return Acl + * @return AccessMap */ public function setRoleHierarchy($role, array $subroles) { @@ -113,7 +113,7 @@ class AccessMap * @param string $controller Controller class name * @param mixed $methods List of method name or just one method * @param string $role Lowest role required - * @return Acl + * @return AccessMap */ public function add($controller, $methods, $role) { @@ -135,7 +135,7 @@ class AccessMap * @param string $controller * @param string $method * @param string $role - * @return Acl + * @return AccessMap */ private function addRule($controller, $method, $role) { @@ -157,7 +157,7 @@ class AccessMap * @access public * @param string $controller * @param string $method - * @return boolean + * @return array */ public function getRoles($controller, $method) { diff --git a/app/Core/Security/OAuthAuthenticationProviderInterface.php b/app/Core/Security/OAuthAuthenticationProviderInterface.php index c32339e0..3092672d 100644 --- a/app/Core/Security/OAuthAuthenticationProviderInterface.php +++ b/app/Core/Security/OAuthAuthenticationProviderInterface.php @@ -14,7 +14,7 @@ interface OAuthAuthenticationProviderInterface extends AuthenticationProviderInt * Get user object * * @access public - * @return UserProviderInterface + * @return \Kanboard\Core\User\UserProviderInterface */ public function getUser(); @@ -31,7 +31,7 @@ interface OAuthAuthenticationProviderInterface extends AuthenticationProviderInt * Get configured OAuth2 service * * @access public - * @return Kanboard\Core\Http\OAuth2 + * @return \Kanboard\Core\Http\OAuth2 */ public function getService(); diff --git a/app/Core/Security/PasswordAuthenticationProviderInterface.php b/app/Core/Security/PasswordAuthenticationProviderInterface.php index 918a4aec..c2304546 100644 --- a/app/Core/Security/PasswordAuthenticationProviderInterface.php +++ b/app/Core/Security/PasswordAuthenticationProviderInterface.php @@ -14,7 +14,7 @@ interface PasswordAuthenticationProviderInterface extends AuthenticationProvider * Get user object * * @access public - * @return UserProviderInterface + * @return \Kanboard\Core\User\UserProviderInterface */ public function getUser(); diff --git a/app/Core/Security/PreAuthenticationProviderInterface.php b/app/Core/Security/PreAuthenticationProviderInterface.php index 391e8d0f..c13b06c5 100644 --- a/app/Core/Security/PreAuthenticationProviderInterface.php +++ b/app/Core/Security/PreAuthenticationProviderInterface.php @@ -14,7 +14,7 @@ interface PreAuthenticationProviderInterface extends AuthenticationProviderInter * Get user object * * @access public - * @return UserProviderInterface + * @return \Kanboard\Core\User\UserProviderInterface */ public function getUser(); } diff --git a/app/ExternalLink/AttachmentLinkProvider.php b/app/ExternalLink/AttachmentLinkProvider.php index df27284f..706ac1dd 100644 --- a/app/ExternalLink/AttachmentLinkProvider.php +++ b/app/ExternalLink/AttachmentLinkProvider.php @@ -85,7 +85,7 @@ class AttachmentLinkProvider extends BaseLinkProvider implements ExternalLinkPro * Get the link found with the properties * * @access public - * @return ExternalLinkInterface + * @return \Kanboard\Core\ExternalLink\ExternalLinkInterface */ public function getLink() { diff --git a/app/ExternalLink/WebLinkProvider.php b/app/ExternalLink/WebLinkProvider.php index ea6dc132..5ec1bbe4 100644 --- a/app/ExternalLink/WebLinkProvider.php +++ b/app/ExternalLink/WebLinkProvider.php @@ -65,7 +65,7 @@ class WebLinkProvider extends BaseLinkProvider implements ExternalLinkProviderIn * Get the link found with the properties * * @access public - * @return ExternalLinkInterface + * @return \Kanboard\Core\ExternalLink\ExternalLinkInterface */ public function getLink() { diff --git a/app/Helper/AssetHelperHelper.php b/app/Helper/AssetHelperHelper.php index 7040a40a..b3dc711f 100644 --- a/app/Helper/AssetHelperHelper.php +++ b/app/Helper/AssetHelperHelper.php @@ -15,7 +15,8 @@ class AssetHelper extends Base /** * Add a Javascript asset * - * @param string $filename Filename + * @param string $filename Filename + * @param bool $async * @return string */ public function js($filename, $async = false) diff --git a/app/Helper/FormHelper.php b/app/Helper/FormHelper.php index 161fd54c..c2ea1d72 100644 --- a/app/Helper/FormHelper.php +++ b/app/Helper/FormHelper.php @@ -40,11 +40,12 @@ class FormHelper extends Base * Display a select field * * @access public - * @param string $name Field name - * @param array $options Options - * @param array $values Form values - * @param array $errors Form errors - * @param string $class CSS class + * @param string $name Field name + * @param array $options Options + * @param array $values Form values + * @param array $errors Form errors + * @param array $attributes + * @param string $class CSS class * @return string */ public function select($name, array $options, array $values = array(), array $errors = array(), array $attributes = array(), $class = '') diff --git a/app/Helper/HookHelper.php b/app/Helper/HookHelper.php index e8abc875..2d13ebcc 100644 --- a/app/Helper/HookHelper.php +++ b/app/Helper/HookHelper.php @@ -56,7 +56,7 @@ class HookHelper extends Base * @access public * @param string $hook * @param string $template - * @return \Helper\Hook + * @return \Kanboard\Helper\Hook */ public function attach($hook, $template) { diff --git a/app/Helper/UrlHelper.php b/app/Helper/UrlHelper.php index 96c6735a..cad9fdef 100644 --- a/app/Helper/UrlHelper.php +++ b/app/Helper/UrlHelper.php @@ -32,14 +32,15 @@ class UrlHelper extends Base * HTML Link tag * * @access public - * @param string $label Link label - * @param string $controller Controller name - * @param string $action Action name - * @param array $params Url parameters - * @param boolean $csrf Add a CSRF token - * @param string $class CSS class attribute - * @param boolean $new_tab Open the link in a new tab - * @param string $anchor Link Anchor + * @param string $label Link label + * @param string $controller Controller name + * @param string $action Action name + * @param array $params Url parameters + * @param boolean $csrf Add a CSRF token + * @param string $class CSS class attribute + * @param string $title + * @param boolean $new_tab Open the link in a new tab + * @param string $anchor Link Anchor * @return string */ public function link($label, $controller, $action, array $params = array(), $csrf = false, $class = '', $title = '', $new_tab = false, $anchor = '') diff --git a/app/Model/Action.php b/app/Model/Action.php index 4da2fb8f..f055d9d0 100644 --- a/app/Model/Action.php +++ b/app/Model/Action.php @@ -151,7 +151,7 @@ class Action extends Base * * @author Antonio Rabelo * @param integer $src_project_id Source project id - * @return integer $dst_project_id Destination project id + * @param integer $dst_project_id Destination project id * @return boolean */ public function duplicate($src_project_id, $dst_project_id) diff --git a/app/Model/Board.php b/app/Model/Board.php index c10be19f..d41ecafe 100644 --- a/app/Model/Board.php +++ b/app/Model/Board.php @@ -77,7 +77,7 @@ class Board extends Base * * @author Antonio Rabelo * @param integer $project_from Project Template - * @return integer $project_to Project that receives the copy + * @param integer $project_to Project that receives the copy * @return boolean */ public function duplicate($project_from, $project_to) diff --git a/app/Model/Category.php b/app/Model/Category.php index 6368f507..1d5f6546 100644 --- a/app/Model/Category.php +++ b/app/Model/Category.php @@ -191,7 +191,7 @@ class Category extends Base * * @author Antonio Rabelo * @param integer $src_project_id Source project id - * @return integer $dst_project_id Destination project id + * @param integer $dst_project_id Destination project id * @return boolean */ public function duplicate($src_project_id, $dst_project_id) diff --git a/app/Model/Color.php b/app/Model/Color.php index 1b11f175..dee28643 100644 --- a/app/Model/Color.php +++ b/app/Model/Color.php @@ -141,6 +141,7 @@ class Color extends Base * Get available colors * * @access public + * @param bool $prepend * @return array */ public function getList($prepend = false) diff --git a/app/Model/Config.php b/app/Model/Config.php index 6f009175..7b254c8d 100644 --- a/app/Model/Config.php +++ b/app/Model/Config.php @@ -239,6 +239,7 @@ class Config extends Setting * Prepare data before save * * @access public + * @param array $values * @return array */ public function prepare(array $values) diff --git a/app/Model/Link.php b/app/Model/Link.php index 7b81a237..903a98d6 100644 --- a/app/Model/Link.php +++ b/app/Model/Link.php @@ -90,7 +90,7 @@ class Link extends Base * * @access public * @param integer $exclude_id Exclude this link - * @param booelan $prepend Prepend default value + * @param boolean $prepend Prepend default value * @return array */ public function getList($exclude_id = 0, $prepend = true) diff --git a/app/Model/Metadata.php b/app/Model/Metadata.php index 690b2265..cb66c717 100644 --- a/app/Model/Metadata.php +++ b/app/Model/Metadata.php @@ -76,6 +76,7 @@ abstract class Metadata extends Base * @access public * @param integer $entity_id * @param array $values + * @return boolean */ public function save($entity_id, array $values) { diff --git a/app/Model/NotificationType.php b/app/Model/NotificationType.php index 9d8317b7..289aae9c 100644 --- a/app/Model/NotificationType.php +++ b/app/Model/NotificationType.php @@ -80,7 +80,7 @@ abstract class NotificationType extends Base * * @access public * @param string $type - * @return NotificationInterface + * @return \Kanboard\Notification\NotificationInterface */ public function getType($type) { diff --git a/app/Model/PasswordReset.php b/app/Model/PasswordReset.php index c2d7dde9..5cfd3c97 100644 --- a/app/Model/PasswordReset.php +++ b/app/Model/PasswordReset.php @@ -20,7 +20,7 @@ class PasswordReset extends Base /** * Token duration (30 minutes) * - * @var string + * @var integer */ const DURATION = 1800; diff --git a/app/Model/ProjectGroupRole.php b/app/Model/ProjectGroupRole.php index 750ba7fb..afad4a44 100644 --- a/app/Model/ProjectGroupRole.php +++ b/app/Model/ProjectGroupRole.php @@ -166,7 +166,7 @@ class ProjectGroupRole extends Base * Copy group access from a project to another one * * @param integer $project_src_id Project Template - * @return integer $project_dst_id Project that receives the copy + * @param integer $project_dst_id Project that receives the copy * @return boolean */ public function duplicate($project_src_id, $project_dst_id) diff --git a/app/Model/Setting.php b/app/Model/Setting.php index 44e6c065..6d29c6ec 100644 --- a/app/Model/Setting.php +++ b/app/Model/Setting.php @@ -75,6 +75,7 @@ abstract class Setting extends Base * * @access public * @param array $values + * @return boolean */ public function save(array $values) { diff --git a/app/Model/TaskDuplication.php b/app/Model/TaskDuplication.php index b081aac1..ebdd4d29 100644 --- a/app/Model/TaskDuplication.php +++ b/app/Model/TaskDuplication.php @@ -155,6 +155,7 @@ class TaskDuplication extends Base * * @access public * @param array $values + * @return array */ public function checkDestinationProjectValues(array &$values) { diff --git a/app/Model/TaskPermission.php b/app/Model/TaskPermission.php index fac2153e..b1e02589 100644 --- a/app/Model/TaskPermission.php +++ b/app/Model/TaskPermission.php @@ -18,7 +18,8 @@ class TaskPermission extends Base * Regular users can't remove tasks from other people * * @public - * @return boolean + * @param array $task + * @return bool */ public function canRemoveTask(array $task) { diff --git a/app/Subscriber/AuthSubscriber.php b/app/Subscriber/AuthSubscriber.php index e839385f..dfb95a00 100644 --- a/app/Subscriber/AuthSubscriber.php +++ b/app/Subscriber/AuthSubscriber.php @@ -89,6 +89,7 @@ class AuthSubscriber extends BaseSubscriber implements EventSubscriberInterface * Increment failed login counter * * @access public + * @param AuthFailureEvent $event */ public function onLoginFailure(AuthFailureEvent $event) { diff --git a/app/User/LdapUserProvider.php b/app/User/LdapUserProvider.php index 3a84bfea..153450d9 100644 --- a/app/User/LdapUserProvider.php +++ b/app/User/LdapUserProvider.php @@ -69,7 +69,7 @@ class LdapUserProvider implements UserProviderInterface * @param string $name * @param string $email * @param string $role - * @param string[] + * @param string[] $groupIds */ public function __construct($dn, $username, $name, $email, $role, array $groupIds) { diff --git a/app/Validator/AuthValidator.php b/app/Validator/AuthValidator.php index 36ccdff0..cd6e04d5 100644 --- a/app/Validator/AuthValidator.php +++ b/app/Validator/AuthValidator.php @@ -114,6 +114,6 @@ class AuthValidator extends Base } } - return array($result, $errors);; + return array($result, $errors); } } diff --git a/app/check_setup.php b/app/check_setup.php index eec63ed8..af830de7 100644 --- a/app/check_setup.php +++ b/app/check_setup.php @@ -12,11 +12,6 @@ if (version_compare(PHP_VERSION, '5.4.0', '<')) { if (! ini_get('short_open_tag')) { throw new Exception('This software require to have short tags enabled if you have PHP < 5.4 ("short_open_tag = On")'); } - - // Magic quotes are deprecated since PHP 5.4 - if (get_magic_quotes_gpc()) { - throw new Exception('This software require to have "Magic quotes" disabled, it\'s deprecated since PHP 5.4 ("magic_quotes_gpc = Off")'); - } } // Check data folder if sqlite diff --git a/app/functions.php b/app/functions.php index b9b30834..0c611f95 100644 --- a/app/functions.php +++ b/app/functions.php @@ -25,6 +25,7 @@ function e() /** * Translate a number * + * @param mixed $value * @return string */ function n($value) |