AbstractVcs::setIgnore()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 2
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 6
rs 10
c 0
b 0
f 0
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