Element_OphTrOperationbooking_Operation::getProcedureCount PHP Méthode

getProcedureCount() public méthode

Calculates the total number of procedures this operation requires.
public getProcedureCount ( ) : integer
Résultat integer
    public function getProcedureCount()
    {
        $total = count($this->procedures);
        if ($this->eye_id == Eye::BOTH) {
            $total *= 2;
        }
        return $total;
    }

Usage Example

 public function testProcedureCountBothEyes()
 {
     $op = new Element_OphTrOperationbooking_Operation();
     $op->procedures = array(new Procedure(), new Procedure());
     $op->eye_id = Eye::BOTH;
     $this->assertEquals($op->getProcedureCount(), 4);
 }