Returns a build Property line.
@access		private
@param		string		$key			Key of  Property
@param		string		$value			Value of Property
@param		string		$comment		Comment of Property
@return		string
435113
private function buildLine( $key, $value, $comment )
	{
		$content	= '"'.addslashes( $value ).'"';
		if( $this->reservedWords && is_bool( $value ) )
			$content	= $value ? "yes" : "no";
		
		$breaksKey		= 4 - floor( strlen( $key ) / 8 );
		$breaksValue	= 4 - floor( strlen( $content ) / 8 );
		if( $breaksKey < 1 )
			$breaksKey = 1;
		if( $breaksValue < 1 )
			$breaksValue = 1;
		$line	= $key.str_repeat( "\t", $breaksKey ).'= '.$content;
		if( $comment )
			$line	.= str_repeat( "\t", $breaksValue ).'; '.$comment;
		return $line;
	}
181093
private function updateFromPostCache(Comment $comment, $c)
    {
        if ($comment->postId == null)
        {
            return;
        }
        if ($this->postCache == null || $this->postCache['ID'] != $comment->postId)
        {
            $this->postCache = $this->adminApi->getPost($comment->postId);
        }

        $comment->date = $this->getMetaKeyValue($this->postCache, "linkoscope_created_$comment->id") ?: $c['date'];
        $comment->score =
            $this->getMetaKeyValue($this->postCache, "linkoscope_score_$comment->id") ?: strtotime($c['date']);
    }
722000
protected function buildComments()
    {

        if( is_null( $this->comments ) ) {
            $this->comments = array();
        } else {
            return;
        }

        $sql = <<<SQL
SELECT
    a.attrelid::text || '.' || a.attnum AS key,
    d.description AS text
FROM
    pg_attribute AS a
INNER JOIN
    pg_description AS d ON
        a.attrelid = d.objoid AND
        a.attnum = d.objsubid AND
        d.classoid = 'pg_class'::regclass::oid
WHERE
    a.attnum > 0
;
SQL
;

        $comments = $this->db->query( new Query( $sql ) )->fetch();

        // key the array and populate static cache
        foreach( $comments as $comment ) {
            $this->comments[$comment['key']] = $comment['text'];
        }

    }
738021
protected function compileComments($value)
    {
        $pattern = sprintf('/%s(.*?)%s/', $this->comments[0], $this->comments[1]);
        
        return preg_replace($pattern, '', $value);
    }
764835
public function update(string $comment, array $params = [])
    {
        $path = $this->buildCommentsPath($comment);

        return $this->put($path, $params);
    }
865977
public function greateThen($value, $comment = "")
	{
		if ($this->isValid)
		{
			if ($this->val < $value)
				self::addMessage($comment);
		}
		return $this;
	}
728277
def commentify(value):
  
  value = comment_links(value)
  if value is None:
    return
  if len(value.split('\n')) == 1:
    return "* " + value
  else:
    return '\n'.join([' * ' + l for l in value.split('\n')[:-1]])
1155974
protected function buildProperty(ClassProperty $property, $indent)
    {
        $visibility = 'public';

        if (false === $property->isPublic()) {
            $visibility = $property->isProtected() ? 'protected' : 'private';
        }

        if ($property->isStatic()) {
            $visibility = 'static '.$visibility;
        }

        $source = $visibility.' $'.$property->getName();
        $original = $property->getOriginal();

        if (isset($original['default'])) {
            $source .= ' = '.$this->wrapPHPValue([
                'default' => $original['default'],
            ]);
        }

        $docBlock = new DocBlock($property->getDocBlock(), $indent);

        return $docBlock."\n".$indent.$source.';';
    }
1010144
public function postComment($key, $comment)
	{
		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key'],
		);

		// Set the success response code.
		$this->oauth->setOption('success_code', 201);

		// Set the API base
		$base = '/v1/people/~/network/updates/key=' . $key . '/update-comments';

		// Build the xml.
		$xml = '<update-comment>
				  <comment>' . $comment . '</comment>
				</update-comment>';

		$header['Content-Type'] = 'text/xml';

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header);

		return $response;
	}
