diff --git a/src/Command/Dossier/DossierStatusCommand.php b/src/Command/Dossier/DossierStatusCommand.php index 74e8ed9..a7d50c4 100644 --- a/src/Command/Dossier/DossierStatusCommand.php +++ b/src/Command/Dossier/DossierStatusCommand.php @@ -102,17 +102,19 @@ class DossierStatusCommand extends BaseCommand ); $status[] = new TableSeparator(); - $files = new \FilesystemIterator(PROJECT_ROOT.'/cv'); + $files = new \FilesystemIterator(PROJECT_ROOT.'/cv', \FilesystemIterator::SKIP_DOTS); foreach ($files as $file) { /* @var $file \SplFileInfo */ $document = $markdown->getDocument($file->getPathname()); + $sortValue = str_replace('-', '', $document->getYAML()['start_date']); + $entry = new Entry($document); - $status[] = array(get_class($entry), 'cv/'.$file->getFilename(), + $status[$sortValue] = 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) ); } - + ksort($status); $this->io->table(array('Model', 'File', $this->io->align('In Resume', 9), $this->io->align('Status', 6, DossierStyle::ALIGN_RIGHT)