Source of file HuradInstaller.php
Size: 0,760 Bytes - Last Modified: 2021-12-24T06:19:18+00:00
/var/www/docs.ssmods.com/process/src/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
12345678910111213141516171819202122232425262728 | <?php namespace Composer\Installers; class HuradInstaller extends BaseInstaller { /** @var array<string, string> */ protected $locations = array( 'plugin' => 'plugins/{$name}/', 'theme' => 'plugins/{$name}/', ); /** * Format package name to CamelCase */ public function inflectPackageVars(array $vars): array { $nameParts = explode('/', $vars['name']); foreach ($nameParts as &$value) { $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value)); $value = str_replace(array('-', '_'), ' ', $value); $value = str_replace(' ', '', ucwords($value)); } $vars['name'] = implode('/', $nameParts); return $vars; } } |