Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

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