Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
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 |
* Logger element for the PhpDependTask.
|
|
22 |
*
|
|
23 |
* @package phing.tasks.ext.pdepend
|
|
24 |
* @author Benjamin Schultz <bschultz@proqrent.de>
|
|
25 |
* @since 2.4.1
|
|
26 |
*/
|
|
27 |
class PhpDependLoggerElement |
|
28 |
{
|
|
29 |
/**
|
|
30 |
* The type of the logger.
|
|
31 |
*
|
|
32 |
* @var string
|
|
33 |
*/
|
|
34 |
protected $type = ''; |
|
35 |
|
|
36 |
/**
|
|
37 |
* Output file for logger.
|
|
38 |
*
|
|
39 |
* @var PhingFile
|
|
40 |
*/
|
|
41 |
protected $outfile = null; |
|
42 |
|
|
43 |
/**
|
|
44 |
* Sets the logger type.
|
|
45 |
*
|
|
46 |
* @param string $type Type of the logger
|
|
47 |
*
|
|
48 |
* @throws BuildException
|
|
49 |
*/
|
|
50 | 1 |
public function setType($type) |
51 |
{
|
|
52 | 1 |
$this->type = $type; |
53 |
|
|
54 | 1 |
switch ($this->type) { |
55 | 1 |
case 'jdepend-chart': |
56 | 1 |
case 'jdepend-xml': |
57 | 1 |
case 'overview-pyramid': |
58 | 1 |
case 'phpunit-xml': |
59 | 1 |
case 'summary-xml': |
60 | 1 |
break; |
61 |
|
|
62 |
default: |
|
63 |
throw new BuildException('Logger "' . $this->type . '" not implemented'); |
|
64 |
}
|
|
65 |
}
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Get the logger type
|
|
69 |
*
|
|
70 |
* @return string
|
|
71 |
*/
|
|
72 | 1 |
public function getType() |
73 |
{
|
|
74 | 1 |
return $this->type; |
75 |
}
|
|
76 |
|
|
77 |
/**
|
|
78 |
* Sets the output file for the logger results.
|
|
79 |
*
|
|
80 |
* @param PhingFile $outfile The output file
|
|
81 |
*/
|
|
82 | 1 |
public function setOutfile(PhingFile $outfile) |
83 |
{
|
|
84 | 1 |
$this->outfile = $outfile; |
85 |
}
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Get the output file.
|
|
89 |
*
|
|
90 |
* @return PhingFile
|
|
91 |
*/
|
|
92 | 1 |
public function getOutfile() |
93 |
{
|
|
94 | 1 |
return $this->outfile; |
95 |
}
|
|
96 |
}
|
Read our documentation on viewing source code .