Code Duplication    Length = 7-7 lines in 10 locations

src/WuBookManager.php 10 locations

@@ 83-89 (lines=7) @@
80
     *
81
     * @return IlGala\LaravelWubook\Api\WuBookAuth
82
     */
83
    public function auth()
84
    {
85
        // Setup client
86
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
87
88
        return new WuBookAuth($this->config, $this->cache, $client);
89
    }
90
91
    /**
92
     * Availability API
@@ 97-103 (lines=7) @@
94
     * @param string $token
95
     * @return IlGala\LaravelWubook\Api\WuBookAvailability
96
     */
97
    public function availability($token = null)
98
    {
99
        // Setup client
100
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
101
102
        return new WuBookAvailability($this->config, $this->cache, $client, $token);
103
    }
104
105
    /**
106
     * Cancellation polices API
@@ 124-130 (lines=7) @@
121
     * @param string $token
122
     * @return IlGala\LaravelWubook\Api\WuBookChannelManager
123
     */
124
    public function channel_manager($token = null)
125
    {
126
        // Setup client
127
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
128
129
        return new WuBookChannelManager($this->config, $this->cache, $client, $token);
130
    }
131
132
    /**
133
     * Corporate function API
@@ 138-144 (lines=7) @@
135
     * @param string $token
136
     * @return IlGala\LaravelWubook\Api\WuBookCorporate
137
     */
138
    public function corporate_functions($token = null)
139
    {
140
        // Setup client
141
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
142
143
        return new WuBookCorporate($this->config, $this->cache, $client, $token);
144
    }
145
146
    /**
147
     * Extra functions API
@@ 152-158 (lines=7) @@
149
     * @param string $token
150
     * @return IlGala\LaravelWubook\Api\WuBookExtras
151
     */
152
    public function extras($token = null)
153
    {
154
        // Setup client
155
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
156
157
        return new WuBookExtras($this->config, $this->cache, $client, $token);
158
    }
159
160
    /**
161
     * Prices API
@@ 166-172 (lines=7) @@
163
     * @param string $token
164
     * @return IlGala\LaravelWubook\Api\WuBookPrices
165
     */
166
    public function prices($token = null)
167
    {
168
        // Setup client
169
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
170
171
        return new WuBookPrices($this->config, $this->cache, $client, $token);
172
    }
173
174
    /**
175
     * Reservations API
@@ 180-186 (lines=7) @@
177
     * @param string $token
178
     * @return IlGala\LaravelWubook\Api\WuBookPrices
179
     */
180
    public function reservations($token = null)
181
    {
182
        // Setup client
183
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
184
185
        return new WuBookReservations($this->config, $this->cache, $client, $token);
186
    }
187
188
    /**
189
     * Restrictions API
@@ 194-200 (lines=7) @@
191
     * @param string $token
192
     * @return IlGala\LaravelWubook\Api\WuBookRestrictions
193
     */
194
    public function restrictions($token = null)
195
    {
196
        // Setup client
197
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
198
199
        return new WuBookRestrictions($this->config, $this->cache, $client, $token);
200
    }
201
202
    /**
203
     * Rooms API
@@ 208-214 (lines=7) @@
205
     * @param string $token
206
     * @return IlGala\LaravelWubook\Api\WuBookRooms
207
     */
208
    public function rooms($token = null)
209
    {
210
        // Setup client
211
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
212
213
        return new WuBookRooms($this->config, $this->cache, $client, $token);
214
    }
215
216
    /**
217
     * Transactions API
@@ 222-228 (lines=7) @@
219
     * @param string $token
220
     * @return IlGala\LaravelWubook\Api\WuBookTransactions
221
     */
222
    public function transactions($token = null)
223
    {
224
        // Setup client
225
        $client = new Client(self::ENDPOINT, null, new NativeParser(), new NativeSerializer());
226
227
        return new WuBookTransactions($this->config, $this->cache, $client, $token);
228
    }
229
230
    /**
231
     * Username getter.