| @@ -52,12 +52,12 @@ | ||
| 52 | 52 |              $(document).ready(function() { | 
| 53 | 53 |                  AudioPlayer = new dlfAudioPlayer({ | 
| 54 | 54 |                      audio: { | 
| 55 | - mimeType: "' . $this->audio['mimetype'] . '", | |
| 56 | - title: "' . $this->audio['label'] . '", | |
| 57 | - url: "' . $this->audio['url'] . '" | |
| 55 | + mimeType: "' . $this->audio['mimetype'].'", | |
| 56 | + title: "' . $this->audio['label'].'", | |
| 57 | + url: "' . $this->audio['url'].'" | |
| 58 | 58 | }, | 
| 59 | 59 | parentElId: "tx-dlf-audio", | 
| 60 | -                    swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')) . 'Resources/Public/JavaScript/jPlayer/jquery.jplayer.swf" | |
| 60 | +                    swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')).'Resources/Public/JavaScript/jPlayer/jquery.jplayer.swf" | |
| 61 | 61 | }); | 
| 62 | 62 | }); | 
| 63 | 63 | '; | 
| @@ -129,7 +129,7 @@ | ||
| 129 | 129 |              $this->raw->registerXPathNamespace('personal-details', 'http://www.orcid.org/ns/personal-details'); | 
| 130 | 130 |              $givenNames = $this->raw->xpath('./personal-details:name/personal-details:given-names'); | 
| 131 | 131 |              $familyName = $this->raw->xpath('./personal-details:name/personal-details:family-name'); | 
| 132 | - return (string) $givenNames[0] . ' ' . (string) $familyName[0]; | |
| 132 | + return (string) $givenNames[0].' '.(string) $familyName[0]; | |
| 133 | 133 |          } else { | 
| 134 | 134 |              $this->logger->warning('No name found for given ORCID'); | 
| 135 | 135 | return false; | 
| @@ -15,10 +15,10 @@ | ||
| 15 | 15 |  preg_match("@.*/(?:acceptance|functional-[a-z\d]+)@", $_SERVER['REQUEST_URI'], $matches); | 
| 16 | 16 | |
| 17 | 17 |  if (!empty($matches)) { | 
| 18 | - $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]); | |
| 18 | + $root = realpath($_SERVER['DOCUMENT_ROOT'].$matches[0]); | |
| 19 | 19 |      if ($root !== false) { | 
| 20 | -        putenv('TYPO3_PATH_ROOT=' . $root); | |
| 21 | -        putenv('TYPO3_PATH_APP=' . $root); | |
| 20 | +        putenv('TYPO3_PATH_ROOT='.$root); | |
| 21 | +        putenv('TYPO3_PATH_APP='.$root); | |
| 22 | 22 | } | 
| 23 | 23 | } | 
| 24 | 24 | |
| @@ -57,7 +57,7 @@ | ||
| 57 | 57 | } | 
| 58 | 58 |                  $dmdIds = explode(' ', $id); | 
| 59 | 59 |                  foreach ($dmdIds as $dmdId) { | 
| 60 | -                    $recordIds = $xml->xpath('//mets:dmdSec[@ID="' . $dmdId . '"]//mods:mods/mods:recordInfo/mods:recordIdentifier'); | |
| 60 | +                    $recordIds = $xml->xpath('//mets:dmdSec[@ID="'.$dmdId.'"]//mods:mods/mods:recordInfo/mods:recordIdentifier'); | |
| 61 | 61 |                      if (!empty($recordIds)) { | 
| 62 | 62 | $recordId = (string) $recordIds[0]; | 
| 63 | 63 | break; | 
| @@ -190,9 +190,9 @@ discard block | ||
| 190 | 190 |                              $queryBuilder->createNamedParameter('', \PDO::PARAM_STR) | 
| 191 | 191 | ), | 
| 192 | 192 | $queryBuilder->expr()->comparison( | 
| 193 | -                            'CAST(CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS DECIMAL) AS CHAR)', | |
| 193 | +                            'CAST(CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS DECIMAL) AS CHAR)', | |
| 194 | 194 | ExpressionBuilder::NEQ, | 
| 195 | -                            'CAST(' . $queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]) . ' AS CHAR)' | |
| 195 | +                            'CAST('.$queryBuilder->quoteIdentifier($this->fieldsToMigrate[$table]).' AS CHAR)' | |
| 196 | 196 | ) | 
| 197 | 197 | ) | 
| 198 | 198 |                      ->orderBy('uid') | 
| @@ -205,7 +205,7 @@ discard block | ||
| 205 | 205 | } | 
| 206 | 206 |              } catch (Exception $e) { | 
| 207 | 207 | throw new \RuntimeException( | 
| 208 | - 'Database query failed. Error was: ' . $e->getPrevious()->getMessage(), | |
| 208 | + 'Database query failed. Error was: '.$e->getPrevious()->getMessage(), | |
| 209 | 209 | 1511950673 | 
| 210 | 210 | ); | 
| 211 | 211 | } | 
| @@ -271,7 +271,7 @@ discard block | ||
| 271 | 271 | $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); | 
| 272 | 272 | |
| 273 | 273 | $fileUid = null; | 
| 274 | - $sourcePath = Environment::getPublicPath() . '/' . $fieldItem; | |
| 274 | + $sourcePath = Environment::getPublicPath().'/'.$fieldItem; | |
| 275 | 275 | |
| 276 | 276 | // maybe the file was already moved, so check if the original file still exists | 
| 277 | 277 |          if (file_exists($sourcePath)) { | 
| @@ -250,10 +250,10 @@ discard block | ||
| 250 | 250 |              if ($root->item(0) instanceof \DOMNode) { | 
| 251 | 251 | $mets = $xml->saveXML($root->item(0)); | 
| 252 | 252 |              } else { | 
| 253 | -                $this->logger->error('No METS part found in document with location "' . $record['location'] . '"'); | |
| 253 | +                $this->logger->error('No METS part found in document with location "'.$record['location'].'"'); | |
| 254 | 254 | } | 
| 255 | 255 |          } else { | 
| 256 | -            $this->logger->error('Could not load XML file from "' . $record['location'] . '"'); | |
| 256 | +            $this->logger->error('Could not load XML file from "'.$record['location'].'"'); | |
| 257 | 257 | } | 
| 258 | 258 | return $mets; | 
| 259 | 259 | } | 
| @@ -421,7 +421,7 @@ discard block | ||
| 421 | 421 | $pageSettings = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); | 
| 422 | 422 | $storagePid = $pageSettings["plugin."]["tx_dlf."]["persistence."]["storagePid"]; | 
| 423 | 423 |              if ($storagePid > 0) { | 
| 424 | -                $this->logger->notice('No records found with PID ' . $storagePid); | |
| 424 | +                $this->logger->notice('No records found with PID '.$storagePid); | |
| 425 | 425 |              } else { | 
| 426 | 426 |                  $this->logger->notice('No records found'); | 
| 427 | 427 | } | 
| @@ -504,7 +504,7 @@ discard block | ||
| 504 | 504 |              if (!empty($resArray)) { | 
| 505 | 505 | // check, if all required fields are available for a given identifier | 
| 506 | 506 |                  foreach ($details['requiredFields'] as $required) { | 
| 507 | - $methodName = 'get' . GeneralUtility::underscoredToUpperCamelCase($required); | |
| 507 | + $methodName = 'get'.GeneralUtility::underscoredToUpperCamelCase($required); | |
| 508 | 508 |                      if (empty($resArray->$methodName())) { | 
| 509 | 509 | // Skip metadata formats whose requirements are not met. | 
| 510 | 510 | continue 2; | 
| @@ -610,9 +610,9 @@ discard block | ||
| 610 | 610 | $resArray = $result->fetchAssociative(); | 
| 611 | 611 |              if ($resArray) { | 
| 612 | 612 |                  if ($resArray['index_query'] != "") { | 
| 613 | -                    $solrQuery .= '(' . $resArray['index_query'] . ')'; | |
| 613 | +                    $solrQuery .= '('.$resArray['index_query'].')'; | |
| 614 | 614 |                  } else { | 
| 615 | - $solrQuery .= 'collection:' . '"' . $resArray['index_name'] . '"'; | |
| 615 | + $solrQuery .= 'collection:'.'"'.$resArray['index_name'].'"'; | |
| 616 | 616 | } | 
| 617 | 617 |              } else { | 
| 618 | 618 | $this->error = 'noSetHierarchy'; | 
| @@ -624,7 +624,7 @@ discard block | ||
| 624 | 624 | } | 
| 625 | 625 | // Check for required fields. | 
| 626 | 626 |          foreach ($this->formats[$this->parameters['metadataPrefix']]['requiredFields'] as $required) { | 
| 627 | - $solrQuery .= ' NOT ' . $required . ':""'; | |
| 627 | + $solrQuery .= ' NOT '.$required.':""'; | |
| 628 | 628 | } | 
| 629 | 629 | // toplevel="true" is always required | 
| 630 | 630 | $solrQuery .= ' AND toplevel:true'; | 
| @@ -638,7 +638,7 @@ discard block | ||
| 638 | 638 | return $documentSet; | 
| 639 | 639 | } | 
| 640 | 640 | |
| 641 | - $solrQuery .= ' AND timestamp:[' . $from . ' TO ' . $until . ']'; | |
| 641 | + $solrQuery .= ' AND timestamp:['.$from.' TO '.$until.']'; | |
| 642 | 642 | |
| 643 | 643 | $solr = Solr::getInstance($this->settings['solrcore']); | 
| 644 | 644 |          if (!$solr->ready) { | 
| @@ -729,7 +729,7 @@ discard block | ||
| 729 | 729 | */ | 
| 730 | 730 | private function getDate(string $dateType) | 
| 731 | 731 |      { | 
| 732 | - return strptime($this->parameters[$dateType], '%Y-%m-%dT%H:%M:%SZ') ?: strptime($this->parameters[$dateType], '%Y-%m-%d'); | |
| 732 | + return strptime($this->parameters[$dateType], '%Y-%m-%dT%H:%M:%SZ') ? : strptime($this->parameters[$dateType], '%Y-%m-%d'); | |
| 733 | 733 | } | 
| 734 | 734 | |
| 735 | 735 | /** | 
| @@ -752,7 +752,7 @@ discard block | ||
| 752 | 752 | $date['tm_mday'], | 
| 753 | 753 | $date['tm_year'] + 1900 | 
| 754 | 754 | ); | 
| 755 | -        return date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . $end; | |
| 755 | +        return date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).$end; | |
| 756 | 756 | } | 
| 757 | 757 | |
| 758 | 758 | /** | 
| @@ -865,7 +865,7 @@ discard block | ||
| 865 | 865 | $resumptionTokenInfo['cursor'] = $currentCursor; | 
| 866 | 866 | $resumptionTokenInfo['completeListSize'] = $documentListSet['metadata']['completeListSize']; | 
| 867 | 867 | $expireDateTime = new \DateTime(); | 
| 868 | -        $expireDateTime->add(new \DateInterval('PT' . $this->settings['expired'] . 'S')); | |
| 868 | +        $expireDateTime->add(new \DateInterval('PT'.$this->settings['expired'].'S')); | |
| 869 | 869 | $resumptionTokenInfo['expired'] = $expireDateTime; | 
| 870 | 870 | |
| 871 | 871 | $omitResumptionToken = $currentCursor === 0 && $numShownDocuments >= $documentListSet['metadata']['completeListSize']; | 
| @@ -68,7 +68,7 @@ | ||
| 68 | 68 | $pageGridPagination = new PageGridPagination($pageGridPaginator); | 
| 69 | 69 | |
| 70 | 70 | $pagination = $this->buildSimplePagination($pageGridPagination, $pageGridPaginator); | 
| 71 | - $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $pageGridPaginator ]); | |
| 71 | + $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $pageGridPaginator]); | |
| 72 | 72 | |
| 73 | 73 |          $this->view->assign('docUid', $this->requestData['id']); | 
| 74 | 74 | } | 
| @@ -75,7 +75,7 @@ discard block | ||
| 75 | 75 |          if ($library) { | 
| 76 | 76 | $feedMeta['copyright'] = $library->getLabel(); | 
| 77 | 77 |          } else { | 
| 78 | -            $this->logger->error('Failed to fetch label of selected library with "' . $this->settings['library'] . '"'); | |
| 78 | +            $this->logger->error('Failed to fetch label of selected library with "'.$this->settings['library'].'"'); | |
| 79 | 79 | } | 
| 80 | 80 | |
| 81 | 81 | if ( | 
| @@ -95,12 +95,12 @@ discard block | ||
| 95 | 95 |                  ) { | 
| 96 | 96 | $superiorTitle = AbstractDocument::getTitle($document->getPartof(), true); | 
| 97 | 97 |                      if (!empty($superiorTitle)) { | 
| 98 | - $title .= '[' . $superiorTitle . ']'; | |
| 98 | + $title .= '['.$superiorTitle.']'; | |
| 99 | 99 | } | 
| 100 | 100 | } | 
| 101 | 101 | // Get title of document. | 
| 102 | 102 |                  if (!empty($document->getTitle())) { | 
| 103 | - $title .= ' ' . $document->getTitle(); | |
| 103 | + $title .= ' '.$document->getTitle(); | |
| 104 | 104 | } | 
| 105 | 105 | // Set default title if empty. | 
| 106 | 106 |                  if (empty($title)) { | 
| @@ -108,13 +108,13 @@ discard block | ||
| 108 | 108 | } | 
| 109 | 109 | // Append volume information. | 
| 110 | 110 |                  if (!empty($document->getVolume())) { | 
| 111 | -                    $title .= ', ' . LocalizationUtility::translate('volume', 'dlf') . ' ' . $document->getVolume(); | |
| 111 | +                    $title .= ', '.LocalizationUtility::translate('volume', 'dlf').' '.$document->getVolume(); | |
| 112 | 112 | } | 
| 113 | 113 | // Is this document new or updated? | 
| 114 | 114 |                  if ($document->getCrdate() == $document->getTstamp()) { | 
| 115 | -                    $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf') . ' ' . trim($title); | |
| 115 | +                    $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf').' '.trim($title); | |
| 116 | 116 |                  } else { | 
| 117 | -                    $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf') . ' ' . trim($title); | |
| 117 | +                    $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf').' '.trim($title); | |
| 118 | 118 | } | 
| 119 | 119 | |
| 120 | 120 | $document->setTitle($title); | 
| @@ -134,8 +134,8 @@ discard block | ||
| 134 | 134 |          $this->view->assign('calendarData', $calendarData); | 
| 135 | 135 |          $this->view->assign('documentId', $this->document->getUid()); | 
| 136 | 136 |          $this->view->assign('yearLinkTitle', $yearLinkTitle); | 
| 137 | -        $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getCurrentDocument()->tableOfContents[0]['points']); | |
| 138 | -        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); | |
| 137 | +        $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getCurrentDocument()->tableOfContents[0]['points']); | |
| 138 | +        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); | |
| 139 | 139 | } | 
| 140 | 140 | |
| 141 | 141 | /** | 
| @@ -220,7 +220,7 @@ discard block | ||
| 220 | 220 | } | 
| 221 | 221 | |
| 222 | 222 |          $this->view->assign('documentId', $this->document->getUid()); | 
| 223 | -        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']); | |
| 223 | +        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']); | |
| 224 | 224 | } | 
| 225 | 225 | |
| 226 | 226 | /** | 
| @@ -239,7 +239,7 @@ discard block | ||
| 239 | 239 | protected function getCalendarYear(array &$calendarData, array $calendarIssuesByMonth, int $year, int $firstMonth = 1, int $lastMonth = 12): void | 
| 240 | 240 |      { | 
| 241 | 241 |          for ($i = $firstMonth; $i <= $lastMonth; $i++) { | 
| 242 | - $key = $year . '-' . $i; | |
| 242 | + $key = $year.'-'.$i; | |
| 243 | 243 | |
| 244 | 244 | $calendarData[$key] = [ | 
| 245 | 245 |                  'DAYMON_NAME' => strftime('%a', strtotime('last Monday')), | 
| @@ -249,16 +249,16 @@ discard block | ||
| 249 | 249 |                  'DAYFRI_NAME' => strftime('%a', strtotime('last Friday')), | 
| 250 | 250 |                  'DAYSAT_NAME' => strftime('%a', strtotime('last Saturday')), | 
| 251 | 251 |                  'DAYSUN_NAME' => strftime('%a', strtotime('last Sunday')), | 
| 252 | -                'MONTHNAME'  => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, | |
| 252 | +                'MONTHNAME'  => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year, | |
| 253 | 253 | 'CALYEAR' => ($i == $firstMonth) ? $year : '' | 
| 254 | 254 | ]; | 
| 255 | 255 | |
| 256 | - $firstOfMonth = strtotime($year . '-' . $i . '-1'); | |
| 256 | + $firstOfMonth = strtotime($year.'-'.$i.'-1'); | |
| 257 | 257 |              $lastOfMonth = strtotime('last day of', ($firstOfMonth)); | 
| 258 | 258 |              $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); | 
| 259 | 259 | // There are never more than 6 weeks in a month. | 
| 260 | 260 |              for ($j = 0; $j <= 5; $j++) { | 
| 261 | -                $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); | |
| 261 | +                $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); | |
| 262 | 262 | |
| 263 | 263 | $calendarData[$key]['week'][$j] = [ | 
| 264 | 264 | 'DAYMON' => ['dayValue' => ' '], | 
| @@ -271,7 +271,7 @@ discard block | ||
| 271 | 271 | ]; | 
| 272 | 272 | // Every week has seven days. ;-) | 
| 273 | 273 |                  for ($k = 0; $k <= 6; $k++) { | 
| 274 | -                    $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); | |
| 274 | +                    $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); | |
| 275 | 275 | if ( | 
| 276 | 276 | $currentDayTime >= $firstOfMonth | 
| 277 | 277 | && $currentDayTime <= $lastOfMonth | 
| @@ -342,7 +342,7 @@ discard block | ||
| 342 | 342 | */ | 
| 343 | 343 | private function fillCalendar(array &$calendarData, int $currentDayTime, string $dayLinks, array $dayLinkDiv, int $firstDayOfWeek, int $k): void | 
| 344 | 344 |      { | 
| 345 | -        switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { | |
| 345 | +        switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { | |
| 346 | 346 | case '0': | 
| 347 | 347 | $this->fillDay($calendarData, $currentDayTime, 'DAYSUN', $dayLinks, $dayLinkDiv); | 
| 348 | 348 | break; | 
| @@ -446,7 +446,7 @@ discard block | ||
| 446 | 446 |                  $_day = date('j', $dateTimestamp); | 
| 447 | 447 | $issuesByYear[$_year][$_month][$_day][] = $issue; | 
| 448 | 448 |              } else { | 
| 449 | -                $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication'); | |
| 449 | +                $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication'); | |
| 450 | 450 | } | 
| 451 | 451 | } | 
| 452 | 452 | // Sort by years. | 
| @@ -489,7 +489,7 @@ discard block | ||
| 489 | 489 |              foreach ($year['children'] as $month) { | 
| 490 | 490 |                  foreach ($month['children'] as $day) { | 
| 491 | 491 |                      foreach ($day['children'] as $issue) { | 
| 492 | - $title = $issue['label'] ?: $issue['orderlabel']; | |
| 492 | + $title = $issue['label'] ? : $issue['orderlabel']; | |
| 493 | 493 |                          if (strtotime($title) !== false) { | 
| 494 | 494 |                              $title = strftime('%x', strtotime($title)); | 
| 495 | 495 | } |