Code Duplication    Length = 17-18 lines in 2 locations

lib/Service/SharingFrameService.php 1 location

@@ 128-144 (lines=17) @@
125
	 * @throws Exception
126
	 * @throws MemberDoesNotExistException
127
	 */
128
	public function createFrame($circleUniqueId, SharingFrame $frame, $broadcast = null) {
129
130
		try {
131
			$circle = $this->circlesRequest->getCircle($circleUniqueId, $this->userId);
132
			$circle->getHigherViewer()
133
				   ->hasToBeMember();
134
135
			$frame->setCircle($circle);
136
137
			$this->generateHeaders($frame, $circle, $broadcast);
138
			$this->sharingFrameRequest->saveSharingFrame($frame);
139
140
			$this->initiateShare($circle->getUniqueId(), $frame->getUniqueId());
141
		} catch (Exception $e) {
142
			throw $e;
143
		}
144
	}
145
146
147
	/**

lib/Service/MembersService.php 1 location

@@ 122-139 (lines=18) @@
119
	 * @return array
120
	 * @throws \Exception
121
	 */
122
	public function addMember($circleUniqueId, $ident, $type) {
123
124
		try {
125
			$circle = $this->circlesRequest->getCircle($circleUniqueId, $this->userId);
126
			$circle->getHigherViewer()
127
				   ->hasToBeModerator();
128
129
			if (!$this->addMassiveMembers($circle, $ident, $type)) {
130
				$this->addSingleMember($circle, $ident, $type);
131
			}
132
		} catch (\Exception $e) {
133
			throw $e;
134
		}
135
136
		return $this->membersRequest->getMembers(
137
			$circle->getUniqueId(), $circle->getHigherViewer()
138
		);
139
	}
140
141
142
	/**