Skip to content

Commit 0691cf1

Browse files
authored
Fix GSM 03.38 charset (#5)
Fix to avoid removing valid characters Add more tests Fix travis
1 parent f10c5be commit 0691cf1

File tree

5 files changed

+272
-214
lines changed

5 files changed

+272
-214
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ php:
66
- hhvm
77

88
before_script:
9-
- composer install --dev
9+
- composer install
1010

11-
script: phpunit
11+
script: vendor/bin/phpunit

README.md

+17-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Character counter for SMS Messages
55
[![Build Status](https://img.shields.io/travis/instasent/sms-counter-php.svg?style=flat-square)](https://travis-ci.org/instasent/sms-counter-php)
66
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/0a2fa87a-0287-46f6-b8b5-818b44a2b9f9.svg?style=flat-square)](https://insight.sensiolabs.com/projects/0a2fa87a-0287-46f6-b8b5-818b44a2b9f9)
77

8-
##Usage
8+
## Usage
99

1010
```php
1111
use Instasent\SMSCounter\SMSCounter;
1212

13-
$smsCounter = new SMSCounter;
13+
$smsCounter = new SMSCounter();
1414
$smsCounter->count('some-string-to-be-counted');
1515
```
1616

@@ -26,23 +26,32 @@ stdClass Object
2626
)
2727
```
2828

29-
##Installation
29+
You can sanitize your text to be a valid GSM 03.38 charset
30+
31+
```php
32+
use Instasent\SMSCounter\SMSCounter;
33+
34+
$smsCounter = new SMSCounter();
35+
$smsCounter->sanitizeToGSM('dadáó'); //return dadao
36+
```
37+
38+
## Installation
3039

3140
`sms-counter-php` is available via [composer](http://getcomposer.org) on [packagist](https://packagist.org/packages/instasent/sms-counter-php).
3241

3342
```json
3443
{
35-
"require": {
36-
"instasent/sms-counter-php": "dev-master"
37-
}
44+
"require": {
45+
"instasent/sms-counter-php": "^0.3"
46+
}
3847
}
3948
```
4049

41-
##License
50+
## License
4251

4352
SMS Counter (PHP) is released under the [MIT License](LICENSE-MIT.md)
4453

45-
###Mentions
54+
### Mentions
4655

4756
* Original idea : [danxexe/sms-counter](https://github.com/danxexe/sms-counter)
4857
* Fork Idea from: [acpmasquerade/sms-counter-php](https://github.com/acpmasquerade/sms-counter-php)

0 commit comments

Comments
 (0)