"Stop-Using-Else Official SocialNerds Challenge", SUEOSNC in short, is the new hot thing in programming.
You are all invited to take this hot mess of a code, of an actual production method (not any more of course), and remove the "else" word completely. Provided that it still works.
- Clone/Fork the project
- Rewrite getAccess() method from the Initial.php file to the Corrected.php file, without "else"
- Make a pull request
We will publish on 03/04 a video with our take on it.
In true democratic spirit, If someone else makes a pull request with better code than ours, we will make theirs the actual corrected method.
Something that is obvious in getAccess() method after a while, is that it does two things. It retrieves access and it caches it. Maybe, it would be better if the method was broken in two methods. Just sayin'
- This method is taken exactly as it was
- We know that anyone, who has not actually worked on the project, has very little context of what is going on. So, we will not act like b1tch#s if a pull request is not exactly as it should be
- We should provide a unit test. We know... Next time, we will!