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

Another batch of PHP-CS-Fixer rule updates #872

Merged
merged 10 commits into from
Feb 12, 2020
Merged

Conversation

ob-stripe
Copy link
Contributor

r? @remi-stripe @richardm-stripe

Enable more rules from the @PhpCsFixer ruleset.

I will open an internal PR so that the codegen output is consistent with the updates.

I will do a last pass over the remaining disabled rules, but I think most of them will have to stay disabled because they would break our code / require significant refactoring.

Copy link
Contributor

@remi-stripe remi-stripe left a comment

Choose a reason for hiding this comment

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

Not convinced that some changes are better but not feeling this enough to block

@@ -1,6 +1,6 @@
<?php

require('../init.php');
require '../init.php';
Copy link
Contributor

Choose a reason for hiding this comment

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

whyyyyyyyyyyyyyyyy is this deemed better.

@@ -150,8 +150,8 @@ private function serializeAdditionalOwners($legalEntity, $additionalOwners)
}

/**
* @param null|array|string $id The ID of the account to retrieve, or an
* options array containing an `id` key.
* @param null|array|string $id the ID of the account to retrieve, or an
Copy link
Contributor

Choose a reason for hiding this comment

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

Surprised they don't like the leading upper case letter here, especially as the rule is about not ending with a dot
Nitpicky but not sure it looks nicer in IDEs to be honest

@@ -3,7 +3,7 @@
namespace Stripe;

/**
* Class Account
* Class Account.
Copy link
Contributor

Choose a reason for hiding this comment

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

and here they want a dot. whyyyyyyyyy

@ob-stripe
Copy link
Contributor Author

Thanks Remi.

whyyyyyyyyyyyyyyyy is this deemed better.

Probably because include/require are statements (i.e. reserved keywords), not functions.

Surprised they don't like the leading upper case letter here, especially as the rule is about not ending with a dot
Nitpicky but not sure it looks nicer in IDEs to be honest

and here they want a dot. whyyyyyyyyy

I think the convention of "summaries are capitalized and have a final dot, parameter and return value descriptions are not capitalized and don't have a final dot" is the same as Javadoc.

@ob-stripe ob-stripe merged commit b2aac10 into master Feb 12, 2020
@ob-stripe ob-stripe deleted the ob-codegen-phpcsfixer branch February 12, 2020 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants