Highway to PSR2
[openemr.git] / library / classes / rulesets / library / RsHelper.php
blobaadbd0608deb172770a5b8a9295eb29e837bda4e
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 RsHelper
11 public static function formatClinicalRules(array $results)
13 $formattedResults = array();
14 foreach ($results as $result) {
15 if ($result instanceof RsResultIF) {
16 $formattedResults []= $result->format();
17 } else {
18 throw new Exception("Result must be an instance of RsResultIF");
22 return $formattedResults;