Completed
Push — master ( 4bb285...2f71f6 )
by Andrii
03:37
created

AbstractVcs   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 24
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setIgnore() 0 6 2
A getIgnore() 0 8 2
commit() 0 1 ?
1
<?php
2
/**
3
 * Automation tool mixed with code generator for easier continuous development
4
 *
5
 * @link      https://github.com/hiqdev/hidev
6
 * @package   hidev
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\components;
12
13
/**
14
 * VCSs (Version Control Systems) component.
15
 */
16
abstract class AbstractVcs extends \hidev\base\Component
17
{
18
    protected $ignorefile;
19
20
    protected $_ignore;
21
22
    public function setIgnore($items, $where = '')
23
    {
24
        if ($items) {
25
            $this->getIgnore()->setItems($items, $where);
26
        }
27
    }
28
29
    public function getIgnore()
30
    {
31
        if (!is_object($this->_ignore)) {
32
            $this->_ignore = $this->take('vcsignore');
33
        }
34
35
        return $this->_ignore;
36
    }
37
38
    abstract public function commit($message);
39
}
40