docs(phpdoc): document public methods across src/

Add professional PHPDoc (summary + @param/@return) to the remaining
public methods that had none or only partial coverage: GraphController's
actions, ContributionStore's accessors, SvgRenderer's render() and
private helpers (with concrete array-shape annotations), ProbeTrait,
ProviderHealthChecker, ProviderStatus, and the Contribution entity.
Also adds the matching @return shapes on SvgRendererTest's data
providers.
This commit is contained in:
2026-07-12 23:43:31 +02:00
parent 8e349c961b
commit 9c028aaf5e
8 changed files with 89 additions and 6 deletions
+12 -1
View File
@@ -4,8 +4,15 @@ declare(strict_types=1);
namespace GitContributionGraph\Service\Provider;
/** Result of probing a single provider, as reported by the /health endpoint. */
final class ProviderStatus
{
/**
* @param string $name provider identifier, e.g. "github"
* @param ProviderStatusType $status overall outcome of the probe
* @param ?ProviderErrorCode $error classified error code, set only when $status is Error
* @param ?string $message human-readable error detail, set only when $status is Error
*/
public function __construct(
public readonly string $name,
public readonly ProviderStatusType $status,
@@ -13,7 +20,11 @@ final class ProviderStatus
public readonly ?string $message = null,
) {}
/** @return array<string, string> */
/**
* Converts to the array shape used in the /health JSON response, omitting error/message when unset.
*
* @return array<string, string>
*/
public function toArray(): array
{
$data = ['status' => $this->status->value];