Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

@@ 111-120 (lines=10) @@
108
    public function all()
109
    {
110
        $this->response = $this->bbb->getMeetings();
111
        if ($this->response->success()) {
112
            if (count($this->response->getRawXml()->meetings->meeting) > 0) {
113
                $meetings = [];
114
                foreach ($this->response->getRawXml()->meetings->meeting as $meeting) {
115
                    $meetings[] = XmlToArray($meeting);
116
                }
117
118
                return collect(XmlToArray($meetings));
119
            }
120
        }
121
122
        return collect([]);
123
    }
@@ 283-290 (lines=8) @@
280
        }
281
282
        $this->response = $this->bbb->getRecordings($recording);
283
        if (count($this->response->getRawXml()->recordings->recording) > 0) {
284
            $recordings = [];
285
            foreach ($this->response->getRawXml()->recordings->recording as $r) {
286
                $recordings[] = XmlToArray($r);
287
            }
288
289
            return collect($recordings);
290
        }
291
292
        return collect([]);
293
    }