Last active
September 30, 2015 20:13
-
-
Save unicodeveloper/d7df0b986402a7410dbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Improper naming of functions | |
function names should start with a small letter | |
FetchGitData.php | |
Don’t commit private credentials. Load them from environment variables. | |
In function fetchData | |
Abstract line 28 to 34 into a function and just call it in function fetchData | |
It is cleaner that way | |
Don’t set the user agent to Mozilla, It should be something neutral. I mean, personally i don’t use Mozilla | |
getNoOfRepos function | |
$raw variable doesn’t really say much about that variable.. Rename it to something much more appropriate | |
line 55 could have just been return $raw[‘public_repos’]; instead of declaring an extra variable | |
ProcessGitData.php | |
From line 21 to 27 | |
The conditions for the repos are not well checked. | |
There should be a range | |
Something like $noOfRepos >=5 && $noOfRepos <= 10 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment