1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00
invoiceninja/app/Ninja/Import/Nutcache/TaskTransformer.php
Holger Lösken 0fbda85a59 Code Refactoring
- Removed unused uses
- Type hinting for method parameters
- Removed commented code
- Introduced comments for classes and methods
- Short array syntax
2016-07-03 16:19:22 +00:00

28 lines
670 B
PHP

<?php namespace App\Ninja\Import\FreshBooks;
use App\Ninja\Import\BaseTransformer;
/*
class TaskTransformer extends BaseTransformer
{
public function transform($data)
{
// start by converting to seconds
$seconds = ($data->hours * 3600);
$timeLogFinish = strtotime($data->date);
$timeLogStart = intval($timeLogFinish - $seconds);
$timeLog[] = [];
$timelog[] = $timeLogStart;
$timelog[] = $timeLogFinish;
$timeLog = json_encode(array($timelog));
return [
'action' => 'stop',
'time_log' => $timeLog,
'description' => $data->task,
];
}
}
*/