Browscap\Formatter\JsonFormatter::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 json_encode($name);
    }

Usage Example

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