886733
function printComment(commentPath, options) {
  const comment = commentPath.getValue();
  comment.printed = true;
  return options.printer.printComment(commentPath, options);
}
1255620
protected static function _buildAttr($attr, $value = '')
    {
        if (\is_string($attr)) {

            if (\is_bool($value)) {
                $value = $value ? 'true' : 'false';
            }

            return "{$attr}=\"{$value}\"";
        }

        if (\is_array($attr)) {
            $attrs = [];

            foreach ($attr as $name => $val) {
                $attrs[] = static::_buildAttr($name, $val);
            }

            return implode(' ', $attrs);
        }

        return '';
    }
257621
public void properties (Properties props, String comment) {
		ByteArrayOutputStream propsBaos = new ByteArrayOutputStream ();

		if (props == null) {
			props = new Properties ();
		}

		try {
			if (comment != null) {
				props.store (propsBaos, comment);
			} else {
				props.store (propsBaos, "Automatic comment from LoggerWrapper");
			}
		} catch (IOException ex) {
			throwing (ex);
		}

		//String charset = java.nio.charset.Charset.defaultCharset ().name ();
		String charset = "UTF-8";

		String propsStr = null;
		try {
			propsStr = propsBaos.toString (charset);
		} catch (UnsupportedEncodingException ex) {
			throwing (ex);
		}

		logger.config (propsStr);
	}
1254933
protected function renderProperty( $key, $value, $important,
                                       array $addAttr = array() )
    {
        $markup = '';
        $escape = $this->getEscapeHtmlHelper();
        $eattr  = $this->getEscapeHtmlAttrHelper();
        $name   = empty( $addAttr['name'] ) ? $key : $addAttr['name'] . '[' . $key . ']';

        $this->validTagAttributes = $this->validValueAttributes;
        $markup .= sprintf(
            '<dt><label for="%s">%s</label></dt><dd><input %s />',
            $eattr( $name . '[value]' ),
            $escape( $key ),
            $this->createAttributesString( array_merge(
                $addAttr, array(
                    'type'  => 'text',
                    'name'  => $name . '[value]',
                    'value' => $value,
                )
            ) )
        );

        $importantLabel = 'important';
        $translator     = $this->getTranslator();

        if ( $translator )
        {
            $importantLabel = $translator->translate(
                'customize.form.important',
                'customize'
            );
        }

        $this->validTagAttributes = $this->validPriorityAttributes;
        $markup .= sprintf(
            '<label><input %s />%s</label></dd>',
            $this->createAttributesString( array_merge(
                $addAttr, array(
                    'type'      => 'checkbox',
                    'name'      => $name . '[priority]',
                    'value'     => 'important',
                    'checked'   => $important,
                )
            ) ),
            $escape( $importantLabel )
        );

        return $markup;
    }
318760
private function buildProperty($value, $key): string
    {
        if (collect(['from', 'to'])->contains($key)) {
            $value = $this->implode($value);
        }

        return vsprintf("<apps:property name='%s' value='%s'/>", [
            $key,
            htmlentities($this->implode($value)),
        ]);
    }
793898
public function comment(string $comment = ''): Writer
    {
        $comment = trim($comment);

        if (!empty($comment)) {
            $comment = ' ' . $comment;
        }

        return $this->line(trim('#' . $comment));
    }
1061822
function buildProperty(line) {
    var key = String(line).match("<key>(.*)</key>");
    var value = String(line).match("<integer>(.*)</integer>");
    if (!value)
        value = String(line).match("<date>(.*)</date>");
    if (!value)
        value = String(line).match("<string>(.*)</string>");
    var k = '';
    if (key != null && key.length > 1)
        k = key[1];
    var v = '';
    if (value != null && value.length > 1)
        v = value[1];
    var o = {};
    o[k] = v;
    return o;
}
1036947
private function renderProperty(RendererInterface $r, $value, \ReflectionProperty $p, int $level): string
    {
        if ($p->isStatic()) {
            return '';
        }

        if (
            !($value instanceof \stdClass)
            && is_string($p->getDocComment())
            && strpos($p->getDocComment(), '@internal') !== false
        ) {
            // Memory loop while reading doc comment for stdClass variables?
            // Report a PHP bug about treating comment INSIDE property declaration as doc comment.
            return '';
        }

        //Property access level
        $access = $this->getAccess($p);

        //To read private and protected properties
        $p->setAccessible(true);

        if ($value instanceof \stdClass) {
            $name = $r->apply($p->getName(), 'dynamic');
        } else {
            //Property name includes access level
            $name = $p->getName() . $r->apply(':' . $access, 'access', $access);
        }

        return $this->renderValue($r, $p->getValue($value), $name, $level + 1);
    }