Code Duplication    Length = 16-17 lines in 2 locations

lib/Service/MembersService.php 1 location

@@ 114-129 (lines=16) @@
111
	 * @return array
112
	 * @throws \Exception
113
	 */
114
	public function addMember($circleUniqueId, $ident, $type) {
115
116
		try {
117
			$circle = $this->circlesRequest->getCircle($circleUniqueId, $this->userId);
118
			$circle->getHigherViewer()
119
				   ->hasToBeModerator();
120
121
			if (!$this->addMassiveMembers($circle, $ident, $type)) {
122
				$this->addSingleMember($circle, $ident, $type);
123
			}
124
		} catch (\Exception $e) {
125
			throw $e;
126
		}
127
128
		return $this->membersRequest->getMembers($circle->getUniqueId(), $circle->getHigherViewer());
129
	}
130
131
132
	/**

lib/Service/SharingFrameService.php 1 location

@@ 122-138 (lines=17) @@
119
	 * @throws Exception
120
	 * @throws MemberDoesNotExistException
121
	 */
122
	public function createFrame($circleUniqueId, SharingFrame $frame, $broadcast = null) {
123
124
		try {
125
			$circle = $this->circlesRequest->getCircle($circleUniqueId, $this->userId);
126
			$circle->getHigherViewer()
127
				   ->hasToBeMember();
128
129
			$frame->setCircle($circle);
130
131
			$this->generateHeaders($frame, $circle, $broadcast);
132
			$this->circlesRequest->saveFrame($frame);
133
134
			$this->initiateShare($circle->getUniqueId(), $frame->getUniqueId());
135
		} catch (Exception $e) {
136
			throw $e;
137
		}
138
	}
139
140
141
	/**