File tree Expand file tree Collapse file tree 6 files changed +15
-7
lines changed Expand file tree Collapse file tree 6 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ cache:
14
14
15
15
before_install :
16
16
- if [[ $TRAVIS_PHP_VERSION =~ ^7 ]]; then phpenv config-rm xdebug.ini; fi
17
- - composer self-update
18
17
19
18
install :
20
- - composer require --no-update --no-interaction "phpunit/phpunit:*" "squizlabs/php_codesniffer:*" "friendsofphp/php-cs-fixer:*"
21
- - travis_retry composer update --no-interaction --prefer-source
19
+ - travis_retry composer update --no-interaction
22
20
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
23
21
24
22
before_script :
Original file line number Diff line number Diff line change 19
19
"php" : " >=5.6.0" ,
20
20
"psr/http-message" : " ^1.0"
21
21
},
22
+ "require-dev" : {
23
+ "phpunit/phpunit" : " ^6.0" ,
24
+ "squizlabs/php_codesniffer" : " ^2.8" ,
25
+ "friendsofphp/php-cs-fixer" : " ^2.1"
26
+ },
22
27
"autoload" : {
23
28
"psr-4" : {
24
29
"Violet\\ StreamingJsonEncoder\\ " : " src/"
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ private function initialize()
108
108
109
109
/**
110
110
* Returns the current number of step in the encoder.
111
- * @return int|null The current step number or null if the current state is not valid
111
+ * @return mixed The current step number as integer or null if the current state is not valid
112
112
*/
113
113
public function key ()
114
114
{
Original file line number Diff line number Diff line change 13
13
*/
14
14
class JsonStream implements StreamInterface
15
15
{
16
- /** @var BufferJsonEncoder The encoder used to produce the JSON stream */
16
+ /** @var BufferJsonEncoder|null The encoder used to produce the JSON stream or null once closed */
17
17
private $ encoder ;
18
18
19
19
/** @var int The current position of the cursor in the JSON stream */
20
20
private $ cursor ;
21
21
22
- /** @var string Buffered output from encoding the value as JSON */
22
+ /** @var string|null Buffered output from encoding the value as JSON or null when at EOF */
23
23
private $ buffer ;
24
24
25
25
/**
Original file line number Diff line number Diff line change 11
11
*/
12
12
class SerializableData implements \JsonSerializable
13
13
{
14
+ /** @var mixed */
14
15
private $ data ;
15
16
17
+ /**
18
+ * SerializableData constructor.
19
+ * @param mixed $data
20
+ */
16
21
public function __construct ($ data )
17
22
{
18
23
$ this ->data = $ data ;
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ public function testInvalidSeekWhence()
128
128
$ stream = new JsonStream ('value ' );
129
129
130
130
$ this ->expectException (\InvalidArgumentException::class);
131
- $ stream ->seek (2 , ' invalid ' );
131
+ $ stream ->seek (2 , - 1 );
132
132
}
133
133
134
134
public function testPrettyPrintStream ()
You can’t perform that action at this time.
0 commit comments