Code Duplication    Length = 4-4 lines in 3 locations

apps/federatedfilesharing/lib/AddressHandler.php 1 location

@@ 85-88 (lines=4) @@
82
83
		// Find the last @ before $invalidPos
84
		$pos = $lastAtPos = 0;
85
		while ($lastAtPos !== false && $lastAtPos <= $invalidPos) {
86
			$pos = $lastAtPos;
87
			$lastAtPos = strpos($id, '@', $pos + 1);
88
		}
89
90
		if ($pos !== false) {
91
			$user = substr($id, 0, $pos);

lib/private/Share/Helper.php 1 location

@@ 275-278 (lines=4) @@
272
273
		// Find the last @ before $invalidPos
274
		$pos = $lastAtPos = 0;
275
		while ($lastAtPos !== false && $lastAtPos <= $invalidPos) {
276
			$pos = $lastAtPos;
277
			$lastAtPos = strpos($id, '@', $pos + 1);
278
		}
279
280
		if ($pos !== false) {
281
			$user = substr($id, 0, $pos);

apps/files_sharing/lib/Controller/ShareesAPIController.php 1 location

@@ 378-381 (lines=4) @@
375
376
		// Find the last @ before $invalidPos
377
		$pos = $lastAtPos = 0;
378
		while ($lastAtPos !== false && $lastAtPos <= $invalidPos) {
379
			$pos = $lastAtPos;
380
			$lastAtPos = strpos($id, '@', $pos + 1);
381
		}
382
383
		if ($pos !== false) {
384
			$user = substr($id, 0, $pos);