Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

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