Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

@@ 59-68 (lines=10) @@
56
    public function all()
57
    {
58
        $this->response = $this->bbb->getMeetings();
59
        if ($this->response->success()) {
60
            if (count($this->response->getRawXml()->meetings->meeting) > 0) {
61
                $meetings = [];
62
                foreach ($this->response->getRawXml()->meetings->meeting as $meeting) {
63
                    $meetings[] = XmlToArray($meeting);
64
                }
65
66
                return collect(XmlToArray($meetings));
67
            }
68
        }
69
70
        return collect([]);
71
    }
@@ 232-239 (lines=8) @@
229
        }
230
231
        $this->response = $this->bbb->getRecordings($recording);
232
        if (count($this->response->getRawXml()->recordings->recording) > 0) {
233
            $recordings = [];
234
            foreach ($this->response->getRawXml()->recordings->recording as $r) {
235
                $recordings[] = XmlToArray($r);
236
            }
237
238
            return collect($recordings);
239
        }
240
241
        return collect([]);
242
    }