Mercurial > hg > isophonics-drupal-site
annotate vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 1fec387a4317 |
children |
rev | line source |
---|---|
Chris@14 | 1 <?php |
Chris@14 | 2 /* |
Chris@14 | 3 * This file is part of the php-code-coverage package. |
Chris@14 | 4 * |
Chris@14 | 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> |
Chris@14 | 6 * |
Chris@14 | 7 * For the full copyright and license information, please view the LICENSE |
Chris@14 | 8 * file that was distributed with this source code. |
Chris@14 | 9 */ |
Chris@14 | 10 |
Chris@14 | 11 namespace SebastianBergmann\CodeCoverage\Report\Xml; |
Chris@14 | 12 |
Chris@14 | 13 class Method |
Chris@14 | 14 { |
Chris@14 | 15 /** |
Chris@14 | 16 * @var \DOMElement |
Chris@14 | 17 */ |
Chris@14 | 18 private $contextNode; |
Chris@14 | 19 |
Chris@14 | 20 public function __construct(\DOMElement $context, $name) |
Chris@14 | 21 { |
Chris@14 | 22 $this->contextNode = $context; |
Chris@14 | 23 |
Chris@14 | 24 $this->setName($name); |
Chris@14 | 25 } |
Chris@14 | 26 |
Chris@14 | 27 private function setName($name) |
Chris@14 | 28 { |
Chris@14 | 29 $this->contextNode->setAttribute('name', $name); |
Chris@14 | 30 } |
Chris@14 | 31 |
Chris@14 | 32 public function setSignature($signature) |
Chris@14 | 33 { |
Chris@14 | 34 $this->contextNode->setAttribute('signature', $signature); |
Chris@14 | 35 } |
Chris@14 | 36 |
Chris@14 | 37 public function setLines($start, $end = null) |
Chris@14 | 38 { |
Chris@14 | 39 $this->contextNode->setAttribute('start', $start); |
Chris@14 | 40 |
Chris@14 | 41 if ($end !== null) { |
Chris@14 | 42 $this->contextNode->setAttribute('end', $end); |
Chris@14 | 43 } |
Chris@14 | 44 } |
Chris@14 | 45 |
Chris@14 | 46 public function setTotals($executable, $executed, $coverage) |
Chris@14 | 47 { |
Chris@14 | 48 $this->contextNode->setAttribute('executable', $executable); |
Chris@14 | 49 $this->contextNode->setAttribute('executed', $executed); |
Chris@14 | 50 $this->contextNode->setAttribute('coverage', $coverage); |
Chris@14 | 51 } |
Chris@14 | 52 |
Chris@14 | 53 public function setCrap($crap) |
Chris@14 | 54 { |
Chris@14 | 55 $this->contextNode->setAttribute('crap', $crap); |
Chris@14 | 56 } |
Chris@14 | 57 } |