Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: improves PHP generation.#7513

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jcchavezs wants to merge5 commits intozaproxy:main
base:main
Choose a base branch
Loading
fromjcchavezs:improves_php_generator

Conversation

@jcchavezs
Copy link

While we can't improve arguments because lack of typing, this is a best effort to improve the code.

Ping@psiinon

}
// Always add the API key - we've no way of knowing if it will be required or not
out.write("$" +API.API_KEY_PARAM +"='') {\n");
out.write("string$" +API.API_KEY_PARAM +" ='') {\n");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

apikey is always a string.

While we can't improve arguments because lack of typing, this is a best effort to improve the code.Signed-off-by: José Carlos Chávez <jcchavezs@gmail.com>
@psiinon
Copy link
Member

The build failed:Run './gradlew :zap:spotlessApply' to fix these violations. 😁

Signed-off-by: José Carlos Chávez <jcchavezs@gmail.com>
Signed-off-by: José Carlos Chávez <jcchavezs@gmail.com>
Copy link
Member

@psiinonpsiinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM but I'm no PHP developer 😉

Signed-off-by: José Carlos Chávez <jcchavezs@gmail.com>
@psiinon
Copy link
Member

Run './gradlew :zap:spotlessApply' to fix these violations. 😁

Signed-off-by: José Carlos Chávez <jcchavezs@gmail.com>
@jcchavezs
Copy link
Author

Fixed@psiinon

@jcchavezs
Copy link
Author

Ping@thc202

for (ApiParameterparameter :optionalParameters) {
Stringname =parameter.getName();
StringvarName =name.toLowerCase(Locale.ROOT);
out.write("\t\tif ($" +varName +" !== NULL) {\n");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Switched tabs into spaces as that is what is being used by standards. In any case, all the code is reformatted by proper PHP linters in the PHP API client.

importjava.util.ResourceBundle;
importjava.util.stream.Collectors;

/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

**

Comment on lines +92 to +103
/**
* Generates the API client files of the given API implementors.
*
* @param implementors the implementors
* @throws IOException if an error occurred while generating the APIs.
* @deprecated (2.6.0) Use {@link #generateAPIFiles(List)} instead.
*/
@Deprecated
publicvoidgeneratePhpFiles(List<ApiImplementor>implementors)throwsIOException {
this.generateAPIFiles(implementors);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This should not be needed.

@thc202
Copy link
Member

Commits should be squashed.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@thc202thc202thc202 left review comments

@psiinonpsiinonpsiinon approved these changes

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@jcchavezs@psiinon@thc202

[8]ページ先頭

©2009-2025 Movatter.jp