Skip to content

Commit d785291

Browse files
committed
improved maintainability
1 parent 82476ab commit d785291

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Formatters/PlaneCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,25 +117,23 @@ function ($result, $contentItem) {
117117
$bothContentIsArray = is_array($firstContent) && is_array($secondContent);
118118

119119
if ($bothContentIsArray) {
120-
$styledArray = $this->getPlaneList(
120+
$styledItem = $this->getPlaneList(
121121
contentItem: $contentItem,
122122
currentItemList: $this->stylizeDifference($contentItem["output"]),
123123
prefixKey: $this->statusKeys[0],
124124
altPrefixKey: $contentItem["status"],
125125
commentKey: $this->statusKeys[0],
126126
altCommentKey: $contentItem["status"],
127127
);
128-
129-
$result[] = "{$styledArray}\n";
130128
} else {
131129
$styledItem = $this->getPlaneItem(
132130
contentItem: $contentItem,
133131
prefixKey: $contentItem["status"],
134132
firstContent: $firstContent,
135133
secondContent: $secondContent
136134
);
137-
$result[] = "{$styledItem}\n";
138135
}
136+
$result[] = "{$styledItem}\n";
139137

140138
return $result;
141139
},

0 commit comments

Comments
 (0)