Code Duplication    Length = 6-6 lines in 2 locations

tests/unit/lib/Api/CirclesTest.php 2 locations

@@ 167-172 (lines=6) @@
164
			foreach ($circles as $circle) {
165
				Circles::addMember($circle->getId(), Env::ENV_TEST_ADMIN2, DeprecatedMember::TYPE_USER);
166
167
				if ($circle->getType() === DeprecatedCircle::CIRCLES_CLOSED) {
168
					// In closed circle, we need to confirm the invitation
169
					Env::setUser(Env::ENV_TEST_ADMIN2);
170
					Circles::joinCircle($circle->getId());
171
					Env::setUser(Env::ENV_TEST_ADMIN1);
172
				}
173
174
				Circles::levelMember(
175
					$circle->getId(), Env::ENV_TEST_ADMIN2, DeprecatedMember::TYPE_USER,
@@ 237-242 (lines=6) @@
234
		try {
235
			foreach ($circles as $circle) {
236
				Circles::addMember($circle->getId(), Env::ENV_TEST_MODERATOR2, DeprecatedMember::TYPE_USER);
237
				if ($circle->getType() === DeprecatedCircle::CIRCLES_CLOSED) {
238
					// In closed circle, we need to confirm the invitation
239
					Env::setUser(Env::ENV_TEST_MODERATOR2);
240
					Circles::joinCircle($circle->getId());
241
					Env::setUser(Env::ENV_TEST_MODERATOR1);
242
				}
243
			}
244
		} catch (Exception $e) {
245
			throw $e;