Skip to content

Commit 5a55f3b

Browse files
author
Norbert Orzechowicz
committedDec 13, 2015
Merge pull request #5 from norzechowicz/php7-support
Added support for php7
2 parents fb3f879 + 682877f commit 5a55f3b

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed
 

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ matrix:
1414
- php: 5.4
1515
- php: 5.5
1616
- php: 5.6
17-
- php: hhvm
17+
- php: 7.0
1818
allow_failures:
1919
- env: DEPENDENCIES='low'
2020

‎README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Add to your composer.json
1010

1111
```
1212
require: {
13-
"coduo/php-to-string": "1.0.*"
13+
"coduo/php-to-string": "2.0.*"
1414
}
1515
```
1616

@@ -27,19 +27,19 @@ Supported types:
2727
* resource
2828

2929
```php
30-
use Coduo\ToString\String;
30+
use Coduo\ToString\StringConverter;
3131

32-
$double = new String(1.12312);
32+
$double = new StringConverter(1.12312);
3333
echo $double; // "1.12312"
3434

35-
$datetime = new String(new \DateTime());
35+
$datetime = new StringConverter(new \DateTime());
3636
echo $datetime; // "\DateTime"
3737

38-
$array = new String(array('foo', 'bar', 'baz'));
38+
$array = new StringConverter(array('foo', 'bar', 'baz'));
3939
echo $array; // "Array(3)"
4040

4141
$res = fopen(sys_get_temp_dir() . "/foo", "w");
42-
$resource = new String($res);
42+
$resource = new StringConverter($res);
4343
echo $resource; // "Resource(stream)"
4444

4545
```

‎composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"extra": {
3131
"branch-alias": {
32-
"dev-master": "1.1-dev"
32+
"dev-master": "2.1-dev"
3333
}
3434
}
3535
}

‎spec/Coduo/ToString/StringSpec.php ‎spec/Coduo/ToString/StringConverterSpec.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44

55
use PhpSpec\ObjectBehavior;
66

7-
class Foo
8-
{
9-
public function __toString()
10-
{
11-
return 'This is Foo';
12-
}
13-
}
14-
15-
class StringSpec extends ObjectBehavior
7+
class StringConverterSpec extends ObjectBehavior
168
{
179
/**
1810
* @dataProvider positiveConversionExamples
@@ -51,3 +43,11 @@ function it_convert_resource_to_string()
5143
unlink(sys_get_temp_dir() . "/foo");
5244
}
5345
}
46+
47+
class Foo
48+
{
49+
public function __toString()
50+
{
51+
return 'This is Foo';
52+
}
53+
}

‎src/Coduo/ToString/String.php ‎src/Coduo/ToString/StringConverter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Coduo\ToString;
44

5-
class String
5+
class StringConverter
66
{
77
/**
88
* @var mixed

0 commit comments

Comments
 (0)