Code Duplication    Length = 8-8 lines in 5 locations

src/Marvel/Client.php 5 locations

@@ 78-85 (lines=8) @@
75
     *
76
     * @return CharacterDataWrapper
77
     */
78
    public function getCharacter(int $id) : CharacterDataWrapper
79
    {
80
        $response = $this->call('characters/' . $id);
81
82
        $formattedResponse = $this->formatResponse($response, CharacterDataWrapper::class);
83
84
        return $formattedResponse;
85
    }
86
87
    /**
88
     * Fetches lists of comics containing a specific character, with optional filters.
@@ 195-202 (lines=8) @@
192
     *
193
     * @return CharacterDataWrapper
194
     */
195
    public function getCharactersForComic(int $id, CharacterFilter $characterFilter = null) : CharacterDataWrapper
196
    {
197
        $response = $this->call('comics/' . $id . '/characters', $characterFilter);
198
199
        $formattedResponse = $this->formatResponse($response, CharacterDataWrapper::class);
200
201
        return $formattedResponse;
202
    }
203
204
    /**
205
     * Fetches lists of comic creators whose work appears in a specific comic, with optional filters.
@@ 295-302 (lines=8) @@
292
     *
293
     * @return CharacterDataWrapper
294
     */
295
    public function getCharactersForEvent(int $id, CharacterFilter $characterFilter = null) : CharacterDataWrapper
296
    {
297
        $response = $this->call('events/' . $id . '/characters', $characterFilter);
298
299
        $formattedResponse = $this->formatResponse($response, CharacterDataWrapper::class);
300
301
        return $formattedResponse;
302
    }
303
304
    /**
305
     * Fetches lists of comics which take place during a specific event, with optional filters.
@@ 495-502 (lines=8) @@
492
     *
493
     * @return CharacterDataWrapper
494
     */
495
    public function getCharactersForSeries(int $id, CharacterFilter $characterFilter = null) : CharacterDataWrapper
496
    {
497
        $response = $this->call('series/' . $id . '/characters', $characterFilter);
498
499
        $formattedResponse = $this->formatResponse($response, CharacterDataWrapper::class);
500
501
        return $formattedResponse;
502
    }
503
504
    /**
505
     * Fetches lists of comics which are published as part of a specific series, with optional filters.
@@ 612-619 (lines=8) @@
609
     *
610
     * @return CharacterDataWrapper
611
     */
612
    public function getCharactersForStory(int $id, CharacterFilter $characterFilter = null) : CharacterDataWrapper
613
    {
614
        $response = $this->call('stories/' . $id . '/characters', $characterFilter);
615
616
        $formattedResponse = $this->formatResponse($response, CharacterDataWrapper::class);
617
618
        return $formattedResponse;
619
    }
620
621
    /**
622
     * Fetches lists of comics in which a specific story appears, with optional filters.