Skip to content

Commit 93f588d

Browse files
committed
Docs: Make grammar and structure improvements in readme and upgrade guide
1 parent b2e17f7 commit 93f588d

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

README.md

+16-11
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
[![Latest Stable Version](https://img.shields.io/packagist/v/lmc/coding-standard.svg?style=flat-square)](https://packagist.org/packages/lmc/coding-standard)
44

5-
PHP coding standard used in [Alma Career Czechia](https://www.almacareer.com/) (formerly LMC) products.
5+
PHP coding standard used in [Alma Career Czechia][Alma Career] (formerly LMC) products.
66

7-
Standard is based on [PSR-12](https://www.php-fig.org/psr/psr-12/) and adds
7+
The standard is based on [PSR-12][psr-12] and partially [PER 2.0][per-2] and adds
88
various checks to make sure the code is readable, follows the same conventions, and does not contain common mistakes.
99

10-
We use [EasyCodingStandard] to define and execute checks created for both [PHP-CS-Fixer] and [PHP_CodeSniffer].
10+
We use [EasyCodingStandard][ecs] to define and execute checks created for both [PHP-CS-Fixer] and [PHP_CodeSniffer].
1111

1212
## Installation
1313

@@ -59,7 +59,7 @@ Now you will be able to run the fix using `composer analyze` and execute automat
5959

6060
### Add custom checks or override default settings
6161

62-
On top of default code-style rules you are free to add any rules from [PHP-CS-Fixer] or [PHP_CodeSniffer].
62+
On top of the default code-style rules, you are free to add any rules from [PHP-CS-Fixer] or [PHP_CodeSniffer].
6363
If needed, you can also override some default settings.
6464

6565
```php
@@ -83,12 +83,12 @@ return ECSConfig::configure()
8383
/* (...) */
8484
```
8585

86-
See [EasyCodingStandard docs](https://github.com/symplify/easy-coding-standard#configuration) for more configuration options.
86+
See [EasyCodingStandard docs][ecs-docs] for more configuration options.
8787

8888

8989
### Exclude (skip) checks or files
9090

91-
You can configure your `ecs.php` to entirely skip some files, disable specific checks or suppress specific errors.
91+
You can configure your `ecs.php` file to entirely skip some files, disable specific checks, or suppress specific errors.
9292

9393
```php
9494
<?php declare(strict_types=1);
@@ -114,18 +114,23 @@ return ECSConfig::configure()
114114
/* (...) */
115115
```
116116

117-
See [EasyCodingStandard docs](https://github.com/symplify/easy-coding-standard#configuration) for more configuration options.
117+
See [EasyCodingStandard docs][ecs-docs] for more configuration options.
118118

119119
### IDE integration
120120

121-
For integration with PHPStorm etc. follow instructions in EasyCodingStandard [README](https://github.com/symplify/easy-coding-standard#your-ide-integration).
121+
For integration with PHPStorm and other IDEs, follow instructions in [EasyCodingStandard README][ecs-readme-ide].
122122

123123
## Changelog
124-
For the latest changes see [CHANGELOG.md](CHANGELOG.md) file. We follow [Semantic Versioning](https://semver.org/).
124+
For the latest changes, see [CHANGELOG.md](CHANGELOG.md) file. This library follows [Semantic Versioning](https://semver.org/).
125125

126126
## License
127-
This library is open source software licensed under the [MIT license](LICENSE.md).
127+
This library is open-source software licensed under the [MIT license](LICENSE.md).
128128

129+
[Alma Career]: https://www.almacareer.com/
129130
[PHP-CS-Fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
130131
[PHP_CodeSniffer]: https://github.com/squizlabs/PHP_CodeSniffer
131-
[EasyCodingStandard]: https://github.com/symplify/easy-coding-standard
132+
[psr-12]: https://www.php-fig.org/psr/psr-12/
133+
[per-2]: https://www.php-fig.org/per/coding-style/
134+
[ecs]: https://github.com/easy-coding-standard/easy-coding-standard
135+
[ecs-docs]: https://github.com/easy-coding-standard/easy-coding-standard#configure
136+
[ecs-readme-ide]: https://github.com/easy-coding-standard/easy-coding-standard/blob/9.0.0/README.md#your-ide-integration

UPGRADE-4.0.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Upgrading from 3.x to 4.0
22

33
### 1. Update dependency in composer.json
4-
In require-dev section change the version constraint:
4+
In the `require-dev` section of `composer.json` change the version constraint:
55

66
```diff
77
- "lmc/coding-standard": "^3.3",
@@ -11,9 +11,9 @@ In require-dev section change the version constraint:
1111
Then run `composer update`.
1212

1313
### 2. Configuration updates
14-
Configuration now uses `ECSConfig` class instead of `ContainerConfigurator`.
14+
The configuration now uses `ECSConfig` class instead of `ContainerConfigurator`.
1515

16-
Update your `ecs.php` to use the new configuration style:
16+
Update your `ecs.php` file to use the new configuration style:
1717

1818
```diff
1919
-use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
@@ -99,13 +99,13 @@ thoughtfully reviewed - can change the code behavior. Especially changes introdu
9999
or you can introduce some of the rules gradually or on a file-by-file basis.
100100

101101
### 6. Sanity check
102-
Besides running your code style checks, you can ensure all predefined checks are loaded as well, by running:
102+
Besides running your code style checks, you can ensure all predefined checks are loaded by running:
103103

104104
```sh
105105
vendor/bin/ecs list-checkers
106106
```
107107

108-
The result should end with something like:
108+
The result should end with something like this:
109109
```
110110
41 checkers from PHP_CodeSniffer:
111111
...

0 commit comments

Comments
 (0)