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

SilentLogger   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 30.76%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 31
ccs 4
cts 13
cp 0.3076
rs 10
c 0
b 0
f 0
wmc 7

6 Methods

Rating   Name   Duplication   Size   Complexity  
A targetStarted() 0 2 1
A taskFinished() 0 2 1
A buildStarted() 0 2 1
A targetFinished() 0 2 1
A buildFinished() 0 4 2
A taskStarted() 0 2 1
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