Skip to content

Commit 7f344fd

Browse files
authored
Merge pull request #2 from rtckit/v0.8.6
v0.8.6
2 parents 23c7201 + 04c26f9 commit 7f344fd

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
},
3232
"require-dev": {
3333
"clue/block-react": "^1.5",
34-
"clue/stdio-react": "^2.5",
35-
"phpstan/phpstan": "^1.4",
34+
"clue/stdio-react": "^2.6",
35+
"phpstan/phpstan": "^1.5",
3636
"phpunit/phpunit": "^9.5",
37-
"vimeo/psalm": "^4.20"
37+
"vimeo/psalm": "^4.22"
3838
},
3939
"autoload": {
4040
"psr-4": {
@@ -48,7 +48,7 @@
4848
},
4949
"scripts": {
5050
"phpstan": "php -d memory_limit=-1 ./vendor/bin/phpstan analyse -c ./etc/phpstan.neon -n -vvv --ansi --level=max src",
51-
"psalm": "php -d memory_limit=-1 ./vendor/bin/psalm --config=./etc/psalm.xml --show-info=true",
51+
"psalm": "php -d memory_limit=-1 ./vendor/bin/psalm --config=./etc/psalm.xml --show-info=true --shepherd",
5252
"phpunit": "php -d memory_limit=-1 ./vendor/bin/phpunit --debug -c ./etc/phpunit.xml.dist",
5353
"coverage": "php -d memory_limit=-1 ./vendor/bin/phpunit --debug -c ./etc/phpunit.xml.dist --coverage-text --coverage-html=reports/coverage"
5454
}

etc/psalm.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0"?>
22
<psalm
3-
totallyTyped="false"
43
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
54
xmlns="https://getpsalm.org/schema/config"
65
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

src/InboundClient.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ public function preAuthHandler(MessageInterface $response): void
200200
}
201201
}
202202

203+
/**
204+
* Retrieves bound socket address
205+
*
206+
* @return ?string
207+
*/
208+
public function getAddress(): ?string
209+
{
210+
return $this->esl->getAddress();
211+
}
212+
203213
/**
204214
* Closes the TCP connection
205215
*/

tests/InboundClientTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,14 @@ public function testPreAuthHandlerOnUnexpectedResponse(): void
394394
});
395395
}
396396

397+
public function testGetAddress(): void
398+
{
399+
$context = $this->prepareClientAndConnectors();
400+
401+
$context->esl->expects($this->once())->method('getAddress');
402+
$context->client->getAddress();
403+
}
404+
397405
public function testClose(): void
398406
{
399407
$context = $this->prepareClientAndConnectors();

0 commit comments

Comments
 (0)