A little refactoring and ran php-cs-fixer on both files
Merge branch 'master' of github.com:JoshuaEstes/php-client

* 'master' of github.com:JoshuaEstes/php-client:
  Inline docs & improved validity checking
  Updated keygen code, validity checking, and