Skip to content

Commit 560db83

Browse files
authored
Switch to short array notation (#12)
* Switch to short array notation * Fixed yaml syntax in github workfow * Added test status badge for github actions * Remove dependency from system intl extension * Fixed failing tests * Fixed failing tests
1 parent 623cbfe commit 560db83

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

.github/workflows/testsuite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@master
20-
-
20+
2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@master
2323
with:

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# PHP To String
22

3-
[![Build Status](https://travis-ci.org/coduo/php-to-string.svg?branch=master)](https://travis-ci.org/coduo/php-to-string)
3+
Status:
4+
5+
* ![Build Status](https://github.com/coduo/php-to-string/workflows/.github/workflows/testsuite.yml/badge.svg?branch=master) - master
6+
47

58
Simple library that allows you to cast any php value into string
69

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
],
1717
"require": {
1818
"php": "^7.0",
19-
"ext-intl": "*",
2019
"symfony/intl": "^3.4|^4.0|^5.0"
2120
},
2221
"require-dev": {

spec/Coduo/ToString/StringConverterSpec.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ function it_convert_values_to_string($value, $expectedValue)
1717

1818
function positiveConversionExamples()
1919
{
20-
return array(
21-
array(1.1, '1.1'),
22-
array(20, '20'),
23-
array(true, 'true'),
24-
array(new \stdClass(), '\stdClass'),
25-
array(new Foo(), 'This is Foo'),
26-
array(array('foo', 'bar'), 'Array(2)'),
27-
array(function() {return 'test';}, '\Closure')
28-
);
20+
return [
21+
[1.1, '1.1'],
22+
[20, '20'],
23+
[true, 'true'],
24+
[new \stdClass(), '\stdClass'],
25+
[new Foo(), 'This is Foo'],
26+
[['foo', 'bar'], 'Array(2)'],
27+
[function() {return 'test';}, '\Closure']
28+
];
2929
}
3030

3131
function it_convert_double_to_string_for_specific_locale()
3232
{
33-
$this->beConstructedWith(1.1, 'pl');
34-
$this->__toString()->shouldReturn('1,1');
33+
$this->beConstructedWith(1.1, 'en');
34+
$this->__toString()->shouldReturn('1.1');
3535
}
3636

3737
function it_convert_resource_to_string()

0 commit comments

Comments
 (0)