33# Copyright (c) 2012 John Reese
44# Licensed under the MIT license
55
6+ /**
7+ * @noinspection PhpUnused,
8+ * PhpMissingReturnTypeInspection, PhpMissingParamTypeInspection
9+ */
10+
11+ use Mantis \Exceptions \ClientException ;
12+
613/**
714 * Class SourceIntegrationPlugin
815 *
@@ -28,7 +35,17 @@ function hooks() {
2835 );
2936 }
3037
31- function display_changeset_link ( $ p_event , $ p_bug_id ) {
38+ /**
39+ * Display Changeset link.
40+ *
41+ * @param string $p_event Event name
42+ * @param int $p_bug_id User ID
43+ *
44+ * @return string[]
45+ *
46+ * @noinspection PhpUnusedParameterInspection
47+ */
48+ function display_changeset_link ($ p_event , $ p_bug_id ) {
3249 $ this ->changesets = SourceChangeset::load_by_bug ( $ p_bug_id , true );
3350
3451 if ( count ( $ this ->changesets ) > 0 ) {
@@ -38,6 +55,17 @@ function display_changeset_link( $p_event, $p_bug_id ) {
3855 return array ();
3956 }
4057
58+ /**
59+ * Display Bug.
60+ *
61+ * @param string $p_event Event name
62+ * @param int $p_bug_id User ID
63+ *
64+ * @return void
65+ * @throws ClientException
66+ *
67+ * @noinspection PhpUnusedParameterInspection
68+ */
4169 function display_bug ( $ p_event , $ p_bug_id ) {
4270 require_once ( 'Source.ViewAPI.php ' );
4371
@@ -82,8 +110,11 @@ function display_bug( $p_event, $p_bug_id ) {
82110 /**
83111 * When updating user preferences, allowing the user or admin to specify
84112 * a version control username to be associated with the account.
85- * @param string Event name
86- * @param int User ID
113+ *
114+ * @param string $p_event Event name
115+ * @param int $p_user_id User ID
116+ *
117+ * @noinspection PhpUnusedParameterInspection
87118 */
88119 function account_update_form ( $ p_event , $ p_user_id ) {
89120 if ( !access_has_global_level ( config_get ( 'plugin_Source_username_threshold ' ) ) ) {
@@ -104,15 +135,18 @@ function account_update_form( $p_event, $p_user_id ) {
104135 /**
105136 * When updating user preferences, allowing the user or admin to specify
106137 * a version control username to be associated with the account.
107- * @param string Event name
108- * @param int User ID
138+ *
139+ * @param string $p_event Event name
140+ * @param int $p_user_id User ID
141+ *
142+ * @noinspection PhpUnusedParameterInspection
109143 */
110144 function account_update ( $ p_event , $ p_user_id ) {
111145 if ( !access_has_global_level ( config_get ( 'plugin_Source_username_threshold ' ) ) ) {
112146 return ;
113147 }
114148
115- $ f_vcs_sent = gpc_get_bool ( 'Source_vcs ' , false );
149+ $ f_vcs_sent = gpc_get_bool ( 'Source_vcs ' );
116150 $ f_vcs_username = gpc_get_string ( 'Source_vcs_username ' , '' );
117151
118152 # only load and persist the username if things are set and changed
0 commit comments