original_string: public function getLogFiles()
      {
          $files = new Finder();
          $files->files()->in(LOG_DIR)->name('*.log')->sortByModifiedTime();
          $logs = array();
          /** @var \SplFileInfo $file */
          foreach ($files as $file) {
              $size = $file->getSize() / 8 / 1024;
              $time = date('c', $file->getMTime());
              $dateTime = new \DateTime($time);
              if (!isset($logs[$dateTime->format('Y')])) {
                  $logs[$dateTime->format('Y')] = [];
              }
              $logs[$dateTime->format('Y')][$dateTime->format('m')][$time] = [
                  'filename' => $file->getFilename(),
                  'size' => round($size, 3),
              ];
              krsort($logs[$dateTime->format('Y')][$dateTime->format('m')]);
              krsort($logs[$dateTime->format('Y')]);
          }
          return $logs;
      }
code: public function getLogFiles()
      {
          $files = new Finder();
          $files->files()->in(LOG_DIR)->name('*.log')->sortByModifiedTime();
          $logs = array();
          /** @var \SplFileInfo $file */
          foreach ($files as $file) {
              $size = $file->getSize() / 8 / 1024;
              $time = date('c', $file->getMTime());
              $dateTime = new \DateTime($time);
              if (!isset($logs[$dateTime->format('Y')])) {
                  $logs[$dateTime->format('Y')] = [];
              }
              $logs[$dateTime->format('Y')][$dateTime->format('m')][$time] = [
                  'filename' => $file->getFilename(),
                  'size' => round($size, 3),
              ];
              krsort($logs[$dateTime->format('Y')][$dateTime->format('m')]);
              krsort($logs[$dateTime->format('Y')]);
          }
          return $logs;
      }
code_tokens: public function getLogFiles ( ) { $ files = new Finder ( ) ; $ files -> files ( ) -> in ( LOG_DIR ) -> name ( '*.log' ) -> sortByModifiedTime ( ) ; $ logs = array ( ) ; /** @var \SplFileInfo $file */ foreach ( $ files as $ file ) { $ size = $ file -> getSize ( ) / 8 / 1024 ; $ time = date ( 'c' , $ file -> getMTime ( ) ) ; $ dateTime = new \ DateTime ( $ time ) ; if ( ! isset ( $ logs [ $ dateTime -> format ( 'Y' ) ] ) ) { $ logs [ $ dateTime -> format ( 'Y' ) ] = [ ] ; } $ logs [ $ dateTime -> format ( 'Y' ) ] [ $ dateTime -> format ( 'm' ) ] [ $ time ] = [ 'filename' => $ file -> getFilename ( ) , 'size' => round ( $ size , 3 ) , ] ; krsort ( $ logs [ $ dateTime -> format ( 'Y' ) ] [ $ dateTime -> format ( 'm' ) ] ) ; krsort ( $ logs [ $ dateTime -> format ( 'Y' ) ] ) ; } return $ logs ; }
docstring: Servicio que lee los logs y los formatea para listarlos
  @return array
docstring_tokens: Servicio que lee los logs y los formatea para listarlos