Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

@@ 74-83 (lines=10) @@
71
    public function all()
72
    {
73
        $this->response = $this->bbb->getMeetings();
74
        if ($this->response->success()) {
75
            if (count($this->response->getRawXml()->meetings->meeting) > 0) {
76
                $meetings = [];
77
                foreach ($this->response->getRawXml()->meetings->meeting as $meeting) {
78
                    $meetings[] = XmlToArray($meeting);
79
                }
80
81
                return collect(XmlToArray($meetings));
82
            }
83
        }
84
85
        return collect([]);
86
    }
@@ 248-255 (lines=8) @@
245
        }
246
247
        $this->response = $this->bbb->getRecordings($recording);
248
        if (count($this->response->getRawXml()->recordings->recording) > 0) {
249
            $recordings = [];
250
            foreach ($this->response->getRawXml()->recordings->recording as $r) {
251
                $recordings[] = XmlToArray($r);
252
            }
253
254
            return collect($recordings);
255
        }
256
257
        return collect([]);
258
    }