Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Join array elements with a string
<?php implode(string $separator, array $array): string
<?php $this->values
);
return "ENUM(" . implode(", ", $values) . ")";
}
public function convertToPHPValue($value, AbstractPlatform $platform)
<?php if ($statement->paginate()) {
if (!Str::contains($body, '::all();')) {
$queryStatement = new QueryStatement('all', [$statement->reference()]);
$body = implode(PHP_EOL, [
self::INDENT . $queryStatement->output($statement->reference()),
PHP_EOL . $body
]);
$this->addImport($controller, $this->determineModel($controller, $queryStatement->model()));
}
<?php $definition = str_replace(
"/** {$column->dataType()}_attributes **/",
implode(', ', [$scale, 0, (str_repeat(9, $precision - $scale) . '.' . str_repeat(9, $scale))]),
$definition
);
} elseif (in_array($column->dataType(), ['json', 'jsonb'])) {
<?php if (in_array($column->dataType(), ['set', 'enum'])) {
$column_definition .= json_encode($column->attributes());
} else {
$column_definition .= implode(', ', $column->attributes());
}
}
<?php $index_definition = self::INDENT;
$index_definition .= '$table->' . $index->type();
if (count($index->columns()) > 1) {
$index_definition .= "(['" . implode("', '", $index->columns()) . "']);" . PHP_EOL;
} else {
$index_definition .= "('{$index->columns()[0]}');" . PHP_EOL;
}
<?php );
sort($segments);
return strtolower(implode('_', $segments));
}
protected function getPolyTableName(string $parentTable)
<?php if (count($missing_methods)) {
if (count($missing_methods) < 4) {
$routes .= sprintf("->except('%s')", implode("', '", $missing_methods));
} else {
$routes .= sprintf("->only('%s')", implode("', '", $resource_methods));
}
<?php if (count($missing_methods) < 4) {
$routes .= sprintf("->except('%s')", implode("', '", $missing_methods));
} else {
$routes .= sprintf("->only('%s')", implode("', '", $resource_methods));
}
}
<?php $data
);
return implode(', ', $parameters);
}
}
<?php $validationRules = $this->validationRules($qualifier, $column);
foreach ($validationRules as $name => $rule) {
$formattedRule = implode("', '", $rule);
$output .= self::INDENT . "'{$name}' => ['{$formattedRule}']," . PHP_EOL;
}
<?php $data[] = self::INDENT . '\'data\' => $this->collection,';
$data[] = ' ];';
return implode(PHP_EOL, $data);
}
$data[] = 'return [';
<?php $data[] = ' ];';
return implode(PHP_EOL, $data);
}
private function visibleColumns(Model $model)
<?php }
if ($variables) {
$assertion .= ' use (' . implode(', ', array_unique($variables)) . ')';
}
$assertion .= ' {' . PHP_EOL;
<?php $assertion .= ' {' . PHP_EOL;
$assertion .= str_pad(' ', 12);
$assertion .= 'return ' . implode(' && ', $conditions) . ';';
$assertion .= PHP_EOL . str_pad(' ', 8) . '}';
}
<?php }
if ($variables) {
$assertion .= ' use (' . implode(', ', array_unique($variables)) . ')';
}
$assertion .= ' {' . PHP_EOL;