Doctor
class Doctor
Properties
| protected Diagnostic>> | $diagnostics | The registered diagnostic classes. |
Methods
Register a diagnostic.
Register multiple diagnostics.
Get the registered diagnostic classes.
Determine whether any diagnostics are registered.
Run the registered diagnostics.
Begin a run constrained to diagnostics matching the given selectors.
Begin a run that excludes diagnostics matching the given selectors.
Begin a run that stops after the first failing diagnostic.
Begin a run that observes each diagnostic group through the given callback.
Begin a run that invokes the given callback when applied fixes require the diagnostics to be re-run.
Begin a new pending diagnostic run.
Get the diagnostic selection configured for the application.
Get the selected diagnostics grouped by diagnostic group.
Get the selected diagnostic instances in registration order.
Details
at line 37
__construct(Container $container)
Create a new Doctor instance.
at line 48
Doctor
diagnostic(string $diagnostic)
Register a diagnostic.
On the shared Doctor service, the registration affects subsequent runs.
at line 67
Doctor
diagnostics(iterable $diagnostics)
Register multiple diagnostics.
On the shared Doctor service, the registration affects subsequent runs.
at line 82
array
registered()
Get the registered diagnostic classes.
at line 90
bool
hasDiagnostics()
Determine whether any diagnostics are registered.
at line 98
DiagnosticReport
run()
Run the registered diagnostics.
at line 109
PendingRun
only(string ...$selectors)
Begin a run constrained to diagnostics matching the given selectors.
Selectors may reference a diagnostic class, class basename, group, or package name.
at line 117
PendingRun
except(string ...$selectors)
Begin a run that excludes diagnostics matching the given selectors.
at line 125
PendingRun
bail(bool $bail = true)
Begin a run that stops after the first failing diagnostic.
at line 135
PendingRun
observeUsing(Closure $callback)
Begin a run that observes each diagnostic group through the given callback.
at line 145
PendingRun
fixUsing(Closure $callback)
Begin a run that applies fixes approved by the given callback.
at line 156
PendingRun
beforeRerun(Closure $callback)
Begin a run that invokes the given callback when applied fixes require the diagnostics to be re-run.
at line 164
protected PendingRun
pendingRun()
Begin a new pending diagnostic run.
at line 172
protected DiagnosticSelection
defaultSelection()
Get the diagnostic selection configured for the application.
at line 183
DiagnosticOutcome
check(Diagnostic $diagnostic)
Run a single diagnostic.
at line 202
DiagnosticFixOutcome
fix(DiagnosticOutcome $outcome, string|null $option = null)
Run the fix for a diagnostic outcome.
at line 248
array
selectedByGroup(DiagnosticSelection|null $selection = null)
Get the selected diagnostics grouped by diagnostic group.
at line 261
protected array
selected(DiagnosticSelection|null $selection = null)
Get the selected diagnostic instances in registration order.