Highway to PSR2
[openemr.git] / library / classes / ClinicalTypes / Range.php
blob79111c7d679956fc5183b83d4dffc61b4e004056
1 <?php
2 // Copyright (C) 2011 Ken Chapple <ken@mi-squared.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 class Range
11 const NEG_INF = -999999;
12 const POS_INF = 999999;
14 public $lowerBound;
15 public $upperBound;
17 public function __construct($lowerBound, $upperBound)
19 $this->lowerBound = $lowerBound;
20 $this->upperBound = $upperBound;
23 public function test($val)
25 if ($val > $this->lowerBound &&
26 $val < $this->upperBound ) {
27 return true;
30 return false;