Generate file attachment transactions for explicit Remarkup attachments on common...
[phabricator.git] / src / applications / fact / chart / PhabricatorShiftChartFunction.php
blobf0b280d0e5cca3ac2f975314000dda13683ff49f
1 <?php
3 final class PhabricatorShiftChartFunction
4 extends PhabricatorPureChartFunction {
6 const FUNCTIONKEY = 'shift';
8 protected function newArguments() {
9 return array(
10 $this->newArgument()
11 ->setName('shift')
12 ->setType('number'),
16 public function evaluateFunction(array $xv) {
17 $shift = $this->getArgument('shift');
19 $yv = array();
21 foreach ($xv as $x) {
22 $yv[] = $x + $shift;
25 return $yv;