Code Duplication    Length = 14-14 lines in 2 locations

src/Event/GitHub/IssuesEvent.php 1 location

@@ 15-28 (lines=14) @@
12
13
class IssuesEvent extends BaseEvent
14
{
15
    public function __construct(array $event)
16
    {
17
        parent::__construct(
18
            (int) $event['id'],
19
            new Type(3),
20
            new Information(
21
                $event['payload']['issue']['html_url'],
22
                $event['payload']['issue']['title'],
23
                $this->buildMessage($event)
24
            ),
25
            new Ring(3000, 80),
26
            $this->buildSound($event)
27
        );
28
    }
29
30
    private function buildMessage(array $event): string
31
    {

src/Event/GitHub/PullRequestEvent.php 1 location

@@ 15-28 (lines=14) @@
12
13
class PullRequestEvent extends BaseEvent
14
{
15
    public function __construct(array $event)
16
    {
17
        parent::__construct(
18
            (int) $event['id'],
19
            new Type(2),
20
            new Information(
21
                $event['payload']['pull_request']['html_url'],
22
                $event['payload']['pull_request']['title'],
23
                $this->buildMessage($event)
24
            ),
25
            new Ring(10000, 600),
26
            $this->buildSound($event)
27
        );
28
    }
29
30
    private function buildMessage(array $event): string
31
    {