Skip to content

Comments

Add annotations#118

Merged
BackEndTea merged 12 commits intomasterfrom
enhancement/annotations
Aug 24, 2019
Merged

Add annotations#118
BackEndTea merged 12 commits intomasterfrom
enhancement/annotations

Conversation

@BackEndTea
Copy link
Collaborator

@BackEndTea BackEndTea commented Aug 7, 2019

This PR

  • Adds annotations to the methods, as well as some extra explanations
  • Adds psalm annotations to help those using the tool
  • Tests those annotations in CI

Fixes #43

Supersedes #83 & #102

This includes #102, but has removed (or activated) disabled/ not working assert annotations.

The asserts for the count and cytpe based assertions have also been removed. For count due to the fact that we don't actually assert that the input is countable, and for ctype due to the fact that it can accept integers as valid input.

@BackEndTea BackEndTea requested a review from Nyholm August 7, 2019 20:34
@BackEndTea BackEndTea force-pushed the enhancement/annotations branch from c56989d to 2c8dcb9 Compare August 7, 2019 20:35
@BackEndTea
Copy link
Collaborator Author

@Nyholm I'd like your review on this.

@Ocramius I hope you don't mind me creating a new PR, but i'd like to have this included soon, so we can tag a new release with the annotations.

@Ocramius
Copy link
Contributor

Ocramius commented Aug 8, 2019

I don't mind, but if it's work based on the other patch, it should have my commits in it

Ocramius and others added 10 commits August 9, 2019 14:01
This helps IDEs etc with telling users this method is deprecated
* Add "unicodeLetters" assertion for Unicode letters
This means PHP won't search the current namespace for a function first
It also means PHP can use the Opcache (opcode?) for some functions,
which is the actual speed increase.

If possible i'd use the `use function` syntax, but that became
available in php 5.6, and thus isn't an option atm.
@BackEndTea BackEndTea force-pushed the enhancement/annotations branch from 2c8dcb9 to 6146a27 Compare August 9, 2019 12:06
BackEndTea added 2 commits August 9, 2019 14:07
@BackEndTea BackEndTea merged commit caf232b into master Aug 24, 2019
@BackEndTea BackEndTea deleted the enhancement/annotations branch August 24, 2019 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add doc. comments to methods?

3 participants