Code Duplication    Length = 9-9 lines in 4 locations

src/Search.php 4 locations

@@ 82-90 (lines=9) @@
79
     * @return \Generator|Results\Movie
80
     * @throws TmdbException
81
     */
82
    public function searchMovie($query, array $options = array())
83
    {
84
        try {
85
            $this->logger->debug('Starting search movie');
86
            return $this->searchItem('movie', $query, $options, __NAMESPACE__ . "\\Results\\" . 'Movie');
87
        } catch (TmdbException $ex) {
88
            throw $ex;
89
        }
90
    }
91
92
    /**
93
     * Search a TV Show
@@ 99-107 (lines=9) @@
96
     * @return \Generator|Results\TVShow
97
     * @throws TmdbException
98
     */
99
    public function searchTVShow($query, array $options = array())
100
    {
101
        try {
102
            $this->logger->debug('Starting search tv show');
103
            return $this->searchItem('tv', $query, $options, __NAMESPACE__ . "\\Results\\" . 'TVShow');
104
        } catch (TmdbException $ex) {
105
            throw $ex;
106
        }
107
    }
108
109
    /**
110
     * Search a collection
@@ 116-124 (lines=9) @@
113
     * @return \Generator|Results\Collection
114
     * @throws TmdbException
115
     */
116
    public function searchCollection($query, array $options = array())
117
    {
118
        try {
119
            $this->logger->debug('Starting search collection');
120
            return $this->searchItem('collection', $query, $options, __NAMESPACE__ . "\\Results\\" . 'Collection');
121
        } catch (TmdbException $ex) {
122
            throw $ex;
123
        }
124
    }
125
126
    /**
127
     * Search a people
@@ 133-141 (lines=9) @@
130
     * @return \Generator|Results\People
131
     * @throws TmdbException
132
     */
133
    public function searchPeople($query, array $options = array())
134
    {
135
        try {
136
            $this->logger->debug('Starting search people');
137
            return $this->searchItem('people', $query, $options, __NAMESPACE__ . "\\Results\\" . 'People');
138
        } catch (TmdbException $ex) {
139
            throw $ex;
140
        }
141
    }
142
143
    /**
144
     * Get page from result search