تخطَّ إلى المحتوى

TODO comment (ARCH7183)

هذا المحتوى غير متوفر بلغتك بعد.

Key php.quality.todo-comment · Severity info · Category quality

TODO/FIXME/HACK/XXX markers left in code signal unfinished work and get forgotten over time. Resolve them before merge or link them to a tracking issue.

<?php
function chargeCustomer(int $cents): void
{
// TODO: add error handling
$this->gateway->charge($cents);
}
<?php
function chargeCustomer(int $cents): void
{
try {
$this->gateway->charge($cents);
} catch (GatewayException $e) {
$this->logger->error('charge failed', ['exception' => $e]);
throw $e;
}
}

Complete the work the TODO describes, or link it to a tracked issue and remove the comment.