| 1 |
<?php |
| 2 |
|
| 3 |
namespace Composer\Installers; |
| 4 |
|
| 5 |
class PlentymarketsInstaller extends BaseInstaller |
| 6 |
{ |
| 7 |
/** @var array<string, string> */ |
| 8 |
protected $locations = array( |
| 9 |
'plugin' => '{$name}/' |
| 10 |
); |
| 11 |
|
| 12 |
/** |
| 13 |
* Remove hyphen, "plugin" and format to camelcase |
| 14 |
*/ |
| 15 |
public function inflectPackageVars(array $vars): array |
| 16 |
{ |
| 17 |
$nameBits = explode("-", $vars['name']); |
| 18 |
foreach ($nameBits as $key => $name) { |
| 19 |
$nameBits[$key] = ucfirst($name); |
| 20 |
if (strcasecmp($name, "Plugin") == 0) { |
| 21 |
unset($nameBits[$key]); |
| 22 |
} |
| 23 |
} |
| 24 |
$vars['name'] = implode('', $nameBits); |
| 25 |
|
| 26 |
return $vars; |
| 27 |
} |
| 28 |
} |
| 29 |
|