Skip to content

Commit 33f815c

Browse files
Merge pull request #7 from dpobel/readme_enable_coverage
Fixed README to correctly document LiveCodeCoverage::bootstrap() first parameter
2 parents 8552f38 + 1bd780d commit 33f815c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In your front controller (e.g. `index.php`), add the following:
2020
use LiveCodeCoverage\LiveCodeCoverage;
2121

2222
$shutDownCodeCoverage = LiveCodeCoverage::bootstrap(
23-
function () { return (bool)getenv('CODE_COVERAGE_ENABLED'); },
23+
(bool)getenv('CODE_COVERAGE_ENABLED'),
2424
__DIR__ . '/../var/coverage',
2525
__DIR__ . '/../phpunit.xml.dist'
2626
);
@@ -31,7 +31,7 @@ $shutDownCodeCoverage = LiveCodeCoverage::bootstrap(
3131
$shutDownCodeCoverage();
3232
```
3333

34-
- The first argument passed to `LiveCodeCoverage::bootstrap()` is a callable that will be used to determine if code coverage is enabled at all. The example shows how you can use an environment variable for that. Make
34+
- The first argument passed to `LiveCodeCoverage::bootstrap()` is a boolean that will be used to determine if code coverage is enabled at all. The example shows how you can use an environment variable for that.
3535
- The second argument is the directory where all the collected coverage data will be stored (`*.cov` files). If this directory doesn't exist yet, it will be created.
3636
- The third argument is the path to a PHPUnit configuration file. Its `<filter>` section will be used to configure the code coverage whitelist. For example, this `phpunit.xml.dist` file might look something like this:
3737

0 commit comments

Comments
 (0)