GithubCommitConverter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

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