Code Duplication    Length = 5-6 lines in 5 locations

apps/files_sharing/lib/Activity/Providers/PublicLinks.php 1 location

@@ 122-126 (lines=5) @@
119
				];
120
			case self::SUBJECT_RESHARED_LINK_BY:
121
			case self::SUBJECT_UNSHARED_LINK_BY:
122
			case self::SUBJECT_LINK_BY_EXPIRED:
123
				return [
124
					'file' => $this->getFile($parameters[0], $event),
125
					'actor' => $this->getUser($parameters[1]),
126
				];
127
		}
128
		return [];
129
	}

apps/files_sharing/lib/Activity/Providers/Users.php 3 locations

@@ 117-121 (lines=5) @@
114
115
		switch ($subject) {
116
			case self::SUBJECT_SHARED_USER_SELF:
117
			case self::SUBJECT_UNSHARED_USER_SELF:
118
				return [
119
					'file' => $this->getFile($parameters[0], $event),
120
					'user' => $this->getUser($parameters[1]),
121
				];
122
			case self::SUBJECT_SHARED_WITH_BY:
123
			case self::SUBJECT_UNSHARED_BY:
124
				return [
@@ 123-127 (lines=5) @@
120
					'user' => $this->getUser($parameters[1]),
121
				];
122
			case self::SUBJECT_SHARED_WITH_BY:
123
			case self::SUBJECT_UNSHARED_BY:
124
				return [
125
					'file' => $this->getFile($parameters[0], $event),
126
					'actor' => $this->getUser($parameters[1]),
127
				];
128
			case self::SUBJECT_RESHARED_USER_BY:
129
			case self::SUBJECT_UNSHARED_USER_BY:
130
				return [
@@ 129-134 (lines=6) @@
126
					'actor' => $this->getUser($parameters[1]),
127
				];
128
			case self::SUBJECT_RESHARED_USER_BY:
129
			case self::SUBJECT_UNSHARED_USER_BY:
130
				return [
131
					'file' => $this->getFile($parameters[0], $event),
132
					'user' => $this->getUser($parameters[2]),
133
					'actor' => $this->getUser($parameters[1]),
134
				];
135
		}
136
		return [];
137
	}

apps/files_sharing/lib/Activity/Providers/Groups.php 1 location

@@ 127-132 (lines=6) @@
124
125
		switch ($subject) {
126
			case self::SUBJECT_RESHARED_GROUP_BY:
127
			case self::SUBJECT_UNSHARED_GROUP_BY:
128
				return [
129
					'file' => $this->getFile($parameters[0], $event),
130
					'group' => $this->generateGroupParameter($parameters[2]),
131
					'actor' => $this->getUser($parameters[1]),
132
				];
133
			case self::SUBJECT_SHARED_GROUP_SELF:
134
			case self::SUBJECT_UNSHARED_GROUP_SELF:
135
				return [