Skip to content

Enhancement: Enable no_alias_function and trailing_comma_in_multiline_array fixer #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ $config
'array_syntax' => array('syntax' => 'long'),
'binary_operator_spaces' => false,
'concat_space' => array('spacing' => 'one'),
'no_alias_functions' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
Expand All @@ -28,6 +29,7 @@ $config
'phpdoc_types_order' => array('null_adjustment' => 'none', 'sort_algorithm' => 'none'),
))
->setFinder($finder)
->setRiskyAllowed(true)
;

return $config;
4 changes: 2 additions & 2 deletions src/JsonSchema/Constraints/TypeConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ protected function implodeWith(array $elements, $delimiter = ', ', $listEnd = fa
return implode($delimiter, $elements);
}
$lastElement = array_slice($elements, -1);
$firsElements = join($delimiter, array_slice($elements, 0, -1));
$firsElements = implode($delimiter, array_slice($elements, 0, -1));
$implodedElements = array_merge(array($firsElements), $lastElement);

return join(" $listEnd ", $implodedElements);
return implode(" $listEnd ", $implodedElements);
}

/**
Expand Down