Skip to content

Commit d2c071d

Browse files
authored
Merge pull request #3 from plexp/readme-tweaks
Minor language changes in README.md
2 parents eb3234b + a97e409 commit d2c071d

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ Package automatically detects development environments and provide secure way to
66
at any environment.
77

88
## Features
9-
Package allows your app to switch to Debug Mode:
9+
Package allows your app to switch to Debug Mode:
1010
- automatically on localhost's environment by IP,
11-
- semi-automatically on any environment where you set `APP_DEBUG` environment variable (useful for Docker dev-stack),
11+
- semi-automatically on any environment where you set `APP_DEBUG` environment variable (useful for Docker dev-stack),
1212
- semi-automatically disable Debug mode on any environment where you set `app-debug-mode` cookie variable (useful for
13-
tests and similar cases),
13+
tests and similar cases),
1414
- manually enable/disable (force turn-on or turn-off) Debug Mode.
1515

16-
**NOTE:** Package is NOT provide any Debug tools directly – it only gives the app whether to switch to debug mode.
16+
**NOTE:** Package does NOT provide any Debug tools directly – it only tells the app whether to switch to debug mode.
1717

18-
Package is optimized for invoking in very early lifecycle phase of your App and
18+
Package is optimized for invoking in very early lifecycle phase of your App
1919

2020
## Requirements
21-
Package is requires:
21+
Package requires:
2222

2323
- PHP version at least 7.3
24-
- Temporary directory with writable access
24+
- Temporary directory with writable access
2525

2626
## Installation
2727
```shell
@@ -35,10 +35,10 @@ $debugMode = \Redbitcz\DebugMode\Detector::detect($tempDir); //bool
3535
```
3636
where `$tempDir` is required path to temporary directory.
3737

38-
It returns `$debugMode` = `true` when is detected Debug environment or manually switched.
38+
It returns `$debugMode` = `true` when it detects Debug environment or manually switched.
3939

4040
### Using with Nette
41-
In Boostrap use package like this example:
41+
In Boostrap use package like in this example:
4242
```php
4343
$tempDir = __DIR__ . '/../temp';
4444
$debugModeDetector = new \Redbitcz\DebugMode\Detector($tempDir);
@@ -47,10 +47,10 @@ $configurator = new Configurator();
4747
$configurator->setDebugMode($debugModeDetector->isDebugMode());
4848
```
4949
> I know, you love DI Container to build services like this. But Container Loader need to know Debug Mode state before is
50-
> DI Container ready, you cannot use DI for Debug Mode detecting.
50+
> DI Container ready, you cannot use DI for Debug Mode detecting.
5151
5252
## Using with Docker
53-
If you building custom Docker image for your devstack, add the environment variable `APP_DEBUG=1`. For example in `Dockerfile` file:
53+
If you are building custom Docker image for your devstack, add the environment variable `APP_DEBUG=1`. For example in `Dockerfile` file:
5454
```
5555
ENV APP_DEBUG 1
5656
```
@@ -64,11 +64,10 @@ environment:
6464
```
6565
6666
## Manually switch
67-
**WARNING – DANGER ZONE:** Following feature allows to force Debug Mode on any environment, production including.
68-
Please use it with great caution only! Wrong use might cause to critical security issue! Before using Enabler's feature be
69-
aware your app is resistant to XSS, CSRF and similar attacks!
67+
**WARNING – DANGER ZONE:** Following feature allows you to force Debug Mode on any environment, including *production*.
68+
Please use it with great caution only! Wrong use might cause critical security issue! Before using Enabler's feature, make sure your app is resistant to XSS, CSRF and similar attacks!
7069
71-
Enabler provide feature to force enable or disable Debug Mode anywhere for user's browser (drived by Cookie).
70+
Enabler provide feature to force enable or disable Debug Mode anywhere for user's browser (drived by Cookie).
7271
7372
This example turn on Debug Mode for user's browser:
7473
```php
@@ -88,10 +87,10 @@ services:
8887
- Redbitcz\DebugMode\Enabler(%tempDir%)
8988
```
9089
91-
At most cases this example is creates second instance of `Enabler` class because first one is already created
90+
At most cases this example creates second instance of `Enabler` class because first one is already created
9291
internally with `Detector` instance in `Bootstrap`.
9392

94-
To re-use already exists instance you can inject it to DI Container:
93+
To re-use already existing instance you can inject it to DI Container:
9594
```php
9695
$tempDir = __DIR__ . '/../temp';
9796
$debugModeDetector = new \Redbitcz\DebugMode\Detector($tempDir);
@@ -101,7 +100,7 @@ $configurator->setDebugMode($debugModeDetector->isDebugMode());
101100
$configurator->addServices(['debugModeEnabler' => $debugModeDetector->getEnabler()]);
102101
```
103102

104-
Don't forget let it know to DI Container with service declaration in `config.neon`:
103+
Don't forget letting know DI Container with service declaration in `config.neon`:
105104
```yaml
106105
services:
107106
debugModeEnabler:
@@ -110,4 +109,4 @@ services:
110109
```
111110

112111
## License
113-
The MIT License (MIT). Please see [License File](LICENSE) for more information.
112+
The MIT License (MIT). Please see [License File](LICENSE) for more information.

0 commit comments

Comments
 (0)