@@ -70,6 +70,7 @@ Install the [rstgroup/diagnostics-middleware](https://github.com/rstgroup/diagno
70
70
For example:
71
71
72
72
```` php
73
+ <?php
73
74
// run_diagnostics.php
74
75
75
76
use ZendDiagnostics\Check;
@@ -84,7 +85,7 @@ $runner = new Runner();
84
85
85
86
// Add checks
86
87
$runner->addCheck(new Check\DirWritable('/tmp'));
87
- $runner->addCheck(new Check\DiskFree('/tmp', 100000000 ));
88
+ $runner->addCheck(new Check\DiskFree(100000000, '/tmp'));
88
89
89
90
// Add console reporter
90
91
$runner->addReporter(new BasicConsole(80, true));
@@ -114,8 +115,9 @@ attached Reporter). This collection contains results for all tests and failure c
114
115
Simple example:
115
116
116
117
```` php
118
+ <?php
117
119
$runner = new Runner();
118
- $checkSpace = new Check\DiskFree('/tmp', 100000000 );
120
+ $checkSpace = new Check\DiskFree(100000000, '/tmp');
119
121
$checkTemp = new Check\DirWritable('/tmp');
120
122
$runner->addCheck($checkSpace);
121
123
$runner->addCheck($checkTemp);
@@ -167,6 +169,7 @@ applications and libraries.
167
169
A Check class has to implement [ Check] ( src/ZendDiagnostics/Check/CheckInterface.php ) and provide the following methods:
168
170
169
171
```` php
172
+ <?php
170
173
interface CheckInterface
171
174
{
172
175
/**
@@ -190,6 +193,7 @@ compatibility with Runner and other checks.
190
193
Here is an example trivial class, that will check if PHP default timezone is set to UTC.
191
194
192
195
```` php
196
+ <?php
193
197
namespace MyApp\Diagnostics\Check;
194
198
195
199
use ZendDiagnostics\Check\CheckInterface;
@@ -221,6 +225,7 @@ class TimezoneSetToUTC implements CheckInterface
221
225
A Reporter is a class implementing [ ReporterInterface] ( src/ZendDiagnostics/Runner/Reporter/ReporterInterface.php ) .
222
226
223
227
```` php
228
+ <?php
224
229
interface ReporterInterface
225
230
{
226
231
public function onStart(ArrayObject $checks, $runnerConfig);
0 commit comments