Skip to content

Commit d9193cb

Browse files
committed
Fixing some code sniffing issues
Code sniffer was not happy with the introduced changes
1 parent cb7ae19 commit d9193cb

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

composer.json

+5
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,10 @@
6666
"@test",
6767
"@pmd"
6868
]
69+
},
70+
"config": {
71+
"allow-plugins": {
72+
"infection/extension-installer": true
73+
}
6974
}
7075
}

src/Vies/HeartBeat.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,12 @@ class HeartBeat
6363
* @param int $port
6464
* @param int $timeout
6565
*/
66-
public function __construct(?string $host = null, int $port = Vies::VIES_PORT, int $timeout = self::DEFAULT_TIMEOUT, ?string $path = null)
67-
{
66+
public function __construct(
67+
?string $host = null,
68+
int $port = Vies::VIES_PORT,
69+
int $timeout = self::DEFAULT_TIMEOUT,
70+
?string $path = null
71+
) {
6872
if (null !== $host) {
6973
$this->setHost($host);
7074
}

src/Vies/Vies.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ public function setOptions(array $options): self
243243
*/
244244
public function getHeartBeat(): HeartBeat
245245
{
246-
$this->heartBeat = $this->heartBeat ?? new HeartBeat(self::VIES_DOMAIN, self::VIES_PORT, HeartBeat::DEFAULT_TIMEOUT, self::VIES_PATH);
246+
$this->heartBeat =
247+
$this->heartBeat ??
248+
new HeartBeat(self::VIES_DOMAIN, self::VIES_PORT, HeartBeat::DEFAULT_TIMEOUT, self::VIES_PATH);
247249

248250
return $this->heartBeat;
249251
}

tests/Vies/HeartBeatTest.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ public function socketProvider(): array
114114
return [
115115
'Non-existing socket on localhost' => ['127.0.0.1', -1, 10, null, false],
116116
'Socket 443 on ec.europe.eu' => [Vies::VIES_DOMAIN, Vies::VIES_PORT, 10, null, false],
117-
'Socket 443 on ec.europe.eu'.Vies::VIES_PATH => [Vies::VIES_DOMAIN, Vies::VIES_PORT, 10, Vies::VIES_PATH, true],
117+
'Socket 443 on ec.europe.eu'.Vies::VIES_PATH => [
118+
Vies::VIES_DOMAIN,
119+
Vies::VIES_PORT,
120+
10,
121+
Vies::VIES_PATH,
122+
true
123+
],
118124
];
119125
}
120126

0 commit comments

Comments
 (0)