Page MenuHomePhorge

PhabricatorChartInterval.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorChartInterval.php

<?php
final class PhabricatorChartInterval
extends Phobject {
private $min;
private $max;
public function __construct($min, $max) {
$this->min = $min;
$this->max = $max;
}
public static function newFromIntervalList(array $intervals) {
$min = null;
$max = null;
foreach ($intervals as $interval) {
if ($interval === null) {
continue;
}
$interval_min = $interval->getMin();
if ($interval_min !== null) {
if ($min === null) {
$min = $interval_min;
} else {
$min = min($min, $interval_min);
}
}
$interval_max = $interval->getMax();
if ($interval_max !== null) {
if ($max === null) {
$max = $interval_max;
} else {
$max = max($max, $interval_max);
}
}
}
return new self($min, $max);
}
public function setMin($min) {
$this->min = $min;
return $this;
}
public function getMin() {
return $this->min;
}
public function setMax($max) {
$this->max = $max;
return $this;
}
public function getMax() {
return $this->max;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 6:23 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
124762
Default Alt Text
PhabricatorChartInterval.php (1 KB)

Event Timeline