Browscap\Formatter\CsvFormatter::formatPropertyName PHP Method

formatPropertyName() public method

formats the name of a property
public formatPropertyName ( string $name ) : string
$name string
return string
    public function formatPropertyName($name)
    {
        return '"' . str_replace('"', '""', $name) . '"';
    }

Usage Example

Beispiel #1
0
 /**
  * tests formatting a property name
  *
  * @group formatter
  * @group sourcetest
  */
 public function testFormatPropertyName()
 {
     self::assertSame('"text"', $this->object->formatPropertyName('text'));
 }