Vonage / vonage-php-code-snippets

PHP code examples for using Vonage APIs
MIT License
29 stars 56 forks source link

Updated code snippets to v2.2.0 #49

Closed dragonmantank closed 4 years ago

dragonmantank commented 4 years ago

This is a prep branch for holding code that complies with v2.2.0. All standalone scripts should be updated with this PR, though a handful of "full framework" examples can be updated when v2.2.0 is properly released.

dragonmantank commented 4 years ago

I wonder also, if it's worth, for consistency, discussing whether to go either have use statements or not?

For snippets that show up on NDP, we've not used use statements and instead preferred the full class name for clarity. This makes it easier to copy/paste the code. The user could always clean that up after-the-fact. It leads to uglier, but more quickly-usable code.

Historically there wasn't a way to easily show things like use or import (for other languages). Now that we can specify use statements in NDP, we should start to look at using them and see if that impacts usage.