2323use Technodelight \Jira \Console \Dashboard \WorklogFetcher ;
2424use Technodelight \Jira \Console \Input \Worklog \Comment as CommentInput ;
2525use Technodelight \Jira \Domain \Issue ;
26+ use Technodelight \Jira \Domain \Issue \IssueKey ;
2627use Technodelight \Jira \Domain \Worklog ;
2728use Technodelight \Jira \Renderer \DashboardRenderer ;
2829use Technodelight \Jira \Renderer \Issue \Header as HeaderRenderer ;
@@ -154,7 +155,7 @@ protected function interact(InputInterface $input, OutputInterface $output): voi
154155 $ this ->askForTimeToLog (
155156 $ input ,
156157 $ output ,
157- $ issueKeyOrWorklogId ->issueKey () ? ( string ) $ issueKeyOrWorklogId -> issueKey () : '' ,
158+ $ issueKeyOrWorklogId ->issueKey (),
158159 $ issueKeyOrWorklogId ->worklog ()
159160 )
160161 );
@@ -263,7 +264,7 @@ private function processNewWorklog(
263264 $ issueKeyOrWorklogId ->issueKey (),
264265 $ timeSpent ,
265266 $ comment ?: 'Worked on issue ' . $ issueKeyOrWorklogId ->issueKey (),
266- $ this ->dateResolver ->argument ($ input )
267+ $ this ->dateResolver ->argument ($ input )-> toDateTime ()-> format (DateTime:: ATOM )
267268 );
268269 $ this ->showSuccessMessages ($ output , $ worklog );
269270
@@ -297,7 +298,7 @@ private function interactiveTimelog(InputInterface $input, OutputInterface $outp
297298 $ issue ->key (),
298299 $ time ,
299300 $ comment ?: 'Worked on issue ' . $ issue ->key (),
300- $ this ->dateResolver ->argument ($ input )
301+ $ this ->dateResolver ->argument ($ input )-> toDateTime ()-> format (DateTime:: ATOM )
301302 );
302303 $ this ->showSuccessMessages ($ output , $ worklog );
303304 $ timeLeft = $ timeLeft - $ worklog ->timeSpentSeconds ();
@@ -413,11 +414,11 @@ private function askIssueToChooseFrom(InputInterface $input, OutputInterface $ou
413414 private function askForTimeToLog (
414415 InputInterface $ input ,
415416 OutputInterface $ output ,
416- string $ issueKey ,
417- Worklog $ worklog = null
417+ ? IssueKey $ issueKey ,
418+ ? Worklog $ worklog = null
418419 ): string {
419420 $ question = new Question (
420- $ this ->loggedTimeDialogText ($ issueKey , $ worklog ),
421+ $ this ->loggedTimeDialogText (( string ) $ issueKey , $ worklog ),
421422 $ worklog ? $ this ->dateHelper ->secondsToHuman ($ worklog ->timeSpentSeconds ()) : '1d '
422423 );
423424 $ question ->setValidator (function ($ answer ) {
@@ -436,7 +437,7 @@ private function renderDashboard(InputInterface $input, OutputInterface $output)
436437 $ this ->dashboardRenderer ->render (
437438 $ output ,
438439 $ this ->dashDataProvider ->fetch (
439- date ('Y-m-d ' , strtotime ($ this ->dateResolver ->argument ($ input )))
440+ date ('Y-m-d ' , strtotime ($ this ->dateResolver ->argument ($ input )-> toDateTime ()-> format (DateTime:: ATOM ) ))
440441 )
441442 );
442443 }
0 commit comments