In the nick of time before release, I've just finished the interfaces in ZPE, and they're ready for release. I'm planning on releasing this as part of ZPE 1.14.9 after all.
YASS
public interface Reportable public function print_report() end interface public structure risk_register implements Reportable private $risks = [] private $next_id = 1 public function add(string $title, string $owner, number $probability, number $impact, string $mitigation) : number $risk = make_risk(this->$next_id, $title, $owner, $probability, $impact, $mitigation) this->$risks = list_add_element(this->$risks, $risk) this->$next_id = this->$next_id + 1 return $risk["id"] end function public function print_report() print("") print("RISK REGISTER") print(repeat_text("-", 72)) print("Open risks: " & this->open_count() & " | Total exposure: " & this->exposure()) $ordered = sort_risks(this->$risks) for each($ordered as $risk) print("R" & $risk["id"] & " [" & $risk["state"] & "] " & $risk["title"]) print(" Owner: " & $risk["owner"] & " | P=" & $risk["probability"] & " I=" & $risk["impact"] & " Score=" & risk_score($risk)) print(" Mitigation: " & $risk["mitigation"]) end for end function end structure
Also, ZPE has now been tested with an 8,000+ line code program, and it still compiles it in less than 50ms! That's a major milestone right there.
Powered by DASH 2.0
