Rename recurrence_repetitions and nr_of_repetitions.

This commit is contained in:
James Cole
2019-08-25 16:15:02 +02:00
parent 1f9fddaa32
commit 6bc5794dfd

View File

@@ -94,23 +94,23 @@ class RecurrenceTransformer extends AbstractTransformer
// basic data.
$return = [
'id' => (int)$recurrence->id,
'created_at' => $recurrence->created_at->toAtomString(),
'updated_at' => $recurrence->updated_at->toAtomString(),
'type' => $shortType,
'title' => $recurrence->title,
'description' => $recurrence->description,
'first_date' => $recurrence->first_date->format('Y-m-d'),
'latest_date' => null === $recurrence->latest_date ? null : $recurrence->latest_date->format('Y-m-d'),
'repeat_until' => null === $recurrence->repeat_until ? null : $recurrence->repeat_until->format('Y-m-d'),
'apply_rules' => $recurrence->apply_rules,
'active' => $recurrence->active,
'repetitions' => $recurrence->repetitions,
'notes' => $this->repository->getNoteText($recurrence),
'recurrence_repetitions' => $this->getRepetitions($recurrence),
'transactions' => $this->getTransactions($recurrence),
'meta' => $this->getMeta($recurrence),
'links' => [
'id' => (int)$recurrence->id,
'created_at' => $recurrence->created_at->toAtomString(),
'updated_at' => $recurrence->updated_at->toAtomString(),
'type' => $shortType,
'title' => $recurrence->title,
'description' => $recurrence->description,
'first_date' => $recurrence->first_date->format('Y-m-d'),
'latest_date' => null === $recurrence->latest_date ? null : $recurrence->latest_date->format('Y-m-d'),
'repeat_until' => null === $recurrence->repeat_until ? null : $recurrence->repeat_until->format('Y-m-d'),
'apply_rules' => $recurrence->apply_rules,
'active' => $recurrence->active,
'nr_of_repetitions' => $recurrence->repetitions,
'notes' => $this->repository->getNoteText($recurrence),
'repetitions' => $this->getRepetitions($recurrence),
'transactions' => $this->getTransactions($recurrence),
'meta' => $this->getMeta($recurrence),
'links' => [
[
'rel' => 'self',
'uri' => '/recurring/' . $recurrence->id,