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.

Code Duplication    Length = 36-36 lines in 2 locations

myth/Auth/FlatAuthorization.php 2 locations

@@ 190-225 (lines=36) @@
187
	 *
188
	 * @return bool
189
	 */
190
	public function addUserToGroup( $user_id, $group )
191
	{
192
		if (empty($user_id) || ! is_numeric($user_id))
193
		{
194
			return null;
195
		}
196
197
		if (empty($group) || (! is_numeric($group) && ! is_string($group) ) )
198
		{
199
			return null;
200
		}
201
202
		if (! Events::trigger('beforeAddUserToGroup', [$user_id, $group]))
203
		{
204
			return false;
205
		}
206
207
		$group_id = $this->getGroupID($group);
208
209
		// Group ID
210
		if ( ! is_numeric( $group_id ) )
211
		{
212
			return null;
213
		}
214
215
		if ( ! $this->groupModel->addUserToGroup( (int)$user_id, (int)$group_id ) )
216
		{
217
			$this->error = $this->groupModel->error();
218
219
			return FALSE;
220
		}
221
222
		Events::trigger('didAddUserToGroup', [$user_id, $group]);
223
224
		return TRUE;
225
	}
226
227
	//--------------------------------------------------------------------
228
@@ 237-272 (lines=36) @@
234
	 *
235
	 * @return mixed
236
	 */
237
	public function removeUserFromGroup( $user_id, $group )
238
	{
239
		if (empty($user_id) || ! is_numeric($user_id))
240
		{
241
			return null;
242
		}
243
244
		if (empty($group) || (! is_numeric($group) && ! is_string($group) ) )
245
		{
246
			return null;
247
		}
248
249
		if (! Events::trigger('beforeRemoveUserFromGroup', [$user_id, $group]))
250
		{
251
			return false;
252
		}
253
254
		$group_id = $this->getGroupID($group);
255
256
		// Group ID
257
		if ( ! is_numeric( $group_id ) )
258
		{
259
			return false;
260
		}
261
262
		if ( ! $this->groupModel->removeUserFromGroup( $user_id, $group_id ) )
263
		{
264
			$this->error = $this->groupModel->error();
265
266
			return FALSE;
267
		}
268
269
		Events::trigger('didRemoveUserFromGroup', [$user_id, $group]);
270
271
		return TRUE;
272
	}
273
274
	//--------------------------------------------------------------------
275