INA-5 | TaskSchedulerTransformer [License, typehints]

This commit is contained in:
Nikola Cirkovic 2022-05-25 23:26:38 +02:00
parent dfd33773d2
commit b1795df3ec

View File

@ -1,5 +1,13 @@
<?php <?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Transformers; namespace App\Transformers;
@ -27,12 +35,13 @@ class TaskSchedulerTransformer extends EntityTransformer
{ {
return [ return [
'id' => $this->encodePrimaryKey($scheduler->id), 'id' => $this->encodePrimaryKey($scheduler->id),
'company_id' => $this->encodePrimaryKey($scheduler->user_id), 'paused' => (bool)$scheduler->paused,
'paused' => $scheduler->paused, 'archived' => (bool)$scheduler->archived,
'archived' => $scheduler->archived, 'repeat_every' => (string)$scheduler->repeat_every,
'repeat_every' => $scheduler->repeat_every, 'start_from' => (int)$scheduler->start_from,
'start_from' => $scheduler->start_from, 'scheduled_run' => (int)$scheduler->scheduled_run,
'scheduled_run' => $scheduler->scheduled_run, 'updated_at' => (int)$scheduler->updated_at,
'created_at' => (int)$scheduler->created_at,
]; ];
} }