AbstractVcs   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 23
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setIgnore() 0 4 2
A getIgnore() 0 7 2
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-2018, 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