Skip to content

Commit 86b33f4

Browse files
committed
[TASK] Silence extension scanner warnings
1 parent 528dcd3 commit 86b33f4

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Classes/File/TransUnit.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ public function __construct(
3131
array $LOCAL_LANG
3232
) {
3333
if (is_array($data)) {
34+
// @extensionScannerIgnoreLine
3435
$this->target = $data['target'] ?? '';
36+
// @extensionScannerIgnoreLine
3537
$this->source = $data['source'] ?? $this->target;
3638
} else {
39+
// @extensionScannerIgnoreLine
3740
$this->target = $data;
41+
// @extensionScannerIgnoreLine
3842
$this->source = $LOCAL_LANG['default'][$key];
3943
}
4044
}
@@ -60,13 +64,16 @@ protected function getSourceNode(): string
6064

6165
protected function getTargetNode(): string
6266
{
63-
return empty($this->target)
67+
// @extensionScannerIgnoreLine
68+
$target = $this->target;
69+
return empty($target)
6470
? '<target/>'
65-
: '<target>' . htmlspecialchars($this->target) . '</target>';
71+
: '<target>' . htmlspecialchars($target) . '</target>';
6672
}
6773

6874
public function __toString(): string
6975
{
76+
// @extensionScannerIgnoreLine
7077
return ' <trans-unit id="' . $this->key . '" resname="' . $this->key . '"'
7178
. $this->getPreserved() . $this->getApproved() . '>' . LF
7279
. ' ' . $this->getSourceNode() . LF

0 commit comments

Comments
 (0)