Passed
Push — main ( 95b369...5c384e )
by Michiel
17:35 queued 12s
created

SvnPropsetTask   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
eloc 10
dl 0
loc 53
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A main() 0 7 1
A getSvnPropertyValue() 0 3 1
A setSvnPropertyName() 0 3 1
A setSvnPropertyValue() 0 3 1
A getSvnPropertyName() 0 3 1
1
<?php
2
3
/**
4
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
 *
16
 * This software consists of voluntary contributions made by many individuals
17
 * and is licensed under the LGPL. For more information please see
18
 * <http://phing.info>.
19
 */
20
21
namespace Phing\Tasks\Ext;
22
23
use Phing\Exception\BuildException;
24
25
/**
26
 * List all properties on files, dirs, or revisions from the working copy
27
 */
28
class SvnPropsetTask extends SvnBaseTask
29
{
30
    private $svnPropertyName;
31
    private $svnPropertyValue;
32
33
    /**
34
     * Sets the name of the property to use
35
     *
36
     * @param $svnPropertyName
37
     */
38
    public function setSvnPropertyName($svnPropertyName)
39
    {
40
        $this->svnPropertyName = $svnPropertyName;
41
    }
42
43
    /**
44
     * Returns the name of the property to use
45
     */
46
    public function getSvnPropertyName()
47
    {
48
        return $this->svnPropertyName;
49
    }
50
51
    /**
52
     * Sets the name of the property to use
53
     *
54
     * @param $svnPropertyValue
55
     */
56
    public function setSvnPropertyValue($svnPropertyValue)
57
    {
58
        $this->svnPropertyValue = $svnPropertyValue;
59
    }
60
61
    /**
62
     * Returns the name of the property to use
63
     */
64
    public function getSvnPropertyValue()
65
    {
66
        return $this->svnPropertyValue;
67
    }
68
69
    /**
70
     * The main entry point
71
     *
72
     * @throws BuildException
73
     */
74
    public function main()
75
    {
76
        $this->setup('propset');
77
78
        $this->log("Set svn property for '" . $this->getToDir() . "'");
79
80
        $output = $this->run([$this->getSvnPropertyName(), $this->getSvnPropertyValue(), $this->getToDir()]);
0 ignored issues
show
Unused Code introduced by
The assignment to $output is dead and can be removed.
Loading history...
81
    }
82
}
83