}
/**
- * @var array (string $table => array $indices)
+ * Indices.
+ *
+ * (string $table => array $indices)
*
* ex: $indices['civicrm_contact'][0] = array('first_name', 'last_name');
+ *
+ * @var array
*/
protected $indices;
/**
* Class constructor.
*
- * @param $isActive
- * @param $indices
+ * @param bool $isActive
+ * @param array $indices
*/
public function __construct($isActive, $indices) {
$this->isActive = $isActive;
* (string $indexName => string $sql)
*/
public function buildIndexSql($table) {
- $sqls = []; // array (string $idxName => string $sql)
+ // array (string $idxName => string $sql)
+ $sqls = [];
if ($this->isActive && isset($this->indices[$table])) {
foreach ($this->indices[$table] as $fields) {
$name = self::IDX_PREFIX . md5($table . '::' . implode(',', $fields));