Chapters
27 Chapters
|
16:38:22
|
This course is archived!
Login to bookmark this video
-
This Video
Login or register to download the video!
Login or register to download the video!
-
Subtitles
Login or register to download the subtitles!
Login or register to download the subtitles!
-
Course Script
Login or register to download the script!
Login or register to download the script!
10.
How Static PHP Analyzer Changed the way I Look at Code
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
5 Comments
I like multiple return points. No need to store in variable. Less variables - more simple for me it looks.
Hey Coder,
Agree, code looks simpler and clearer with fast returns, I like them too. And IIRC it's even a PSR standard... or I might be wrong, but it's definitely a good practice I think :)
Cheers!
she makes me sleepy. This might be good when you have insomnia at night :)
About not needign comment code because its in version control. No - its not as easy, its easier to uncomment than to search in git what I have removed.
Hey Coder,
Thank you for sharing your point of view! Well, it might depend. But when you use good tools like Git and host your code on GitHub, and use feature-branch development - most of the time it's very easy to find the code that you removed. But agree, in some cases when you just need to temporarily comment out a few things to try how it works and most probably you might want to revert it after the try - it's easier to use comments :) But when we're talking about a feature that you might want to return in a few years, or maybe even never - it may have sense to remove it at all and in case you would need it in the future - get it back from the Git. So, mostly it depends.
Cheers!
"Houston: no signs of life"
Start the conversation!