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

ModelBase::getRepository()   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 ModelBase
7
 * @package Smalot\Github\Webhook\Model
8
 */
9
abstract class ModelBase
10
{
11
    /**
12
     * @var array
13
     */
14
    protected $payload;
15
16
    /**
17
     * EventBase constructor.
18
     * @param array $payload
19
     */
20
    public function __construct($payload)
21
    {
22
        $this->payload = $payload;
23
    }
24
25
    /**
26
     * @return array
27
     */
28
    public function getRepository()
29
    {
30
        return $this->payload['repository'];
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    public function getSender()
37
    {
38
        return $this->payload['sender'];
39
    }
40
}
41