Code Duplication    Length = 11-11 lines in 3 locations

plugin/bbb/lib/bbb.lib.php 3 locations

@@ 282-292 (lines=11) @@
279
        while ($status == false) {
280
281
            $meetingIsRunningInfo = $this->getMeetingInfo($params);
282
            if ($meetingIsRunningInfo === false) {
283
                //checking with the remote_id didn't work, so just in case and
284
                // to provide backwards support, check with the id
285
                $params = array(
286
                    'meetingId' => $meetingData['id'],
287
                    //  -- REQUIRED - The unique id for the meeting
288
                    'password' => $this->getModMeetingPassword()
289
                    //  -- REQUIRED - The moderator password for the meeting
290
                );
291
                $meetingIsRunningInfo = $this->getMeetingInfo($params);
292
            }
293
294
            if ($this->debug) {
295
                error_log(print_r($meetingIsRunningInfo, 1));
@@ 393-403 (lines=11) @@
390
391
        foreach ($meetingList as $meetingDB) {
392
            $meetingBBB = $this->getMeetingInfo(array('meetingId' => $meetingDB['remote_id'], 'password' => $pass));
393
            if ($meetingBBB === false) {
394
                //checking with the remote_id didn't work, so just in case and
395
                // to provide backwards support, check with the id
396
                $params = array(
397
                    'meetingId' => $meetingDB['id'],
398
                    //  -- REQUIRED - The unique id for the meeting
399
                    'password' => $pass
400
                    //  -- REQUIRED - The moderator password for the meeting
401
                );
402
                $meetingBBB = $this->getMeetingInfo($params);
403
            }
404
405
            if ($meetingDB['visibility'] == 0 and $this->isTeacher() == false) {
406
                continue;
@@ 709-719 (lines=11) @@
706
        }
707
        $pass = $this->getModMeetingPassword();
708
        $info = $this->getMeetingInfo(array('meetingId' => $meetingData['remote_id'], 'password' => $pass));
709
        if ($info === false) {
710
            //checking with the remote_id didn't work, so just in case and
711
            // to provide backwards support, check with the id
712
            $params = array(
713
                'meetingId' => $meetingData['id'],
714
                //  -- REQUIRED - The unique id for the meeting
715
                'password' => $pass
716
                //  -- REQUIRED - The moderator password for the meeting
717
            );
718
            $info = $this->getMeetingInfo($params);
719
        }
720
721
        if (!empty($info) && isset($info['participantCount'])) {
722
            return $info['participantCount'];