Ejemplo n.º 1
0
 /**
  * Prepare version structure for comparison
  *
  * @param string|Version $version
  * @return array
  * @throws Exception
  */
 protected function prepareVersionToCompareStruct($version)
 {
     if (!$version instanceof \Magelight\Version) {
         if (!is_string($version)) {
             throw new \Magelight\Exception('Version must be a string or instance of ' . __CLASS__);
         }
         $version = new \Magelight\Version($version);
     }
     return $version->getVersionStruct();
 }