Skip to content

Commit

Permalink
Merge pull request #104 from larowlan/fix-review-exact
Browse files Browse the repository at this point in the history
Fix for review --exact
  • Loading branch information
larowlan authored Apr 16, 2018
2 parents 4b1ed6c + 191753e commit db8602e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Commands/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$question = new ConfirmationQuestion('Are you sure?', false);

$confirm = NULL;
if (($slot = $this->repository->slot($slot_id)) && ($confirm = ($input->hasOption('confirm') || $helper->ask($input, $output, $question))) && $this->repository->delete($slot_id)) {
if (($slot = $this->repository->slot($slot_id)) && ($confirm = ($input->getOption('confirm') || $helper->ask($input, $output, $question))) && $this->repository->delete($slot_id)) {
$deleted = $this->connector->ticketDetails($slot->tid);
$output->writeln(sprintf('Deleted slot <comment>%d</comment> against ticket <info>%d</info>: %s, duration <info>%s</info>',
$slot->id,
Expand Down
4 changes: 2 additions & 2 deletions src/Reviewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public function getSummary($date = 19780101, $check = FALSE, $exact = FALSE) {
$duration,
];
if ($exact) {
$row[] = Formatter::formatDuration($record->end - $record->start);
$exact_total += ($record->end - $record->start);
$row[] = Formatter::formatDuration(($record->end ?: time()) - $record->start);
$exact_total += (($record->end ?: time()) - $record->start);
}
$row = array_merge($row, [
substr($details->getTitle(), 0, 25) . '...',
Expand Down

0 comments on commit db8602e

Please sign in to comment.