These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Smalot\Bitbucket\Webhook\Model; |
||
4 | |||
5 | /** |
||
6 | * Class PullrequestApprovedModel |
||
7 | * @package Smalot\Bitbucket\Webhook\Model |
||
8 | * |
||
9 | * A user approves a pull request for a repository. |
||
10 | */ |
||
11 | View Code Duplication | class PullrequestApprovedModel extends ModelBase |
|
0 ignored issues
–
show
|
|||
12 | { |
||
13 | /** |
||
14 | * @return array |
||
15 | */ |
||
16 | public function getActor() |
||
17 | { |
||
18 | return $this->payload['actor']; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @return array |
||
23 | */ |
||
24 | public function getPullRequest() |
||
25 | { |
||
26 | return $this->payload['pullrequest']; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return array |
||
31 | */ |
||
32 | public function getRepository() |
||
33 | { |
||
34 | return $this->payload['repository']; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return array |
||
39 | */ |
||
40 | public function getApproval() |
||
41 | { |
||
42 | return $this->payload['approval']; |
||
43 | } |
||
44 | } |
||
45 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.