Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
11 / 11 |
TotalElevation | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
4 | |
100.00% |
11 / 11 |
initialize() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
execute() | |
100.00% |
1 / 1 |
2 | |
100.00% |
9 / 9 |
|||
finalize() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
<?php | |
/** | |
* | |
*/ | |
namespace aae\geo\meta { | |
/** | |
* @author Axel Ancona Esselmann | |
* @package aae\geo\meta | |
*/ | |
class TotalElevation { | |
public $varName = array("totalElevationGained", "totalElevationLost"); | |
public $metaDataObject = null; | |
public function initialize() { | |
} | |
public function execute() { | |
$meta = $this->metaDataObject; | |
$var1 = $this->varName[0]; | |
$var2 = $this->varName[1]; | |
$elevationChange = $meta->segmentElevationChanges[count($meta->segmentElevationChanges) - 1]; | |
if ($elevationChange > 0) { | |
$meta->$var1 += $elevationChange; | |
} else { | |
$meta->$var2 += $elevationChange; | |
} | |
} | |
public function finalize() { | |
} | |
} | |
} |