laminas / laminas-diagnostics

A set of components for performing diagnostic tests in PHP applications
https://docs.laminas.dev/laminas-diagnostics/
BSD 3-Clause "New" or "Revised" License
55 stars 32 forks source link

Add ResultInterface template #67

Closed bram123 closed 8 months ago

bram123 commented 1 year ago
Q A
Documentation no
Bugfix no
BC Break maybe
New Feature no
RFC yes
QA no

Add ResultInterface template for the data field, for strict typing in the Check classes.

Started with DiskFree and DiskUsage checks.

If acceptable I will continue with the other checks.

Signed-off-by: Bram Leeda bram@123inkt.nl

bram123 commented 1 year ago

Had to add @template to all Result implementation classes (success/warning/skip/failure) and all interfaces. For some reason psalm did not let me set the @return docblock to ResultInterface, I had to set it to Success|Warning|Failure