diff --git a/.php_cs.dist b/.php_cs.dist index 5a7a578e..aca14f10 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -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, @@ -28,6 +29,7 @@ $config 'phpdoc_types_order' => array('null_adjustment' => 'none', 'sort_algorithm' => 'none'), )) ->setFinder($finder) + ->setRiskyAllowed(true) ; return $config; diff --git a/src/JsonSchema/Constraints/TypeConstraint.php b/src/JsonSchema/Constraints/TypeConstraint.php index ff4eba71..b4eb8090 100644 --- a/src/JsonSchema/Constraints/TypeConstraint.php +++ b/src/JsonSchema/Constraints/TypeConstraint.php @@ -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); } /**