original_string: public static function lastModifiedFolder($path)
      {
          $last_modified = 0;
  
          /** @var UniformResourceLocator $locator */
          $locator = Grav::instance()['locator'];
          $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
          if ($locator->isStream($path)) {
              $directory = $locator->getRecursiveIterator($path, $flags);
          } else {
              $directory = new \RecursiveDirectoryIterator($path, $flags);
          }
          $filter  = new RecursiveFolderFilterIterator($directory);
          $iterator = new \RecursiveIteratorIterator($filter, \RecursiveIteratorIterator::SELF_FIRST);
  
          /** @var \RecursiveDirectoryIterator $file */
          foreach ($iterator as $dir) {
              $dir_modified = $dir->getMTime();
              if ($dir_modified > $last_modified) {
                  $last_modified = $dir_modified;
              }
          }
  
          return $last_modified;
      }
code: public static function lastModifiedFolder($path)
      {
          $last_modified = 0;
  
          /** @var UniformResourceLocator $locator */
          $locator = Grav::instance()['locator'];
          $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
          if ($locator->isStream($path)) {
              $directory = $locator->getRecursiveIterator($path, $flags);
          } else {
              $directory = new \RecursiveDirectoryIterator($path, $flags);
          }
          $filter  = new RecursiveFolderFilterIterator($directory);
          $iterator = new \RecursiveIteratorIterator($filter, \RecursiveIteratorIterator::SELF_FIRST);
  
          /** @var \RecursiveDirectoryIterator $file */
          foreach ($iterator as $dir) {
              $dir_modified = $dir->getMTime();
              if ($dir_modified > $last_modified) {
                  $last_modified = $dir_modified;
              }
          }
  
          return $last_modified;
      }
code_tokens: public static function lastModifiedFolder ( $ path ) { $ last_modified = 0 ; /** @var UniformResourceLocator $locator */ $ locator = Grav :: instance ( ) [ 'locator' ] ; $ flags = \ RecursiveDirectoryIterator :: SKIP_DOTS ; if ( $ locator -> isStream ( $ path ) ) { $ directory = $ locator -> getRecursiveIterator ( $ path , $ flags ) ; } else { $ directory = new \ RecursiveDirectoryIterator ( $ path , $ flags ) ; } $ filter = new RecursiveFolderFilterIterator ( $ directory ) ; $ iterator = new \ RecursiveIteratorIterator ( $ filter , \ RecursiveIteratorIterator :: SELF_FIRST ) ; /** @var \RecursiveDirectoryIterator $file */ foreach ( $ iterator as $ dir ) { $ dir_modified = $ dir -> getMTime ( ) ; if ( $ dir_modified > $ last_modified ) { $ last_modified = $ dir_modified ; } } return $ last_modified ; }
docstring: Recursively find the last modified time under given path.
  
  @param  string $path
  @return int
docstring_tokens: Recursively find the last modified time under given path .