Passed
Push — main ( d5ff59...b03a29 )
by Michiel
09:01
created

IdentityMapper::setTo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 0
dl 0
loc 2
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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\Mapper;
22
23
/**
24
 * This mapper does nothing ;).
25
 *
26
 * @author  Andreas Aderhold <[email protected]>
27
 * @author  Hans Lellelid <[email protected]>
28
 */
29
class IdentityMapper implements FileNameMapper
30
{
31
    /**
32
     * The mapper implementation. Basically does nothing in this case.
33
     *
34
     * @param string $sourceFileName the data the mapper works on
35
     *
36
     * @return array The data after the mapper has been applied
37
     */
38 42
    public function main($sourceFileName)
39
    {
40 42
        return [$sourceFileName];
41
    }
42
43
    /**
44
     * Ignored here.
45
     * {@inheritdoc}
46
     *
47
     * @param string $to
48
     */
49
    public function setTo($to)
50
    {
51
    }
52
53
    /**
54
     * Ignored here.
55
     * {@inheritdoc}
56
     *
57
     * @param string $from
58
     */
59
    public function setFrom($from)
60
    {
61
    }
62
}
63