OpenTok-PHP-SDK icon indicating copy to clipboard operation
OpenTok-PHP-SDK copied to clipboard

Adopt the use of type declarations

Open aoberoi opened this issue 9 years ago • 0 comments

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.

aoberoi avatar Aug 16 '16 21:08 aoberoi