Skip to content

Commit 61e8c27

Browse files
authored
Merge pull request #7 from PHPCSStandards/feature/use-backticks-for-public-properties
MarkdownGenerator: present property name as code
2 parents 806997b + adc1b64 commit 61e8c27

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Generator/MarkdownGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private function getPublicProperties(array $properties): string
127127
private function getPublicPropertyLines(array $properties): array
128128
{
129129
return array_map(function (Property $property) {
130-
return "- \${$property->getName()} : {$property->getType()} {$property->getDescription()}";
130+
return "- `\${$property->getName()}` : {$property->getType()} {$property->getDescription()}";
131131
}, $properties);
132132
}
133133

tests/Generator/MarkdownGeneratorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function fromSniff_WithCompleteData_WriteAllDetails()
7272
);
7373

7474
self::assertEquals(
75-
<<<MD
75+
<<<'MD'
7676
# Standard.Category.My
7777
7878
Description
@@ -83,8 +83,8 @@ public function fromSniff_WithCompleteData_WriteAllDetails()
8383
8484
## Public Properties
8585
86-
- \$a : string DescriptionA
87-
- \$b : int DescriptionB
86+
- `$a` : string DescriptionA
87+
- `$b` : int DescriptionB
8888
8989
## See Also
9090

0 commit comments

Comments
 (0)