You are here

private function ShopwareInstaller::correctPluginName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php \Composer\Installers\ShopwareInstaller::correctPluginName()

Changes the name to a camelcased combination of vendor and name

Parameters

array $vars:

Return value

array

1 call to ShopwareInstaller::correctPluginName()
ShopwareInstaller::inflectPackageVars in vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
Transforms the names

File

vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php, line 36

Class

ShopwareInstaller
Plugin/theme installer for shopware @author Benjamin Boit

Namespace

Composer\Installers

Code

private function correctPluginName($vars) {
  $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
    return strtoupper($matches[0][1]);
  }, $vars['name']);
  $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
  return $vars;
}