Code Duplication    Length = 11-11 lines in 2 locations

app/Listeners/Subscribers/ExperienceSubscriber.php 1 location

@@ 56-66 (lines=11) @@
53
     *
54
     * @return bool
55
     */
56
    public function postWasCreated(PostWasCreatedEvent $event)
57
    {
58
        $data = [
59
            'amount' => $this->experiences[PostWasCreatedEvent::class],
60
            'obtainable_id' => $event->post->getKey(),
61
            'obtainable_type' => get_class($event->post),
62
            'event_type' => PostWasCreatedEvent::class
63
        ];
64
65
        return $this->create($data);
66
    }
67
68
    /**
69
     * Handle a PostWasSolved event.

app/Listeners/Subscribers/RubySubscriber.php 1 location

@@ 49-59 (lines=11) @@
46
     *
47
     * @return bool
48
     */
49
    public function postWasSolved(PostWasSolvedEvent $event)
50
    {
51
        $data = [
52
            'user_id' => $event->post->user_id,
53
            'obtainable_id' => $event->post->getKey(),
54
            'obtainable_type' => get_class($event->post),
55
            'event_type' => PostWasSolvedEvent::class
56
        ];
57
58
        return $this->create($data);
59
    }
60
61
    /**
62
     * Create the ruby.