// Format oop params
function formatOOP(entity, action, params, indent) {
var info = getEntity(entity),
+ arrayParams = ['groupBy', 'records'],
newLine = "\n" + _.repeat(' ', indent),
code = '\\' + info.class + '::' + action + '(',
perm = params.checkPermissions === false ? 'FALSE' : '';
val = phpFormat(index) + ', ' + phpFormat(item, 2 + indent);
code += newLine + "->add" + ucfirst(key).replace(/s$/, '') + '(' + val + ')';
});
+ } else if (_.includes(arrayParams, key)) {
+ _.each(param, function(item) {
+ code += newLine + "->add" + ucfirst(key).replace(/s$/, '') + '(' + phpFormat(item, 2 + indent) + ')';
+ });
} else if (key === 'where') {
_.each(param, function (clause) {
if (clause[0] === 'AND' || clause[0] === 'OR' || clause[0] === 'NOT') {