Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

@@ 90-99 (lines=10) @@
87
    public function all()
88
    {
89
        $this->response = $this->bbb->getMeetings();
90
        if ($this->response->success()) {
91
            if (count($this->response->getRawXml()->meetings->meeting) > 0) {
92
                $meetings = [];
93
                foreach ($this->response->getRawXml()->meetings->meeting as $meeting) {
94
                    $meetings[] = XmlToArray($meeting);
95
                }
96
97
                return collect(XmlToArray($meetings));
98
            }
99
        }
100
101
        return collect([]);
102
    }
@@ 264-271 (lines=8) @@
261
        }
262
263
        $this->response = $this->bbb->getRecordings($recording);
264
        if (count($this->response->getRawXml()->recordings->recording) > 0) {
265
            $recordings = [];
266
            foreach ($this->response->getRawXml()->recordings->recording as $r) {
267
                $recordings[] = XmlToArray($r);
268
            }
269
270
            return collect($recordings);
271
        }
272
273
        return collect([]);
274
    }