Skip to content
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

Implement named parameters on all commands #2029

Closed
3 tasks done
vitormattos opened this issue Dec 28, 2023 · 2 comments · Fixed by #2032
Closed
3 tasks done

Implement named parameters on all commands #2029

vitormattos opened this issue Dec 28, 2023 · 2 comments · Fixed by #2032
Assignees
Labels
backend Backend task good first issue Good for newcomers

Comments

@vitormattos
Copy link
Member

vitormattos commented Dec 28, 2023

We have the call to addOption of Symfony Console. Is common to send many arguments to this method and in general the arguments is like null, 'a' or other very small values that don't transmit the real meaning.

         Can we use named parameters here ?

Originally posted by @giovannism20 in #2027 (comment)

To-do

  • Identify all places at commands implemented at LibreSign
  • Replace all implementations of addOption by a named parameters as the follow example:
      $this
      	->addOption(
      		name: 'preview',
      		shortcut: 'p',
      		mode: InputOption::VALUE_NONE,
      		description: 'Check requirements to generate image preview'
      	);
    );
  • Test the commands if is working as expected
@vitormattos vitormattos added backend Backend task good first issue Good for newcomers labels Dec 28, 2023
@vitormattos vitormattos added this to the Backlog milestone Dec 28, 2023
@giovannism20
Copy link
Member

I've found 60 files with 181 occurrences. Is that correct @vitormattos ?

@vitormattos
Copy link
Member Author

Not, you made a search inside root folder of server. You need to do a search inside the LibreSign folder. All files stay inside the folder libresign/lib/Command. I found 36 occurrences in 6 files.

@giovannism20 giovannism20 self-assigned this Dec 28, 2023
@giovannism20 giovannism20 linked a pull request Dec 28, 2023 that will close this issue
@vitormattos vitormattos removed this from the Backlog milestone May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend task good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants