File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 "chevere/message" : " ^1.0.0" ,
2626 "chevere/standard" : " ^1.0.1" ,
2727 "chevere/throwable-handler" : " ^1.0.2" ,
28- "chevere/trace" : " ^2.0.0 " ,
29- "chevere/var-dump" : " ^2.0.2 " ,
28+ "chevere/trace" : " ^2.0.2 " ,
29+ "chevere/var-dump" : " ^2.0.6 " ,
3030 "phpseclib/phpseclib" : " ~3.0"
3131 },
3232 "require-dev" : {
Original file line number Diff line number Diff line change @@ -49,13 +49,14 @@ class: static::class
4949
5050 public function __destruct ()
5151 {
52- if (isset ( $ this ->handle )) {
52+ if ($ this ->handle ( )) {
5353 $ this ->close ();
5454 }
5555 }
5656
5757 public function handle (): ?CurlHandle
5858 {
59+ // @phpstan-ignore-next-line
5960 return isset ($ this ->handle ) ? $ this ->handle : null ;
6061 }
6162
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ private function setConfigFromFile(): void
103103 /** @var array<string, string|int|bool> $return */
104104 $ return = filePhpReturnForPath ($ this ->configFile )->cast ()->array ();
105105 foreach (static ::CONFIG_NAMES as $ prop ) {
106+ // @phpstan-ignore-next-line
106107 $ this ->{$ prop } = $ return [$ prop ] ?? $ this ->{$ prop };
107108 }
108109 }
Original file line number Diff line number Diff line change 1818use PHPUnit \Framework \TestCase ;
1919use function Chevere \Writer \streamTemp ;
2020use function Chevere \xrDebug \PHP \getWriter ;
21+ use function Chevere \xrDebug \PHP \serialize ;
2122
2223final class FunctionsTest extends TestCase
2324{
@@ -51,4 +52,17 @@ public function testXri(): void
5152 xri ()->memory ();
5253 xri ()->pause ();
5354 }
55+
56+ public function testSerialize (): void
57+ {
58+ $ data = [
59+ 'b ' => '1 ' ,
60+ 'a ' => '2 ' ,
61+ ];
62+ $ serialize = serialize ($ data );
63+ $ this ->assertSame (
64+ 'a2b1 ' ,
65+ $ serialize
66+ );
67+ }
5468}
You can’t perform that action at this time.
0 commit comments