Completed
Push — master ( 8a38f1...a11cc6 )
by Sebastien
02:33
created

PullRequestModel::getPullRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Smalot\Github\Webhook\Model;
4
5
/**
6
 * Class PullRequestModel
7
 * @package Smalot\Github\Webhook\Model
8
 *
9
 * Triggered when a pull request is assigned, unassigned, labeled, unlabeled,
10
 * opened, closed, reopened, or synchronized.
11
 */
12
class PullRequestModel extends ModelBase
13
{
14
    /**
15
     * @return string
16
     */
17
    public function getAction()
18
    {
19
        return $this->payload['action'];
20
    }
21
22
    /**
23
     * @return int
24
     */
25
    public function getNumber()
26
    {
27
        return $this->payload['number'];
28
    }
29
30
    /**
31
     * @return array
32
     */
33
    public function getPullRequest()
34
    {
35
        return $this->payload['pull_request'];
36
    }
37
}
38