From 8f01bf32a272364d29f9a1ce7dc4943d019bf52b Mon Sep 17 00:00:00 2001 From: magdev Date: Tue, 4 Jun 2019 21:34:09 +0200 Subject: [PATCH] don't do this string hacking, we have a model --- src/Command/Dossier/DossierStatusCommand.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Command/Dossier/DossierStatusCommand.php b/src/Command/Dossier/DossierStatusCommand.php index a7d50c4..1b33d6f 100644 --- a/src/Command/Dossier/DossierStatusCommand.php +++ b/src/Command/Dossier/DossierStatusCommand.php @@ -106,10 +106,8 @@ class DossierStatusCommand extends BaseCommand foreach ($files as $file) { /* @var $file \SplFileInfo */ $document = $markdown->getDocument($file->getPathname()); - $sortValue = str_replace('-', '', $document->getYAML()['start_date']); - $entry = new Entry($document); - $status[$sortValue] = array(get_class($entry), 'cv/'.$file->getFilename(), + $status[$entry->getStartDate()->format('Ymd')] = array(get_class($entry), 'cv/'.$file->getFilename(), $this->io->align($this->io->bool($entry->useInResume()), 9, DossierStyle::ALIGN_CENTER), $this->io->align($this->io->percent($analyzer->analyze($entry), $thresholds), 6, DossierStyle::ALIGN_RIGHT) );