Skip to content

Commit dfe7391

Browse files
committed
Relax typehint in Encoder
1 parent 506369a commit dfe7391

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/EDI/Encoder.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,8 @@ public function encodeSegment(array $row): string
121121

122122
foreach ($row as $i => &$iValue) {
123123
if (\is_array($iValue)) {
124-
if (
125-
\count($iValue) === 1
126-
&&
127-
\is_array(\reset($iValue))
124+
if (\count($iValue) === 1
125+
&& \is_array(\reset($iValue))
128126
) {
129127
$iValue = \array_pop($iValue);
130128
}
@@ -155,11 +153,11 @@ public function encodeSegment(array $row): string
155153
}
156154

157155
/**
158-
* @param string $str
156+
* @param string|int $str
159157
*
160158
* @return string
161159
*/
162-
private function escapeValue(string &$str): string
160+
private function escapeValue(&$str): string
163161
{
164162
$search = [
165163
$this->symbRel,
@@ -207,10 +205,8 @@ public function get(): string
207205
*/
208206
public function setUNA(string $chars, bool $user_call = true): bool
209207
{
210-
if (
211-
\is_string($chars)
212-
&&
213-
\strlen($chars) == 6
208+
if (\is_string($chars)
209+
&& \strlen($chars) == 6
214210
) {
215211
$this->sepComp = $chars[0];
216212
$this->sepData = $chars[1];

0 commit comments

Comments
 (0)