Completed
Pull Request — master (#8)
by Miro
03:40
created

GithubCommitConverter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A convert() 0 4 1
1
<?php
2
namespace DevBoardLib\GithubObjectApiFacade\Repo\Commit\Converter;
3
4
use DevBoardLib\GithubCore\Repo\GithubRepo;
5
use DevBoardLib\GithubObjectApiFacade\User\Converter\GithubUserConvertTrait;
6
7
/**
8
 * Class GithubCommitConverter.
9
 */
10
class GithubCommitConverter
11
{
12
    use GithubCommitConvertTrait;
13
    use GithubUserConvertTrait;
14
    private $githubRepo;
15
16
    /**
17
     * GithubMilestoneConverter constructor.
18
     *
19
     * @param $githubRepo
20
     */
21
    public function __construct(GithubRepo $githubRepo)
22
    {
23
        $this->githubRepo = $githubRepo;
24
    }
25
26
    /**
27
     * @param $data
28
     *
29
     * @return \DevBoardLib\GithubCore\Commit\GithubCommitSource
30
     */
31
    public function convert($data)
32
    {
33
        return $this->convertCommit($data);
34
    }
35
}
36