Skip to content

Commit fb08189

Browse files
committed
rename String class to Str for PHP7 compatibility, this closes #11
1 parent 84821ac commit fb08189

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/BinaryReader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use PhpBinaryReader\Type\Int8;
99
use PhpBinaryReader\Type\Int16;
1010
use PhpBinaryReader\Type\Int32;
11-
use PhpBinaryReader\Type\String;
11+
use PhpBinaryReader\Type\Str;
1212

1313
class BinaryReader
1414
{
@@ -58,7 +58,7 @@ class BinaryReader
5858
private $bitReader;
5959

6060
/**
61-
* @var \PhpBinaryReader\Type\String
61+
* @var \PhpBinaryReader\Type\Str
6262
*/
6363
private $stringReader;
6464

@@ -98,7 +98,7 @@ public function __construct($input, $endian = Endian::ENDIAN_LITTLE)
9898
$this->setPosition(0);
9999

100100
$this->bitReader = new Bit();
101-
$this->stringReader = new String();
101+
$this->stringReader = new Str();
102102
$this->byteReader = new Byte();
103103
$this->int8Reader = new Int8();
104104
$this->int16Reader = new Int16();
@@ -421,7 +421,7 @@ public function getInt32Reader()
421421
}
422422

423423
/**
424-
* @return \PhpBinaryReader\Type\String
424+
* @return \PhpBinaryReader\Type\Str
425425
*/
426426
public function getStringReader()
427427
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use PhpBinaryReader\BinaryReader;
66
use PhpBinaryReader\Exception\InvalidDataException;
77

8-
class String implements TypeInterface
8+
class Str implements TypeInterface
99
{
1010
/**
1111
* @param \PhpBinaryReader\BinaryReader $br

test/BinaryReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,6 @@ public function testReaders()
304304
$this->assertInstanceOf('\PhpBinaryReader\Type\Int16', $brBig->getInt16Reader());
305305
$this->assertInstanceOf('\PhpBinaryReader\Type\Int32', $brBig->getInt32Reader());
306306
$this->assertInstanceOf('\PhpBinaryReader\Type\Int8', $brBig->getInt8Reader());
307-
$this->assertInstanceOf('\PhpBinaryReader\Type\String', $brBig->getStringReader());
307+
$this->assertInstanceOf('\PhpBinaryReader\Type\Str', $brBig->getStringReader());
308308
}
309309
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
use PhpBinaryReader\Endian;
88

99
/**
10-
* @coversDefaultClass \PhpBinaryReader\Type\String
10+
* @coversDefaultClass \PhpBinaryReader\Type\Str
1111
*/
12-
class StringTest extends AbstractTestCase
12+
class StrTest extends AbstractTestCase
1313
{
1414
/**
15-
* @var String
15+
* @var Str
1616
*/
1717
public $string;
1818

1919
public function setUp()
2020
{
21-
$this->string = new String();
21+
$this->string = new Str();
2222
}
2323

2424
/**

0 commit comments

Comments
 (0)