Code Duplication    Length = 5-5 lines in 2 locations

apps/files_sharing/lib/Controller/ShareesAPIController.php 2 locations

@@ 726-730 (lines=5) @@
723
	 * @return bool
724
	 */
725
	protected function hasUserInResult($userId) {
726
		foreach ($this->result['exact']['users'] as $result) {
727
			if ($result['value']['shareWith'] === $userId) {
728
				return true;
729
			}
730
		}
731
732
		foreach ($this->result['users'] as $result) {
733
			if ($result['value']['shareWith'] === $userId) {
@@ 732-736 (lines=5) @@
729
			}
730
		}
731
732
		foreach ($this->result['users'] as $result) {
733
			if ($result['value']['shareWith'] === $userId) {
734
				return true;
735
			}
736
		}
737
738
		return false;
739
	}