OpenTok-PHP-SDK
OpenTok-PHP-SDK copied to clipboard
Adopt the use of type declarations
http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration
One advantage I can think of is that the code would be more self-documenting. Much of the value of this SDK above using the REST API directly is a better developer experience which catches programmer errors during development, and to that end throwing early because the type of a variable was wrong should be a better experience.
One downside is that according to the table in the above link there's very limited places where type declarations can be used before PHP 7.0.