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/SharesService.php 1 location

@@ 114-130 (lines=17) @@
111
	 * @throws Exception
112
	 * @throws MemberDoesNotExistException
113
	 */
114
	public function createFrame($circleUniqueId, SharingFrame $frame, $broadcast = null) {
115
116
		try {
117
			$circle = $this->circlesRequest->getCircle($circleUniqueId, $this->userId);
118
			$circle->getHigherViewer()
119
				   ->hasToBeMember();
120
121
			$frame->setCircle($circle);
122
123
			$this->generateHeaders($frame, $circle, $broadcast);
124
			$this->circlesRequest->saveFrame($frame);
125
126
			$this->initiateShare($circle->getUniqueId(), $frame->getUniqueId());
127
		} catch (Exception $e) {
128
			throw $e;
129
		}
130
	}
131
132
133
	/**