Skip to content

Commit

Permalink
chore(config): Update PHP CS Fixer configuration and improve code rea…
Browse files Browse the repository at this point in the history
…dability

- Add class_definition settings to PHP CS Fixer configuration.
- Enhance readability by formatting constructor parameters in composer-updater.
- Provide better structure for future configuration adjustments.
  • Loading branch information
guanguans committed Aug 16, 2024
1 parent ebdc8b6 commit 4bbecab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@
],
],
// 'statement_indentation' => true,
'class_definition' => [
// 'multi_line_extends_each_single_line' => false,
// 'single_item_single_line' => false,
// 'single_line' => false,
// 'space_before_parenthesis' => false,
],

// https://github.com/kubawerlos/php-cs-fixer-custom-fixers
PhpCsFixerCustomFixers\Fixer\CommentSurroundedBySpacesFixer::name() => true,
Expand Down
11 changes: 10 additions & 1 deletion composer-updater
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ $status = (new SingleCommandApplication())
assert($this instanceof SingleCommandApplication);
assert((bool) $input->getOption('highest-php-binary'));

(new class($input->getOption('composer-json-path') ?: __DIR__.'/composer.json', $input->getOption('highest-php-binary'), $input->getOption('composer-binary'), $input->getOption('except-packages'), $input->getOption('except-dependency-versions'), $input->getOption('dry-run'), new SymfonyStyle($input, $output), new Differ()) {
(new class(
$input->getOption('composer-json-path') ?: __DIR__.'/composer.json',
$input->getOption('highest-php-binary'),
$input->getOption('composer-binary'),
$input->getOption('except-packages'),
$input->getOption('except-dependency-versions'),
$input->getOption('dry-run'),
new SymfonyStyle($input, $output),
new Differ()
) {
private $composerJsonPath;
private $composerJsonContents;
private $highestComposerBinary;
Expand Down

0 comments on commit 4bbecab

Please sign in to comment.