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

PushModel   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 50
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getRef() 0 4 1
A getHead() 0 4 1
A getBefore() 0 4 1
A getSize() 0 4 1
A getDistinctSize() 0 4 1
A getCommits() 0 4 1
1
<?php
2
3
namespace Smalot\Github\Webhook\Model;
4
5
/**
6
 * Class PushModel
7
 * @package Smalot\Github\Webhook\Model
8
 *
9
 * Triggered when a repository branch is pushed to. In addition to branch pushes,
10
 * webhook push events are also triggered when repository tags are pushed.
11
 */
12
class PushModel extends ModelBase
13
{
14
    /**
15
     * @return string
16
     */
17
    public function getRef()
18
    {
19
        return $this->payload['ref'];
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getHead()
26
    {
27
        return $this->payload['head'];
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getBefore()
34
    {
35
        return $this->payload['before'];
36
    }
37
38
    /**
39
     * @return int
40
     */
41
    public function getSize()
42
    {
43
        return $this->payload['size'];
44
    }
45
46
    /**
47
     * @return int
48
     */
49
    public function getDistinctSize()
50
    {
51
        return $this->payload['distinct_size'];
52
    }
53
54
    /**
55
     * @return array
56
     */
57
    public function getCommits()
58
    {
59
        return $this->payload['commits'];
60
    }
61
}
62