public function setFormat($format)
    {
        if (!\in_array($format, ['int32', 'int64', 'int', 'long', 'float', 'double', 'int16', 'int8'], true)) {
            throw new \Exception(\sprintf('Incorrect format given: "%s"', $format));
        }
        $this->format = $format;

        return $this;
    }
public function setFormat($format)
    {
        if (!\in_array($format, ['int32', 'int64', 'int', 'long', 'float', 'double', 'int16', 'int8'], true)) {
            throw new \Exception(\sprintf('Incorrect format given: "%s"', $format));
        }
        $this->format = $format;

        return $this;
    }
public function setFormat ( $ format ) { if ( ! \ in_array ( $ format , [ 'int32' , 'int64' , 'int' , 'long' , 'float' , 'double' , 'int16' , 'int8' ] , true ) ) { throw new \ Exception ( \ sprintf ( 'Incorrect format given: "%s"' , $ format ) ) ; } $ this -> format = $ format ; return $ this ; }
Set the value of Format

@param string $format

@return self
@throws \Exception Thrown when given format is not any of allowed types.
Set the value of Format