Skip to content

Commit c242337

Browse files
committed
FactResolver: rename short variable cd → minimumDate
`cd` shadows the cd shell builtin in code-search and reads as a typo in the date formatter, where `minimumDate` makes the role obvious.
1 parent 8ee052d commit c242337

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/Processor/FactResolver.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,18 @@ private function formatDate(Date $date): string
177177
return strip_tags($date->display());
178178
}
179179

180-
$cd = $date->minimumDate();
180+
$minimumDate = $date->minimumDate();
181181

182-
if ($cd->day() > 0 && $cd->month() > 0) {
183-
return $cd->format('%d.%m.%Y');
182+
if ($minimumDate->day() > 0 && $minimumDate->month() > 0) {
183+
return $minimumDate->format('%d.%m.%Y');
184184
}
185185

186-
if ($cd->month() > 0) {
187-
return $cd->format('%m.%Y');
186+
if ($minimumDate->month() > 0) {
187+
return $minimumDate->format('%m.%Y');
188188
}
189189

190-
if ($cd->year() > 0) {
191-
return $cd->format('%Y');
190+
if ($minimumDate->year() > 0) {
191+
return $minimumDate->format('%Y');
192192
}
193193

194194
return strip_tags($date->display());

0 commit comments

Comments
 (0)