33 if (isset ( $properties [0] )) {
34 $this->type = $properties [0];
35 unset ( $properties [0] );
36 if (isset ( $properties [1] )) {
37 if (! is_array ( $properties [1] )) {
38 $this->constraints = [
'ref' => $properties [1] ];
40 $this->constraints = $properties [1];
42 unset ( $properties [1] );
45 parent::initAnnotation ( $properties );
46 if(!isset($this->type)){
47 throw new \Exception (
'Validator annotation must have a type' );
50 throw new \Exception (
'This type of annotation does not exists : ' . $this->type );