Skip to content

Commit 45b4f8e

Browse files
committed
improved maintainability
1 parent 6e51d58 commit 45b4f8e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Formatters/PlaneCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ private function getPlaneItem(
7575
}
7676

7777
return ($this->statusPrefixes[$prefixKey] !== $this->statusPrefixes[$this->statusKeys[0]]) ?
78-
"Property '{$contentItem['history']}' was " . $this->statusPrefixes[$prefixKey] .
79-
$altComment
78+
"Property '{$contentItem['history']}' was {$this->statusPrefixes[$prefixKey]}{$altComment}"
8079
:
8180
"";
8281
}
@@ -97,12 +96,13 @@ private function getPlaneList(
9796
$commentKey : $altCommentKey;
9897

9998
if ($currentCommentKey === $this->statusKeys[2]) {
100-
return "Property '{$contentItem['history']}' was added with value: [complex value]";
99+
return "Property '{$contentItem['history']}' was " .
100+
"{$this->statusPrefixes[$this->statusKeys[2]]} with value: " .
101+
self::NORMALIZED_VALUES[3];
101102
} elseif (
102-
($currentCommentKey === $this->statusKeys[3]) &&
103-
($this->statusPrefixes[$currentPrefixKey] === "removed")
103+
($this->statusPrefixes[$currentPrefixKey] === $this->statusPrefixes[$this->statusKeys[3]])
104104
) {
105-
return "Property '{$contentItem['history']}' was removed";
105+
return "Property '{$contentItem['history']}' was {$this->statusPrefixes[$this->statusKeys[3]]}";
106106
}
107107
return implode($currentItemList);
108108
}

0 commit comments

Comments
 (0)