/**
  * Get the Magento version for the given client.
  *
  * @param MagentoSoapClient $client
  *
  * @return float
  */
 protected function getMagentoVersion(MagentoSoapClient $client = null)
 {
     if (null === $client) {
         return null;
     }
     if (!$this->version) {
         try {
             $magentoVersion = $client->call('core_magento.info')['magento_version'];
         } catch (\SoapFault $e) {
             return self::MAGENTO_VERSION_1_6;
         } catch (SoapCallException $e) {
             throw $e;
         }
         $pattern = '/^(?P<version>[0-9]+\\.[0-9]+)(\\.[0-9])*/';
         if (preg_match($pattern, $magentoVersion, $matches)) {
             $this->version = $matches['version'];
         } else {
             $this->version = $magentoVersion;
         }
     }
     return $this->version;
 }
 /**
  * @param array  $category
  * @param string $categoryId
  */
 protected function updateCategoryInAdminStoreView($category, $categoryId)
 {
     $category[0] = $categoryId;
     $this->client->addCall([static::SOAP_ACTION_CATEGORY_UPDATE, $category]);
     $category[2] = static::ADMIN_STOREVIEW;
     $this->client->addCall([static::SOAP_ACTION_CATEGORY_UPDATE, $category]);
 }