Code Duplication    Length = 8-10 lines in 2 locations

src/Bbb.php 2 locations

@@ 48-57 (lines=10) @@
45
    public function all()
46
    {
47
        $this->response = $this->bbb->getMeetings();
48
        if ($this->response->success()) {
49
            if (count($this->response->getRawXml()->meetings->meeting) > 0) {
50
                $meetings = [];
51
                foreach ($this->response->getRawXml()->meetings->meeting as $meeting) {
52
                    $meetings[] = $meeting;
53
                }
54
55
                return collect($meetings);
56
            }
57
        }
58
59
        return collect([]);
60
    }
@@ 217-224 (lines=8) @@
214
        }
215
216
        $this->response = $this->bbb->getRecordings($recording);
217
        if (count($this->response->getRawXml()->recordings->recording) > 0) {
218
            $recordings = [];
219
            foreach ($this->response->getRawXml()->recordings->recording as $r) {
220
                $recordings[] = $r;
221
            }
222
223
            return collect($recordings);
224
        }
225
226
        return collect([]);
227
    }