public function generateValueSizeStatement($type, $value)
    {
        $metadata = $this->getComputeSizeMetadata($type);
        $method   = $metadata['method'];
        $size     = $metadata['size'];

        if ($size !== null) {
            return $size;
        }

        return sprintf('$calculator->%s(%s)', $method, $value);
    }
public function generateValueSizeStatement($type, $value)
    {
        $metadata = $this->getComputeSizeMetadata($type);
        $method   = $metadata['method'];
        $size     = $metadata['size'];

        if ($size !== null) {
            return $size;
        }

        return sprintf('$calculator->%s(%s)', $method, $value);
    }
public function generateValueSizeStatement ( $ type , $ value ) { $ metadata = $ this -> getComputeSizeMetadata ( $ type ) ; $ method = $ metadata [ 'method' ] ; $ size = $ metadata [ 'size' ] ; if ( $ size !== null ) { return $ size ; } return sprintf ( '$calculator->%s(%s)' , $ method , $ value ) ; }
Compute value size

@param integer $type
@param string  $value

@return string
Compute value size