Commit ba7c2c58 authored by catch's avatar catch
Browse files

Issue #3212005 by guilhermevp, tedbow, phenaproxima: Add @throws docs to...

Issue #3212005 by guilhermevp, tedbow, phenaproxima: Add @throws docs to factory methods in \Drupal\update\ModuleVersion
parent e821dc58
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -47,6 +47,10 @@ final class ModuleVersion {
   *
   * @return \Drupal\update\ModuleVersion
   *   The module version instance.
   *
   * @throws \UnexpectedValueException
   *   Thrown when a legacy version string has a core prefix other than "8.x-"
   *   for example, version strings such as "7.x-1.0" are not supported.
   */
  public static function createFromVersionString($version_string) {
    $original_version = $version_string;
@@ -105,6 +109,9 @@ private function __construct($major_version, $version_extra) {
   *
   * @return \Drupal\update\ModuleVersion
   *   The module version instance.
   *
   * @throws \UnexpectedValueException
   *   Thrown when $branch is not valid because it does not end in ".".
   */
  public static function createFromSupportBranch($branch) {
    if (substr($branch, -1) !== '.') {