Code Duplication    Length = 13-13 lines in 2 locations

src/PodcastScraper.php 2 locations

@@ 52-64 (lines=13) @@
49
     * @return array
50
     * @throws Exception
51
     */
52
    private function search(Request $request, $value)
53
    {
54
        $response = $request->create($this->vendor->generateUrl($value));
55
56
        if (is_null($response)) {
57
            throw new Exception("Request to Itunes API failed", $request->getStatusCode());
58
        }
59
60
        return [
61
            'search'      => $response,
62
            'status'      => true,
63
        ];
64
    }
65
66
    /**
67
     * @param  string $feedUrl
@@ 114-126 (lines=13) @@
111
     * @return array
112
     * @throws Exception
113
     */
114
    private function read(Request $request, $feedUrl)
115
    {
116
        $output = $request->create($feedUrl);
117
118
        if (is_null($output)) {
119
            throw new Exception("Request to RSS failed", $request->getStatusCode());
120
        }
121
122
        return [
123
            'feed'        => $output,
124
            'status'      => true,
125
        ];
126
    }
127
128
    /**
129
     * @param string $feedUrl