<?phpfinalclassRateOfAdvancement{publicconstASSOCIATION_DIRECTLY='DIRECTLY';publicconstASSOCIATION_INDIRECTLY='INDIRECTLY';publicconstASSOCIATION_NOFICHES='NOFICHES';(...)publicfunction__construct(int$countFiches,int$countValidated,int$countWip,string$typeAssociation){$this->set($countFiches,$countValidated,$countWip,$typeAssociation);$this->refresh();}privatefunctionrefresh():void{$countTodo=$this->getCountFiches()-($this->getCountValidated()+$this->getCountWip());if($countTodo<0){thrownew\InvalidArgumentException('The number of FicheSuiviAmr in todo can be negative !!!');}$this->countTodo=$countTodo;if(0===$this->getCountFiches()){$this->rate=null;}else{$this->rate=(($this->getCountValidated()+($this->getCountWip()*0.5))/$this->getCountFiches())*100;}}(...)}
Javascript
(functioninit(){window.addEventListener("DOMContentLoaded",(event)=>{console.debug('[DEBUG] Zen-mode feature enable');// Register click on 'zen-mode-button' node elementconstzendModeButton=document.getElementById('zen-mode-button');if(zendModeButton!==null&&zendModeButton!==undefined){_registerZendModeButtonClick(zendModeButton);console.log('[DEBUG] Zen-mode button found');}else{console.log('[DEBUG] Zen-mode button not found');}});})();
Comments