Yaffs site version 1.1
[yaffs-website] / vendor / composer / installers / src / Composer / Installers / MauticInstaller.php
1 <?php
2 namespace Composer\Installers;
3
4 class MauticInstaller extends BaseInstaller
5 {
6     protected $locations = array(
7         'plugin' => 'plugins/{$name}/',
8         'theme' => 'themes/{$name}/',
9     );
10
11     /**
12      * Format package name of mautic-plugins to CamelCase
13      */
14     public function inflectPackageVars($vars)
15     {
16         if ($vars['type'] == 'mautic-plugin') {
17             $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
18                 return strtoupper($matches[0][1]);
19             }, ucfirst($vars['name']));
20         }
21
22         return $vars;
23     }
24
25 }