src/Encoder.php
private function encodeString($data = null)
    {
        $data = is_null($data) ? $this->data : $data;
        return sprintf("%d:%s", strlen($data), $data);
    }
private function encodeString($data = null)
    {
        $data = is_null($data) ? $this->data : $data;
        return sprintf("%d:%s", strlen($data), $data);
    }
private function encodeString ( $ data = null ) { $ data = is_null ( $ data ) ? $ this -> data : $ data ; return sprintf ( "%d:%s" , strlen ( $ data ) , $ data ) ; }
Encode a string

@param  string  $data The string to be encoded.
@return string  Returns the bencode encoded string.
Encode a string