Completed
Push — master ( 0fb6e4...5eed2b )
by Siad
15:28
created

SilentLogger::taskStarted()   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
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 2
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * This software consists of voluntary contributions made by many individuals
16
 * and is licensed under the LGPL. For more information please see
17
 * <http://phing.info>.
18
 */
19
20
/**
21
 * A logger which logs nothing but build failure and what task might output.
22
 *
23
 * @author  Siad Ardroumli <[email protected]>
24
 * @package phing.listener
25
 */
26
class SilentLogger extends DefaultLogger
27
{
28
    public function buildStarted(BuildEvent $event)
29
    {
30
        // log nothing
31
    }
32
33 2
    public function buildFinished(BuildEvent $event)
34
    {
35 2
        if ($event->getException() != null) {
36 1
            parent::buildFinished($event);
37
        }
38 2
    }
39
40
    public function targetStarted(BuildEvent $event)
41
    {
42
        // log nothing
43
    }
44
45
    public function targetFinished(BuildEvent $event)
46
    {
47
        // log nothing
48
    }
49
50
    public function taskStarted(BuildEvent $event)
51
    {
52
        // log nothing
53
    }
54
55
    public function taskFinished(BuildEvent $event)
56
    {
57
        // log nothing
58
    }
59
}
60