mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-13 00:34:11 +02:00
Fix failing tests, remove PHP 5.4 short array syntax
This commit is contained in:
@@ -126,7 +126,7 @@ echo S::swapCase($string, 'UTF-8'); // 'fÒÔ bÀŘ'
|
|||||||
|
|
||||||
## Implemented Interfaces
|
## Implemented Interfaces
|
||||||
|
|
||||||
`Stringy\Stringy` implements the IteratorAggregate interface. This allows you
|
`Stringy\Stringy` implements the `IteratorAggregate` interface. This allows you
|
||||||
to use `foreach` with an instance of the class:
|
to use `foreach` with an instance of the class:
|
||||||
|
|
||||||
``` php
|
``` php
|
||||||
|
@@ -74,12 +74,12 @@ class StringyTestCase extends CommonTest
|
|||||||
{
|
{
|
||||||
$stringy = S::create('Fòô Bàř', 'UTF-8');
|
$stringy = S::create('Fòô Bàř', 'UTF-8');
|
||||||
|
|
||||||
$valResult = [];
|
$valResult = array();
|
||||||
foreach ($stringy as $char) {
|
foreach ($stringy as $char) {
|
||||||
$valResult[] = $char;
|
$valResult[] = $char;
|
||||||
}
|
}
|
||||||
|
|
||||||
$keyValResult = [];
|
$keyValResult = array();
|
||||||
foreach ($stringy as $pos => $char) {
|
foreach ($stringy as $pos => $char) {
|
||||||
$keyValResult[$pos] = $char;
|
$keyValResult[$pos] = $char;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user