Skip to content

Commit

Permalink
Coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppekroghitk committed Jan 3, 2025
1 parent e0c5293 commit 5e82681
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Service/DataSynchronizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use App\Entity\Account;
use App\Entity\Client;
use App\Entity\DataProvider;
use App\Entity\Epic;
use App\Entity\Invoice;
use App\Entity\Issue;
use App\Entity\Project;
Expand Down
4 changes: 3 additions & 1 deletion src/Service/InvoicingRateReportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

class InvoicingRateReportService
{
private const SECONDS_TO_HOURS = 1 / 3600;

public function __construct(
private readonly WorkerRepository $workerRepository,
private readonly WorklogRepository $worklogRepository,
Expand Down Expand Up @@ -88,7 +90,7 @@ public function getInvoicingRateReport(
// Tally up logged hours in gathered worklogs for current period
$loggedHours = 0;
foreach ($worklogs as $worklog) {
$loggedHours += ($worklog->getTimeSpentSeconds() / 60 / 60);
$loggedHours += ($worklog->getTimeSpentSeconds() * self::SECONDS_TO_HOURS);
}

// Tally up billable logged hours in gathered worklogs for current period
Expand Down

0 comments on commit 5e82681

Please sign in to comment.