Add a lot of documentation, documentation script, update class docblocks#9
Add a lot of documentation, documentation script, update class docblocks#9delatbabel wants to merge 8 commits intoxi-project:masterfrom
Conversation
|
I added a gateway interface for bulksms.com plus test case, and updated some documentation. For some strange reason I can't get the unit tests to run on my local development environment, it's PHP 5.5.9 with phpUnit 3.7.28 and gives me an error as follows: PHP Fatal error: Class 'Buzz\Client\AbstractStream' not found in /home/del/develop/github/xi-sms/vendor/kriswallsmith/buzz/test/Buzz/Test/Client/AbstractStreamTest.php on line 11 Clearly some dependency issue that phpUnit is not picking up from the vendor/ tree when it should be. Let me know if you have any success with the unit tests. |
|
Thanks! Will go thru and comment further! |
|
I just added a few more small documentation changes. |
There was a problem hiding this comment.
Project uses 4 space indentation.
|
I converted to 4 space indents. |
There was a problem hiding this comment.
Would the following work?
return http_build_query($post_fields);
There was a problem hiding this comment.
No, not quite, because of the way that http_build_query encodes spaces.
|
Sorry for the delay. The documentation stuff is looks good, could move that into a separate PR? The gateway implementation has some further CS issues, try and make it match PSR rules. (camelCase, tabs->4spaces, etc.) |
There was a problem hiding this comment.
Would the following work?
$from = array_keys($special_chrs);
$to = array_values($special_chrs);
$ret_msg = str_replace($from, $to, $body);
There was a problem hiding this comment.
It would for 7 bit messages but not for 16 bit messages because it would not be unicode safe.
|
It's not really feasible for me to roll back a month old PR to start again and re-work it into two separate PRs. I can work on fixing the gateway code later but it was based on the implementation supplied to me from Bulk SMS. To be honest I thought this project had been abandoned so I started working on something else. |
|
Unit tests are working fine now except for a long standing error with the MessageBirdGatewayTest. This uses constants that aren't declared, and should be using a mock but is not. I will PR that later. |
I updated class docblocks for all of the gateways including links to web sites where available. I also added a simple script to create the API documentation, might be useful to some people while developing. No functionality changes.