paquettg / leaguewrap

League of Legend API wrapper
MIT License
67 stars 28 forks source link

Add Null to StaticData's Get methods for the ID's. #90

Open ghost opened 9 years ago

ghost commented 9 years ago

This prevents resulting to an error page by default and automatically load all runes/masteries/champion as naturally intended. If left without null by default, PHP will throw the error of a missing argument for each of these methods. The same may go for the champions. Of course the argument can still go through an override during the API calls. This takes less stress on others who hate seeing errors first hand. I know there's the plural method, which probably nullifies my idea to nullify the method's first argument in the first place. But this is only a proposal in terms of reducing initial errors.

On that note, I'll continue to work on the documentation after I've gotten most of my site done. The site uses just almost every part of LeagueWrap, so I'll come across any issue and report back on it.

Jesus I did a lot of renaming.

dnlbauer commented 9 years ago

Can you please add some unit tests for that? Looks good but I dont want to merge changes to the api whithout testing.