@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | foreach ($year['children'] as $month) { |
128 | 128 | foreach ($month['children'] as $day) { |
129 | 129 | foreach ($day['children'] as $issue) { |
130 | - $title = $issue['label'] ?: $issue['orderlabel']; |
|
130 | + $title = $issue['label'] ? : $issue['orderlabel']; |
|
131 | 131 | if (strtotime($title) !== false) { |
132 | 132 | $title = strftime('%x', strtotime($title)); |
133 | 133 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $_day = date('j', $dateTimestamp); |
172 | 172 | $calendarIssuesByYear[$_year][$_month][$_day][] = $issue; |
173 | 173 | } else { |
174 | - $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication'); |
|
174 | + $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication'); |
|
175 | 175 | } |
176 | 176 | } |
177 | 177 | // Sort by years. |
@@ -218,8 +218,8 @@ discard block |
||
218 | 218 | $this->view->assign('calendarData', $calendarData); |
219 | 219 | $this->view->assign('documentId', $this->document->getUid()); |
220 | 220 | $this->view->assign('yearLinkTitle', $yearLinkTitle); |
221 | - $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getDoc()->tableOfContents[0]['points']); |
|
222 | - $this->view->assign('allYearDocTitle', $this->document->getDoc()->getTitle($this->document->getPartof()) ?: $this->document->getDoc()->tableOfContents[0]['label']); |
|
221 | + $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getDoc()->tableOfContents[0]['points']); |
|
222 | + $this->view->assign('allYearDocTitle', $this->document->getDoc()->getTitle($this->document->getPartof()) ? : $this->document->getDoc()->tableOfContents[0]['label']); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | |
256 | 256 | if (empty($yearLabel)) { |
257 | 257 | // if neither order nor orderlabel is set, use the id... |
258 | - $yearLabel = (string)$id; |
|
258 | + $yearLabel = (string) $id; |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | $years[] = [ |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | protected function getCalendarYear(&$calendarData, $calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) |
305 | 305 | { |
306 | 306 | for ($i = $firstMonth; $i <= $lastMonth; $i++) { |
307 | - $key = $year . '-' . $i; |
|
307 | + $key = $year.'-'.$i; |
|
308 | 308 | |
309 | 309 | $calendarData[$key] = [ |
310 | 310 | 'DAYMON_NAME' => strftime('%a', strtotime('last Monday')), |
@@ -314,16 +314,16 @@ discard block |
||
314 | 314 | 'DAYFRI_NAME' => strftime('%a', strtotime('last Friday')), |
315 | 315 | 'DAYSAT_NAME' => strftime('%a', strtotime('last Saturday')), |
316 | 316 | 'DAYSUN_NAME' => strftime('%a', strtotime('last Sunday')), |
317 | - 'MONTHNAME' => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, |
|
317 | + 'MONTHNAME' => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year, |
|
318 | 318 | 'CALYEAR' => ($i == $firstMonth) ? $year : '' |
319 | 319 | ]; |
320 | 320 | |
321 | - $firstOfMonth = strtotime($year . '-' . $i . '-1'); |
|
321 | + $firstOfMonth = strtotime($year.'-'.$i.'-1'); |
|
322 | 322 | $lastOfMonth = strtotime('last day of', ($firstOfMonth)); |
323 | 323 | $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); |
324 | 324 | // There are never more than 6 weeks in a month. |
325 | 325 | for ($j = 0; $j <= 5; $j++) { |
326 | - $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); |
|
326 | + $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); |
|
327 | 327 | |
328 | 328 | $calendarData[$key]['week'][$j] = [ |
329 | 329 | 'DAYMON' => ['dayValue' => ' '], |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | ]; |
337 | 337 | // Every week has seven days. ;-) |
338 | 338 | for ($k = 0; $k <= 6; $k++) { |
339 | - $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); |
|
339 | + $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); |
|
340 | 340 | if ( |
341 | 341 | $currentDayTime >= $firstOfMonth |
342 | 342 | && $currentDayTime <= $lastOfMonth |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | } |
368 | 368 | $dayLinkDiv = $dayLinksText; |
369 | 369 | } |
370 | - switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { |
|
370 | + switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { |
|
371 | 371 | case '0': |
372 | 372 | $calendarData[$key]['week'][$j]['DAYSUN']['dayValue'] = strftime('%d', $currentDayTime); |
373 | 373 | if ((int) $dayLinks === (int) date('j', $currentDayTime)) { |