Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function validateType($value)
 {
     if (!is_float($value) || !is_double($value)) {
         throw InvalidTypeException::invalidExpectedType($this->getPath(), 'float', $value);
     }
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function validateType($value)
 {
     if (!is_int($value)) {
         throw InvalidTypeException::invalidExpectedType($this->getPath(), 'integer', $value);
     }
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 protected function validateType($value)
 {
     if (!is_bool($value)) {
         throw InvalidTypeException::invalidExpectedType($this->getPath(), 'boolean', $value);
     }
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 protected function validateType($value)
 {
     if (!is_array($value)) {
         throw InvalidTypeException::invalidExpectedType($this->getPath(), 'array', $value);
     }
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 protected function validateType($value)
 {
     if (null !== $value && false === is_scalar($value)) {
         throw InvalidTypeException::invalidExpectedType($this->getPath(), 'scalar', $value);
     }
 }