Esempio n. 1
0
 public function validate()
 {
     if (!in_array($this->type, ['I', 'S'])) {
         throw new CoinfideException('Type of OrderItem must be one of "I" (item), "S" (shipping)');
     }
     parent::validate();
 }
Esempio n. 2
0
 public function validate()
 {
     parent::validate();
     if (!($this->fullNumber || $this->number && $this->countryCode)) {
         throw new CoinfideException(sprintf('Please set either fullNumber or number AND countryCode for Phone object'));
     }
 }