GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( fc2f08...10d0e6 )
by
unknown
61:03
created
plugins/git/include/Git/Driver/Gerrit/ProjectCreator.class.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -84,6 +84,9 @@  discard block
 block discarded – undo
84 84
     /** @var Git_Driver_Gerrit_Template_TemplateFactory */
85 85
     private $template_factory;
86 86
 
87
+    /**
88
+     * @param string $dir
89
+     */
87 90
     public function __construct(
88 91
         $dir,
89 92
         Git_Driver_Gerrit_GerritDriverFactory $driver_factory,
@@ -204,6 +207,9 @@  discard block
 block discarded – undo
204 207
         $executor->exportBranchesAndTags($gerrit_project_url);
205 208
     }
206 209
 
210
+    /**
211
+     * @param string $replication_group
212
+     */
207 213
     private function pushFullTuleapAccessRightsToGerrit(GitRepository $repository, Git_RemoteServer_GerritServer $gerrit_server, array $ugroups, $replication_group, $template_id) {
208 214
         foreach ($ugroups as $ugroup) {
209 215
             $this->addGroupToGroupFile($gerrit_server, $repository->getProject()->getUnixName().'/'.$ugroup->getNormalizedName());
@@ -263,6 +269,9 @@  discard block
 block discarded – undo
263 269
         $this->addGroupDefinitionToGroupFile('global:Registered-Users', self::GROUP_REGISTERED_USERS);
264 270
     }
265 271
 
272
+    /**
273
+     * @param string $uuid
274
+     */
266 275
     private function addGroupDefinitionToGroupFile($uuid, $group_name) {
267 276
         file_put_contents("$this->dir/groups", "$uuid\t$group_name\n", FILE_APPEND);
268 277
     }
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/Gerrit/RemoteSSHCommandFailure.class.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -24,6 +24,10 @@
 block discarded – undo
24 24
     private $std_out;
25 25
     private $std_err;
26 26
 
27
+    /**
28
+     * @param string $std_out
29
+     * @param string $std_err
30
+     */
27 31
     function __construct($exit_code, $std_out, $std_err) {
28 32
         parent::__construct(implode(PHP_EOL, array("exit_code: $exit_code", "std_err: $std_err", "std_out: $std_out")));
29 33
         $this->exit_code = $exit_code;
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/Gerrit/Template/Template.class.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     /**
75 75
      * @param int $group_id
76 76
      *
77
-     * @return True if this template belongs to the given project
77
+     * @return boolean if this template belongs to the given project
78 78
      */
79 79
     public function belongsToProject($group_id) {
80 80
         return $this->group_id == $group_id;
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/Gerrit/Template/TemplateDao.class.php 1 patch
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -27,6 +27,9 @@  discard block
 block discarded – undo
27 27
  */
28 28
 class Git_Driver_Gerrit_Template_TemplateDao extends DataAccessObject {
29 29
 
30
+    /**
31
+     * @param integer $project_id
32
+     */
30 33
     public function getAllTemplatesOfProject($project_id) {
31 34
         $project_id = $this->da->escapeInt($project_id);
32 35
 
@@ -37,6 +40,9 @@  discard block
 block discarded – undo
37 40
         return $this->retrieve($sql);
38 41
     }
39 42
 
43
+    /**
44
+     * @param integer $template_id
45
+     */
40 46
     public function getTemplate($template_id) {
41 47
         $template_id = $this->da->escapeInt($template_id);
42 48
 
@@ -47,6 +53,11 @@  discard block
 block discarded – undo
47 53
         return $this->retrieve($sql);
48 54
     }
49 55
 
56
+    /**
57
+     * @param integer $project_id
58
+     * @param string $name
59
+     * @param string $content
60
+     */
50 61
     public function addTemplate($project_id, $name, $content) {
51 62
         $project_id = $this->da->escapeInt($project_id);
52 63
         $name       = $this->da->quoteSmart($name);
@@ -65,6 +76,11 @@  discard block
 block discarded – undo
65 76
         return $this->update($sql);
66 77
     }
67 78
 
79
+    /**
80
+     * @param integer $template_id
81
+     * @param string $name
82
+     * @param string $content
83
+     */
68 84
     public function updateTemplate($template_id, $name, $content) {
69 85
         $template_id = $this->da->escapeInt($template_id);
70 86
         $name        = $this->da->quoteSmart($name);
@@ -77,6 +93,9 @@  discard block
 block discarded – undo
77 93
         return $this->update($sql);
78 94
     }
79 95
 
96
+    /**
97
+     * @param integer $template_id
98
+     */
80 99
     public function deleteTemplate($template_id) {
81 100
         $template_id = $this->da->escapeInt($template_id);
82 101
 
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/Gerrit/Template/TemplateFactory.class.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
      * Instatiate a Template from a SQL row
129 129
      *
130 130
      * @param array
131
-     * @return Git_Driver_Gerrit_Template_Template[] | false -where the array is in DAR format
131
+     * @return Git_Driver_Gerrit_Template_Template | false -where the array is in DAR format
132 132
      */
133 133
     private function instantiateTemplateFromRow(array $row) {
134 134
         return new Git_Driver_Gerrit_Template_Template(
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/Gerrit/UmbrellaProjectManager.class.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 
74 74
     /**
75 75
      * set the inheritance on all Project's servers
76
-     * @param array $gerrit_servers
77
-     * @param type $project_name
78
-     * @param type $parent_project_name
76
+     * @param Git_RemoteServer_GerritServer[] $gerrit_servers
77
+     * @param type $project
78
+     * @param type $parent_project
79 79
      */
80 80
     private function setProjectInheritanceOnServers(array $gerrit_servers, Project $project, Project $parent_project) {
81 81
         foreach ($gerrit_servers as $gerrit_server) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     }
91 91
 
92 92
     /**
93
-     * @param array $gerrit_servers
93
+     * @param Git_RemoteServer_GerritServer[] $gerrit_servers
94 94
      * @param Project $project
95 95
      */
96 96
     private function resetProjectInheritanceOnServers(array $gerrit_servers, Project $project) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     }
106 106
 
107 107
     /**
108
-     * @param array $gerrit_servers
108
+     * @param Git_RemoteServer_GerritServer[] $gerrit_servers
109 109
      * @param Project $project
110 110
      */
111 111
     private function createProjectOnServers(array $gerrit_servers, Project $project) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     /**
128 128
      *
129 129
      * @param ProjectUGroup[] $ugroups
130
-     * @return null | ProjectUGroup
130
+     * @return ProjectUGroup|null | ProjectUGroup
131 131
      */
132 132
     private function getAdminUGroup(array $ugroups) {
133 133
         foreach ($ugroups as $ugroup) {
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/Gerrit/UserAccountManager.class.php 1 patch
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,6 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @param array $original_keys
73 73
      * @param array $new_keys
74
-     * @param Git_RemoteServer_GerritServerFactory $remote_gerrit_factory
75 74
      * @return void
76 75
      * @throws Git_UserSynchronisationException
77 76
      */
@@ -118,7 +117,6 @@  discard block
 block discarded – undo
118 117
     /**
119 118
      * Makes sure there is one copy of each key on each remote server
120 119
      * 
121
-     * @param Git_RemoteServer_GerritServerFactory $remote_gerrit_factory
122 120
      * @return void
123 121
      * @throws Git_UserSynchronisationException
124 122
      */
@@ -202,7 +200,7 @@  discard block
 block discarded – undo
202 200
      *
203 201
      * @param array $keys_to_add
204 202
      * @param array $keys_to_remove
205
-     * @return array
203
+     * @return boolean
206 204
      */
207 205
     private function areThereKeysToUpdate(Array $keys_to_add, Array $keys_to_remove) {
208 206
         return $keys_to_add || $keys_to_remove;
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/Gerrit/UserFinder.class.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     }
37 37
 
38 38
 
39
-    /** @return bool */
39
+    /** @return boolean|null */
40 40
     public function areRegisteredUsersAllowedTo($permission_type, GitRepository $repository) {
41 41
         if ($permission_type == Git::SPECIAL_PERM_ADMIN) {
42 42
             return false;
Please login to merge, or discard this patch.
plugins/git/include/Git/Driver/GerritLegacy.class.php 1 patch
Doc Comments   +39 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      *
92 92
      * @param Git_RemoteServer_GerritServer $server
93 93
      * @param string $project_name
94
-     * @return true if the gerrit project exists, else return false
94
+     * @return boolean if the gerrit project exists, else return false
95 95
      */
96 96
     public function doesTheParentProjectExist(Git_RemoteServer_GerritServer $server, $project_name) {
97 97
         return in_array($project_name, $this->listParentProjects($server));
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     /**
101 101
      * @param Git_RemoteServer_GerritServer $server
102 102
      * @param string $project_name
103
-     * @return true if the gerrit project exists, else return false
103
+     * @return boolean if the gerrit project exists, else return false
104 104
      *
105 105
      * @throws Git_Driver_Gerrit_Exception
106 106
      */
@@ -163,6 +163,9 @@  discard block
 block discarded – undo
163 163
         $this->logger->info("Gerrit: Group $group_name successfully created");
164 164
     }
165 165
 
166
+    /**
167
+     * @param string $group_full_name
168
+     */
166 169
     public function getGroupUUID(Git_RemoteServer_GerritServer $server, $group_full_name) {
167 170
         $json_result = $this->getAccountGroupsInfo($server, $group_full_name);
168 171
         if (isset($json_result->columns->group_uuid)) {
@@ -176,7 +179,7 @@  discard block
 block discarded – undo
176 179
      * Can throw Git_Driver_Gerrit_RemoteSSHCommandFailure exception
177 180
      *
178 181
      * @param Git_RemoteServer_GerritServer $server
179
-     * @param type $group_full_name
182
+     * @param string $group_full_name
180 183
      *
181 184
      * @return type
182 185
      */
@@ -193,6 +196,9 @@  discard block
 block discarded – undo
193 196
         return json_decode(array_shift(explode("\n", $command_result)));
194 197
     }
195 198
 
199
+    /**
200
+     * @param string $group_name
201
+     */
196 202
     public function doesTheGroupExist(Git_RemoteServer_GerritServer $server, $group_name) {
197 203
         return in_array($group_name, $this->listGroups($server));
198 204
     }
@@ -223,15 +229,24 @@  discard block
 block discarded – undo
223 229
         return $group_info;
224 230
     }
225 231
 
232
+    /**
233
+     * @param string $command
234
+     */
226 235
     private function computeException(Git_Driver_Gerrit_RemoteSSHCommandFailure $e, $command) {
227 236
         return $this->isGerritFailure($e) ? $this->gerritDriverException($e, $command) : $e;
228 237
 
229 238
     }
230 239
 
240
+    /**
241
+     * @param Git_Driver_Gerrit_RemoteSSHCommandFailure $e
242
+     */
231 243
     private function isGerritFailure($e) {
232 244
         return $e->getExitCode() === self::EXIT_CODE;
233 245
     }
234 246
 
247
+    /**
248
+     * @param Git_Driver_Gerrit_RemoteSSHCommandFailure $e
249
+     */
235 250
     private function gerritDriverException($e, $command) {
236 251
         return new Git_Driver_Gerrit_Exception("Command: $command".PHP_EOL."Error: ".$e->getStdErr());
237 252
     }
@@ -254,7 +269,7 @@  discard block
 block discarded – undo
254 269
      * Can throw Git_Driver_Gerrit_RemoteSSHCommandFailure exception
255 270
      *
256 271
      * @param Git_RemoteServer_GerritServer $server
257
-     * @param PFUser $user
272
+     * @param Git_Driver_Gerrit_User $user
258 273
      * @param String $group_name
259 274
      */
260 275
     public function addUserToGroup(Git_RemoteServer_GerritServer $server, Git_Driver_Gerrit_User $user, $group_name) {
@@ -272,7 +287,7 @@  discard block
 block discarded – undo
272 287
      * Can throw Git_Driver_Gerrit_RemoteSSHCommandFailure exception
273 288
      *
274 289
      * @param Git_RemoteServer_GerritServer $server
275
-     * @param PFUser $user
290
+     * @param Git_Driver_Gerrit_User $user
276 291
      * @param String $group_name
277 292
      */
278 293
     public function removeUserFromGroup(Git_RemoteServer_GerritServer $server, Git_Driver_Gerrit_User $user, $group_name) {
@@ -310,6 +325,10 @@  discard block
 block discarded – undo
310 325
         $this->flushGerritCacheGroupsInclude($server);
311 326
     }
312 327
 
328
+    /**
329
+     * @param string $group_name
330
+     * @param string $included_group_name
331
+     */
313 332
     private function insertAccountGroupIncludes(Git_RemoteServer_GerritServer $server, $group_name, $included_group_name) {
314 333
         $sql_query = "INSERT INTO account_group_includes (group_id, include_id) SELECT G.group_id, I.group_id FROM account_groups G, account_groups I WHERE G.name='".$group_name."' AND I.name='".$included_group_name."'";
315 334
         $this->executeQuery($server, $sql_query);
@@ -333,14 +352,23 @@  discard block
 block discarded – undo
333 352
         $this->executeQuery($server, $sql_query);
334 353
     }
335 354
 
355
+    /**
356
+     * @param Git_RemoteServer_GerritServer $server
357
+     */
336 358
     public function flushGerritCacheAccounts($server) {
337 359
         $this->flushGerritCaches($server, self::CACHE_ACCOUNTS);
338 360
     }
339 361
 
362
+    /**
363
+     * @param Git_RemoteServer_GerritServer $server
364
+     */
340 365
     private function flushGerritCacheGroupsInclude($server) {
341 366
         $this->flushGerritCaches($server, self::CACHE_GROUPS_INCLUDES);
342 367
     }
343 368
 
369
+    /**
370
+     * @param string $cache
371
+     */
344 372
     private function flushGerritCaches($server, $cache=null) {
345 373
         $query = self::COMMAND .' flush-caches';
346 374
         if ($cache) {
@@ -349,6 +377,9 @@  discard block
 block discarded – undo
349 377
         $this->ssh->execute($server, $query);
350 378
     }
351 379
 
380
+    /**
381
+     * @param string $string
382
+     */
352 383
     private function escapeSQLQuery($string) {
353 384
         $escaped_string = str_replace(' ', '\ ', $string);
354 385
         $escaped_string = str_replace("'", "\\'", $escaped_string);
@@ -434,6 +465,9 @@  discard block
 block discarded – undo
434 465
         return preg_match("/\s$plugin\s+[^\s]+\s+$is_enabled/", $plugins_list);
435 466
     }
436 467
 
468
+    /**
469
+     * @param string $plugins_list
470
+     */
437 471
     private function isDeletePluginInstalled($plugins_list) {
438 472
         return strstr($plugins_list, self::DELETEPROJECT_PLUGIN_NAME);
439 473
     }
@@ -476,7 +510,6 @@  discard block
 block discarded – undo
476 510
 
477 511
     /**
478 512
      * @param Git_RemoteServer_GerritServer $server
479
-     * @param PFUser $gerrit_users_to_suspend
480 513
      *
481 514
      * @throws Git_Driver_Gerrit_Exception
482 515
      */
Please login to merge, or discard this patch.