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

fix consistency in parameter names + some cleanup #76

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

azjezz
Copy link
Owner

@azjezz azjezz commented Oct 4, 2020

No description provided.

@azjezz azjezz added Priority: Medium This issue may be useful, and needs some attention. Status: Review Needed The issue has a PR attached to it which needs to be reviewed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Oct 4, 2020
@azjezz azjezz added this to the v1.0.0 milestone Oct 4, 2020
@azjezz azjezz requested a review from veewee October 4, 2020 18:12
@azjezz azjezz self-assigned this Oct 4, 2020
@azjezz azjezz force-pushed the fix/consistent-params branch 3 times, most recently from fee7cf0 to 95b6e48 Compare October 4, 2020 18:19
@azjezz azjezz changed the title consistent parameter names fix consistency in parameter names + some cleanup Oct 4, 2020
Copy link
Collaborator

@veewee veewee left a comment

Choose a reason for hiding this comment

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

Looks OK!
How are we going to keep this consistent without having to create a cleanup PR every once in a while?

src/Psl/Str/Byte/lowercase.php Show resolved Hide resolved
src/Psl/Str/Byte/lowercase.php Show resolved Hide resolved
src/Psl/Str/Byte/replace_ci.php Show resolved Hide resolved
@azjezz
Copy link
Owner Author

azjezz commented Oct 6, 2020

not sure how we can enforce this later in CI.

there's a lot of rules we have that are currently not enforced by CI:

  • a file can only contain 1 function declaration
  • Psl\Foo\Bar\Baz\qux function must be declared in src/Psl/Foo/Bar/Baz/qux.php
  • function name must be in snake_case
  • argument name must be in snake_case
  • constant Psl\Foo\Bar\BAZ_QUX must be declared in src/Psl/Foo/Bar/constants.php
  • all classes should be declared either final or abstract ( unless its an exception )
  • interface names should end with Interface suffix
  • abstract classes should have the Abstract prefix
  • traits should end with Trait suffix
  • closure should always be declared static, even within functions, when $this is not used.
    .... and more

@veewee
Copy link
Collaborator

veewee commented Oct 7, 2020

Added the list to #30
I think there are at least some of them that we can tackle with cs

veewee
veewee previously approved these changes Oct 7, 2020
@azjezz azjezz added Status: Completed Nothing further to be done with this issue. Awaiting to be closed by the requestor out of politeness and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed. labels Oct 7, 2020
@azjezz azjezz force-pushed the fix/consistent-params branch from 95b6e48 to 21fd635 Compare October 7, 2020 07:54
@azjezz azjezz merged commit f60c106 into develop Oct 7, 2020
@azjezz azjezz deleted the fix/consistent-params branch October 9, 2020 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: Completed Nothing further to be done with this issue. Awaiting to be closed by the requestor out of politeness Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants