Passed
Push — master ( e1f86a...4e1a3a )
by Siad
05:23
created

Writer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 32
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A flush() 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
namespace Phing\Io;
21
22
/**
23
 * Abstract class for writing character streams.
24
 *
25
 * @package phing.system.io
26
 */
27
abstract class Writer
28
{
29
30
    /**
31
     * Writes data to output stream.
32
     *
33
     * @param string $buf
34
     * @param int    $off
35
     * @param int    $len
36
     */
37
    abstract public function write($buf, $off = null, $len = null);
38
39
    /**
40
     * Close the stream.
41
     *
42
     * @throws IOException - if there is an error closing stream.
43
     */
44
    abstract public function close();
45
46
    /**
47
     * Flush the stream, if supported by the stream.
48
     */
49
    public function flush()
50
    {
51
    }
52
53
    /**
54
     * Returns a string representation of resource filename, url, etc. that is being written to.
55
     *
56
     * @return string
57
     */
58
    abstract public function getResource();
59
}
60