Skip to content

Commit

Permalink
Replaced deprecated php-cs-fixer rules
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Nov 11, 2024
1 parent c25490b commit d06b96f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
'assign_null_coalescing_to_coalesce_equal' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_lines_before_namespace' => ['min_line_breaks' => 2, 'max_line_breaks' => 2],
'braces_position' => true,
'cast_spaces' => true,
'class_reference_name_casing' => true,
'combine_nested_dirname' => true,
'concat_space' => ['spacing' => 'one'],
'constant_case' => true,
'curly_braces_position' => true,
'dir_constant' => true,
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'function_declaration' => true,
'function_to_constant' => true,
'function_typehint_space' => true,
'get_class_to_class_keyword' => true,
'heredoc_to_nowdoc' => true,
'integer_literal_case' => true,
Expand All @@ -46,7 +46,6 @@
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_singleline' => true,
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace' => true,
Expand Down Expand Up @@ -84,7 +83,6 @@
'short_scalar_cast' => true,
'simple_to_complex_string_variable' => true,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
Expand All @@ -93,11 +91,14 @@
'single_space_around_construct' => true,
'single_trait_insert_per_statement' => true,
'space_after_semicolon' => true,
'spaces_inside_parentheses' => ['space' => 'none'],
'standardize_not_equals' => true,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'match']],
'trim_array_spaces' => true,
'type_declaration_spaces' => true,
'types_spaces' => true,
'visibility_required' => true,
'void_return' => true,
'whitespace_after_comma_in_array' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/mako/application/cli/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected function registerAndhandleGlobalArguments(): void
try {
$arguments = $arguments->parse(true);
}
catch (ArgumentException | UnexpectedValueException $e) {
catch (ArgumentException|UnexpectedValueException $e) {
$this->reactor->getOutput()->errorLn("<red>{$e->getMessage()}</red>");

exit(CommandInterface::STATUS_ERROR);
Expand Down
2 changes: 1 addition & 1 deletion src/mako/reactor/Reactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public function run(): int

return $this->registerCommandArgumentsAndDispatch($command);
}
catch (ArgumentException | UnexpectedValueException $e) {
catch (ArgumentException|UnexpectedValueException $e) {
$this->output->errorLn("<red>{$e->getMessage()}</red>");

return CommandInterface::STATUS_ERROR;
Expand Down
2 changes: 1 addition & 1 deletion src/mako/syringe/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ protected function resolveParameter(ReflectionParameter $parameter, ?ReflectionC
try {
return $this->get($parameterClassName);
}
catch (UnableToInstantiateException | UnableToResolveParameterException $e) {
catch (UnableToInstantiateException|UnableToResolveParameterException $e) {
if ($parameter->allowsNull()) {
return null;
}
Expand Down

0 comments on commit d06b96f

Please sign in to comment.