Skip to content

Commit 01593d6

Browse files
committed
README cleanup
1 parent 42e36ae commit 01593d6

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
A set of custom fixers for [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).
1010

1111
## Installation
12-
PHP CS Fixer custom fixers can be installed by running:
12+
PHP CS Fixer: custom fixers can be installed by running:
1313
```bash
1414
composer require --dev kubawerlos/php-cs-fixer-custom-fixers
1515
```
@@ -66,14 +66,14 @@ In your PHP CS Fixer configuration register fixers and use them:
6666

6767
```
6868

69-
- **NoUselessClassCommentFixer** - there must be no comment like: "Class Foo\Bar".
69+
- **NoUselessClassCommentFixer** - there must be no comment like: "Class FooBar".
7070
```diff
7171
<?php
7272
/**
73-
- * Class Foo\Bar
73+
- * Class FooBar
7474
* Class to do something
7575
*/
76-
class Foo {}
76+
class FooBar {}
7777

7878
```
7979

src/Fixer/NoUselessClassCommentFixer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ final class NoUselessClassCommentFixer extends AbstractFixer
1414
public function getDefinition() : FixerDefinition
1515
{
1616
return new FixerDefinition(
17-
'There must be no comment like: "Class Foo\Bar".',
17+
'There must be no comment like: "Class FooBar".',
1818
[new CodeSample('<?php
1919
/**
20-
* Class Foo\Bar
20+
* Class FooBar
2121
* Class to do something
2222
*/
23-
class Foo {}
23+
class FooBar {}
2424
')]
2525
);
2626
}

src/Readme/ReadmeCommand.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616

1717
class ReadmeCommand extends BaseCommand
1818
{
19+
private const NAME = 'PHP CS Fixer: custom fixers';
20+
1921
private const SHIELDS_HOST = 'https://img.shields.io';
2022
private const CODECOV_URL = 'https://codecov.io/gh/kubawerlos/php-cs-fixer-custom-fixers';
2123
private const PACKAGIST_URL = 'https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers';
2224
private const TRAVIS_URL = 'https://travis-ci.org/kubawerlos/php-cs-fixer-custom-fixers';
2325

2426
protected function execute(InputInterface $input, OutputInterface $output) : void
2527
{
26-
$output->writeln('# PHP CS Fixer: custom fixers');
28+
$output->writeln(\sprintf('# %s', self::NAME));
2729
$output->writeln($this->badges());
2830
$output->writeln($this->description());
2931
$output->writeln($this->installation());
@@ -69,11 +71,12 @@ private function installation() : string
6971
return \sprintf(
7072
'
7173
## Installation
72-
PHP CS Fixer custom fixers can be installed by running:
74+
%s can be installed by running:
7375
```bash
7476
composer require --dev %s
7577
```
7678
',
79+
self::NAME,
7780
$this->composer()->name
7881
);
7982
}

0 commit comments

Comments
 (0)