Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 831f6ad

Browse files
authored
Merge pull request #76 from sinbonders/patch-1
Correcting syntax in code examples.
2 parents 5bc3976 + 76b04f6 commit 831f6ad

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Install the [rstgroup/diagnostics-middleware](https://github.com/rstgroup/diagno
7070
For example:
7171

7272
````php
73+
<?php
7374
// run_diagnostics.php
7475

7576
use ZendDiagnostics\Check;
@@ -84,7 +85,7 @@ $runner = new Runner();
8485

8586
// Add checks
8687
$runner->addCheck(new Check\DirWritable('/tmp'));
87-
$runner->addCheck(new Check\DiskFree('/tmp', 100000000));
88+
$runner->addCheck(new Check\DiskFree(100000000, '/tmp'));
8889

8990
// Add console reporter
9091
$runner->addReporter(new BasicConsole(80, true));
@@ -114,8 +115,9 @@ attached Reporter). This collection contains results for all tests and failure c
114115
Simple example:
115116

116117
````php
118+
<?php
117119
$runner = new Runner();
118-
$checkSpace = new Check\DiskFree('/tmp', 100000000);
120+
$checkSpace = new Check\DiskFree(100000000, '/tmp');
119121
$checkTemp = new Check\DirWritable('/tmp');
120122
$runner->addCheck($checkSpace);
121123
$runner->addCheck($checkTemp);
@@ -167,6 +169,7 @@ applications and libraries.
167169
A Check class has to implement [Check](src/ZendDiagnostics/Check/CheckInterface.php) and provide the following methods:
168170

169171
````php
172+
<?php
170173
interface CheckInterface
171174
{
172175
/**
@@ -190,6 +193,7 @@ compatibility with Runner and other checks.
190193
Here is an example trivial class, that will check if PHP default timezone is set to UTC.
191194

192195
````php
196+
<?php
193197
namespace MyApp\Diagnostics\Check;
194198

195199
use ZendDiagnostics\Check\CheckInterface;
@@ -221,6 +225,7 @@ class TimezoneSetToUTC implements CheckInterface
221225
A Reporter is a class implementing [ReporterInterface](src/ZendDiagnostics/Runner/Reporter/ReporterInterface.php).
222226

223227
````php
228+
<?php
224229
interface ReporterInterface
225230
{
226231
public function onStart(ArrayObject $checks, $runnerConfig);

0 commit comments

Comments
 (0)