Skip to content

Commit 11a4aba

Browse files
committed
updates
1 parent 9f9055a commit 11a4aba

4 files changed

Lines changed: 19 additions & 3 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
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": {

src/Traits/CurlTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/Xr.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}

tests/FunctionsTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use PHPUnit\Framework\TestCase;
1919
use function Chevere\Writer\streamTemp;
2020
use function Chevere\xrDebug\PHP\getWriter;
21+
use function Chevere\xrDebug\PHP\serialize;
2122

2223
final 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
}

0 commit comments

Comments
 (0)