Completed
Push — master ( 6b754f...e913ef )
by Sebastien
03:10 queued 52s
created

WatchEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 4
Bugs 0 Features 2
Metric Value
wmc 2
c 4
b 0
f 2
lcom 1
cbo 1
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEventName() 0 4 1
A getAction() 0 4 1
1
<?php
2
3
namespace Smalot\Github\Webhook\Event;
4
5
/**
6
 * Class WatchEvent
7
 * @package Smalot\Github\Webhook\Event
8
 *
9
 * The WatchEvent is related to starring a repository, not watching. See this API blog post for an explanation.
10
 *
11
 * The event’s actor is the user who starred a repository, and the event’s repository is the repository that was starred.
12
 */
13
class WatchEvent extends EventBase
14
{
15
    /**
16
     * @return string
17
     */
18
    public function getEventName()
19
    {
20
        return 'watch';
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function getAction()
27
    {
28
        return $this->payload['action'];
29
    }
30
}
31