Total Complexity | 8 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | class Git extends AbstractVcs |
||
17 | { |
||
18 | public $ignorefile = '.gitignore'; |
||
19 | |||
20 | /** |
||
21 | * @var string current tag |
||
22 | */ |
||
23 | protected $tag; |
||
24 | |||
25 | public function getUserName() |
||
26 | { |
||
27 | return trim(`git config --get user.name`); |
||
28 | } |
||
29 | |||
30 | public function getUserEmail() |
||
31 | { |
||
32 | return trim(`git config --get user.email`); |
||
33 | } |
||
34 | |||
35 | public function getYear() |
||
36 | { |
||
37 | $date = `git log --reverse --pretty=%ai | head -n 1`; |
||
38 | $year = $date ? date('Y', strtotime($date)) : ''; |
||
39 | |||
40 | return $year; |
||
41 | } |
||
42 | |||
43 | public function commit($message) |
||
46 | } |
||
47 | |||
48 | public function tag($tag) |
||
51 | } |
||
52 | |||
53 | public function push() |
||
61 | } |
||
62 | } |
||
63 |