Code Duplication    Length = 8-8 lines in 7 locations

Controller/Client.php 7 locations

@@ 144-151 (lines=8) @@
141
     *
142
     * @return StoryDataWrapper
143
     */
144
    public function getStoriesForCharacter(int $id, StoryFilter $storyFilter = null) : StoryDataWrapper
145
    {
146
        $response = $this->call('characters/' . $id . '/stories', $storyFilter);
147
148
        $formattedResponse = $this->formatResponse($response, StoryDataWrapper::class);
149
150
        return $formattedResponse;
151
    }
152
153
    /**
154
     * Fetches lists of comics with optional filters.
@@ 244-251 (lines=8) @@
241
     *
242
     * @return StoryDataWrapper
243
     */
244
    public function getStoriesForComics(int $id, EventFilter $storyFilter = null) : StoryDataWrapper
245
    {
246
        $response = $this->call('comics/' . $id . '/stories', $storyFilter);
247
248
        $formattedResponse = $this->formatResponse($response, StoryDataWrapper::class);
249
250
        return $formattedResponse;
251
    }
252
253
    /**
254
     * Fetches lists of events with optional filters.
@@ 361-368 (lines=8) @@
358
     *
359
     * @return StoryDataWrapper
360
     */
361
    public function getStoriesForEvent(int $id, StoryFilter $storyFilter = null) : StoryDataWrapper
362
    {
363
        $response = $this->call('events/' . $id . '/stories', $storyFilter);
364
365
        $formattedResponse = $this->formatResponse($response, StoryDataWrapper::class);
366
367
        return $formattedResponse;
368
    }
369
370
    /**
371
     * Fetches lists of comic creators with optional filters.
@@ 444-451 (lines=8) @@
441
     *
442
     * @return StoryDataWrapper
443
     */
444
    public function getStoriesForCreator(int $id, StoryFilter $storyFilter = null) : StoryDataWrapper
445
    {
446
        $response = $this->call('creators/' . $id . '/stories', $storyFilter);
447
448
        $formattedResponse = $this->formatResponse($response, StoryDataWrapper::class);
449
450
        return $formattedResponse;
451
    }
452
453
    /**
454
     * Fetches lists of comic series with optional filters.
@@ 561-568 (lines=8) @@
558
     *
559
     * @return StoryDataWrapper
560
     */
561
    public function getStoriesForSeries(int $id, StoryFilter $storyFilter = null) : StoryDataWrapper
562
    {
563
        $response = $this->call('series/' . $id . '/stories', $storyFilter);
564
565
        $formattedResponse = $this->formatResponse($response, StoryDataWrapper::class);
566
567
        return $formattedResponse;
568
    }
569
570
    /**
571
     * Fetches lists of comic stories with optional filters.
@@ 577-584 (lines=8) @@
574
     *
575
     * @return StoryDataWrapper
576
     */
577
    public function getStories(StoryFilter $storyFilter = null) : StoryDataWrapper
578
    {
579
        $response = $this->call('stories', $storyFilter);
580
581
        $formattedResponse = $this->formatResponse($response, StoryDataWrapper::class);
582
583
        return $formattedResponse;
584
    }
585
586
    /**
587
     * This method fetches a single comic story resource.
@@ 593-600 (lines=8) @@
590
     *
591
     * @return StoryDataWrapper
592
     */
593
    public function getStory(int $id) : StoryDataWrapper
594
    {
595
        $response = $this->call('stories/' . $id);
596
597
        $formattedResponse = $this->formatResponse($response, StoryDataWrapper::class);
598
599
        return $formattedResponse;
600
    }
601
602
    /**
603
     * Fetches lists of comic characters appearing in a single story, with optional filters.