Joined October 2012
·
Posted to
Add git name branch to prompt on MacOS
over 1 year
ago
Nice.
And if you want some more informations, you can add:
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
With that, after the branch name, you will have:
- a * if you have local unstaged changes
- a + if you have staged changes
- a $ if your stash stack is not empty
Posted to
A way to write a method in a class
over 1 year
ago
Thanks guys for the contributions and feedbacks ;-)
For the (class|method) comments, I don't always use them (not enough?). I think, as @datishans said, if the signature is clear enough, the comments are not necessary.
I've seen guidelines (used along with phpcs and some hooks) where the comments are mandatory, and in the end that creates a lot of noise in the code, which could be prevented (especially on setters/getters for example...)
Achievements
229 Karma
36,103 Total ProTip Views
Python 3
Have at least three original repos where Python is the dominant language
Altruist
Increase developer well-being by sharing at least 20 open source projects
Epidexipteryx
Have at least one original repo where C++ is the dominant language
Forked
Have a project valued enough to be forked by someone else
T-Rex 3
Have at least three original repos where C is the dominant language
Charity
Fork and commit to someone's open source project in need
Komodo Dragon 3
Have at least three original repos where Java is the dominant language
Komodo Dragon
Have at least one original repo where Java is the dominant language
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
T-Rex
Have at least one original repo where C is the dominant language
Raven
Have at least one original repo where some form of shell script is the dominant language
Hi, Thanks!
However this is php specific. I used php just as an example.
For example in javascript:
or to use to parse an API response for example.