@@ -70,6 +70,7 @@ Install the [rstgroup/diagnostics-middleware](https://github.com/rstgroup/diagno
7070For example:
7171
7272```` php
73+ <?php
7374// run_diagnostics.php
7475
7576use 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
114115Simple 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.
167169A Check class has to implement [ Check] ( src/ZendDiagnostics/Check/CheckInterface.php ) and provide the following methods:
168170
169171```` php
172+ <?php
170173interface CheckInterface
171174{
172175 /**
@@ -190,6 +193,7 @@ compatibility with Runner and other checks.
190193Here is an example trivial class, that will check if PHP default timezone is set to UTC.
191194
192195```` php
196+ <?php
193197namespace MyApp\Diagnostics\Check;
194198
195199use ZendDiagnostics\Check\CheckInterface;
@@ -221,6 +225,7 @@ class TimezoneSetToUTC implements CheckInterface
221225A Reporter is a class implementing [ ReporterInterface] ( src/ZendDiagnostics/Runner/Reporter/ReporterInterface.php ) .
222226
223227```` php
228+ <?php
224229interface ReporterInterface
225230{
226231 public function onStart(ArrayObject $checks, $runnerConfig);
0 commit comments