original_string: protected function getFileVersions($code)
      {
          if ($this->fileVersions !== null && array_key_exists($code, $this->fileVersions)) {
              return $this->fileVersions[$code];
          }
  
          $versionFile = $this->getVersionFile($code);
          $versionInfo = Yaml::parseFile($versionFile);
  
          if (!is_array($versionInfo)) {
              $versionInfo = [];
          }
  
          if ($versionInfo) {
              uksort($versionInfo, function ($a, $b) {
                  return version_compare($a, $b);
              });
          }
  
          return $this->fileVersions[$code] = $versionInfo;
      }
code: protected function getFileVersions($code)
      {
          if ($this->fileVersions !== null && array_key_exists($code, $this->fileVersions)) {
              return $this->fileVersions[$code];
          }
  
          $versionFile = $this->getVersionFile($code);
          $versionInfo = Yaml::parseFile($versionFile);
  
          if (!is_array($versionInfo)) {
              $versionInfo = [];
          }
  
          if ($versionInfo) {
              uksort($versionInfo, function ($a, $b) {
                  return version_compare($a, $b);
              });
          }
  
          return $this->fileVersions[$code] = $versionInfo;
      }
code_tokens: protected function getFileVersions ( $ code ) { if ( $ this -> fileVersions !== null && array_key_exists ( $ code , $ this -> fileVersions ) ) { return $ this -> fileVersions [ $ code ] ; } $ versionFile = $ this -> getVersionFile ( $ code ) ; $ versionInfo = Yaml :: parseFile ( $ versionFile ) ; if ( ! is_array ( $ versionInfo ) ) { $ versionInfo = [ ] ; } if ( $ versionInfo ) { uksort ( $ versionInfo , function ( $ a , $ b ) { return version_compare ( $ a , $ b ) ; } ) ; } return $ this -> fileVersions [ $ code ] = $ versionInfo ; }
docstring: Returns all versions of a plugin from its version file.
docstring_tokens: Returns all versions of a plugin from its version file .