Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

@@ 49-58 (lines=10) @@
46
    public function all()
47
    {
48
        $this->response = $this->bbb->getMeetings();
49
        if ($this->response->success()) {
50
            if (count($this->response->getRawXml()->meetings->meeting) > 0) {
51
                $meetings = [];
52
                foreach ($this->response->getRawXml()->meetings->meeting as $meeting) {
53
                    $meetings[] = XmlToArray($meeting);
54
                }
55
56
                return collect(XmlToArray($meetings));
57
            }
58
        }
59
60
        return collect([]);
61
    }
@@ 218-225 (lines=8) @@
215
        }
216
217
        $this->response = $this->bbb->getRecordings($recording);
218
        if (count($this->response->getRawXml()->recordings->recording) > 0) {
219
            $recordings = [];
220
            foreach ($this->response->getRawXml()->recordings->recording as $r) {
221
                $recordings[] = XmlToArray($r);
222
            }
223
224
            return collect($recordings);
225
        }
226
227
        return collect([]);
228
    }