| @@ -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 | '; | 
| @@ -24,8 +24,7 @@ | ||
| 24 | 24 | * | 
| 25 | 25 | * @access public | 
| 26 | 26 | */ | 
| 27 | -class AudioplayerController extends AbstractController | |
| 28 | -{ | |
| 27 | +class AudioplayerController extends AbstractController { | |
| 29 | 28 | /** | 
| 30 | 29 | * Holds the current audio file's URL, MIME type and optional label | 
| 31 | 30 | * | 
| @@ -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; | 
| @@ -26,8 +26,7 @@ discard block | ||
| 26 | 26 | * | 
| 27 | 27 | * @access public | 
| 28 | 28 | **/ | 
| 29 | -class Profile | |
| 30 | -{ | |
| 29 | +class Profile { | |
| 31 | 30 | /** | 
| 32 | 31 | * @access protected | 
| 33 | 32 | * @var Logger This holds the logger | 
| @@ -55,8 +54,7 @@ discard block | ||
| 55 | 54 | * | 
| 56 | 55 | * @return void | 
| 57 | 56 | **/ | 
| 58 | - public function __construct(string $orcid) | |
| 59 | -    { | |
| 57 | +    public function __construct(string $orcid) { | |
| 60 | 58 | $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); | 
| 61 | 59 | $this->client = new Client($orcid, GeneralUtility::makeInstance(RequestFactory::class)); | 
| 62 | 60 | } | 
| @@ -68,8 +66,7 @@ discard block | ||
| 68 | 66 | * | 
| 69 | 67 | * @return array|false | 
| 70 | 68 | **/ | 
| 71 | - public function getData() | |
| 72 | -    { | |
| 69 | +    public function getData() { | |
| 73 | 70 |          $this->getRaw('person'); | 
| 74 | 71 |          if ($this->raw !== false && !empty($this->raw)) { | 
| 75 | 72 | $data = []; | 
| @@ -90,8 +87,7 @@ discard block | ||
| 90 | 87 | * | 
| 91 | 88 | * @return string|false | 
| 92 | 89 | **/ | 
| 93 | - public function getAddress() | |
| 94 | -    { | |
| 90 | +    public function getAddress() { | |
| 95 | 91 |          $this->getRaw('address'); | 
| 96 | 92 |          if ($this->raw !== false && !empty($this->raw)) { | 
| 97 | 93 |              $this->raw->registerXPathNamespace('address', 'http://www.orcid.org/ns/address'); | 
| @@ -109,8 +105,7 @@ discard block | ||
| 109 | 105 | * | 
| 110 | 106 | * @return string|false | 
| 111 | 107 | **/ | 
| 112 | - public function getEmail() | |
| 113 | -    { | |
| 108 | +    public function getEmail() { | |
| 114 | 109 |          $this->getRaw('email'); | 
| 115 | 110 |          if ($this->raw !== false && !empty($this->raw)) { | 
| 116 | 111 |              $this->raw->registerXPathNamespace('email', 'http://www.orcid.org/ns/email'); | 
| @@ -128,8 +123,7 @@ discard block | ||
| 128 | 123 | * | 
| 129 | 124 | * @return string|false | 
| 130 | 125 | **/ | 
| 131 | - public function getFullName() | |
| 132 | -    { | |
| 126 | +    public function getFullName() { | |
| 133 | 127 |          $this->getRaw('personal-details'); | 
| 134 | 128 |          if ($this->raw !== false && !empty($this->raw)) { | 
| 135 | 129 |              $this->raw->registerXPathNamespace('personal-details', 'http://www.orcid.org/ns/personal-details'); | 
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | * @access private | 
| 45 | 45 | * @var \SimpleXmlElement|false The raw ORCID profile | 
| 46 | 46 | **/ | 
| 47 | - private $raw = false; | |
| 47 | + private $raw = FALSE; | |
| 48 | 48 | |
| 49 | 49 | /** | 
| 50 | 50 | * Constructs client instance | 
| @@ -71,7 +71,7 @@ discard block | ||
| 71 | 71 | public function getData() | 
| 72 | 72 |      { | 
| 73 | 73 |          $this->getRaw('person'); | 
| 74 | -        if ($this->raw !== false && !empty($this->raw)) { | |
| 74 | +        if ($this->raw !== FALSE && !empty($this->raw)) { | |
| 75 | 75 | $data = []; | 
| 76 | 76 | $data['address'] = $this->getAddress(); | 
| 77 | 77 | $data['email'] = $this->getEmail(); | 
| @@ -79,7 +79,7 @@ discard block | ||
| 79 | 79 | return $data; | 
| 80 | 80 |          } else { | 
| 81 | 81 |              $this->logger->warning('No data found for given ORCID'); | 
| 82 | - return false; | |
| 82 | + return FALSE; | |
| 83 | 83 | } | 
| 84 | 84 | } | 
| 85 | 85 | |
| @@ -93,12 +93,12 @@ discard block | ||
| 93 | 93 | public function getAddress() | 
| 94 | 94 |      { | 
| 95 | 95 |          $this->getRaw('address'); | 
| 96 | -        if ($this->raw !== false && !empty($this->raw)) { | |
| 96 | +        if ($this->raw !== FALSE && !empty($this->raw)) { | |
| 97 | 97 |              $this->raw->registerXPathNamespace('address', 'http://www.orcid.org/ns/address'); | 
| 98 | 98 |              return (string) $this->raw->xpath('./address:address/address:country')[0]; | 
| 99 | 99 |          } else { | 
| 100 | 100 |              $this->logger->warning('No address found for given ORCID'); | 
| 101 | - return false; | |
| 101 | + return FALSE; | |
| 102 | 102 | } | 
| 103 | 103 | } | 
| 104 | 104 | |
| @@ -112,12 +112,12 @@ discard block | ||
| 112 | 112 | public function getEmail() | 
| 113 | 113 |      { | 
| 114 | 114 |          $this->getRaw('email'); | 
| 115 | -        if ($this->raw !== false && !empty($this->raw)) { | |
| 115 | +        if ($this->raw !== FALSE && !empty($this->raw)) { | |
| 116 | 116 |              $this->raw->registerXPathNamespace('email', 'http://www.orcid.org/ns/email'); | 
| 117 | 117 |              return (string) $this->raw->xpath('./email:email/email:email')[0]; | 
| 118 | 118 |          } else { | 
| 119 | 119 |              $this->logger->warning('No email found for given ORCID'); | 
| 120 | - return false; | |
| 120 | + return FALSE; | |
| 121 | 121 | } | 
| 122 | 122 | } | 
| 123 | 123 | |
| @@ -131,14 +131,14 @@ discard block | ||
| 131 | 131 | public function getFullName() | 
| 132 | 132 |      { | 
| 133 | 133 |          $this->getRaw('personal-details'); | 
| 134 | -        if ($this->raw !== false && !empty($this->raw)) { | |
| 134 | +        if ($this->raw !== FALSE && !empty($this->raw)) { | |
| 135 | 135 |              $this->raw->registerXPathNamespace('personal-details', 'http://www.orcid.org/ns/personal-details'); | 
| 136 | 136 |              $givenNames = $this->raw->xpath('./personal-details:name/personal-details:given-names'); | 
| 137 | 137 |              $familyName = $this->raw->xpath('./personal-details:name/personal-details:family-name'); | 
| 138 | 138 | return (string) $givenNames[0] . ' ' . (string) $familyName[0]; | 
| 139 | 139 |          } else { | 
| 140 | 140 |              $this->logger->warning('No name found for given ORCID'); | 
| 141 | - return false; | |
| 141 | + return FALSE; | |
| 142 | 142 | } | 
| 143 | 143 | } | 
| 144 | 144 | |
| @@ -155,7 +155,7 @@ discard block | ||
| 155 | 155 |      { | 
| 156 | 156 | $this->client->setEndpoint($endpoint); | 
| 157 | 157 | $data = $this->client->getData(); | 
| 158 | -        if ($data != false) { | |
| 158 | +        if ($data != FALSE) { | |
| 159 | 159 | $this->raw = Helper::getXmlFileAsString($data); | 
| 160 | 160 | } | 
| 161 | 161 | } | 
| @@ -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 | |
| @@ -121,7 +121,7 @@ | ||
| 121 | 121 | // prepare feature array for fluid | 
| 122 | 122 | $features = []; | 
| 123 | 123 |          foreach (explode(',', $this->settings['features']) as $feature) { | 
| 124 | - $features[$feature] = true; | |
| 124 | + $features[$feature] = TRUE; | |
| 125 | 125 | } | 
| 126 | 126 |          $this->view->assign('features', $features); | 
| 127 | 127 | } | 
| @@ -104,7 +104,7 @@ | ||
| 104 | 104 | $pageOptions = []; | 
| 105 | 105 |          for ($i = 1; $i <= $this->document->getCurrentDocument()->numPages; $i++) { | 
| 106 | 106 | $orderLabel = $this->document->getCurrentDocument()->physicalStructureInfo[$this->document->getCurrentDocument()->physicalStructure[$i]]['orderlabel']; | 
| 107 | - $pageOptions[$i] = '[' . $i . ']' . ($orderLabel ? ' - ' . htmlspecialchars($orderLabel) : ''); | |
| 107 | + $pageOptions[$i] = '['.$i.']'.($orderLabel ? ' - '.htmlspecialchars($orderLabel) : ''); | |
| 108 | 108 | } | 
| 109 | 109 |          $this->view->assign('pageOptions', $pageOptions); | 
| 110 | 110 | |
| @@ -22,8 +22,7 @@ | ||
| 22 | 22 | * | 
| 23 | 23 | * @access public | 
| 24 | 24 | */ | 
| 25 | -class NavigationController extends AbstractController | |
| 26 | -{ | |
| 25 | +class NavigationController extends AbstractController { | |
| 27 | 26 | /** | 
| 28 | 27 | * Method to get the page select values and use them with cHash | 
| 29 | 28 | * | 
| @@ -24,8 +24,7 @@ | ||
| 24 | 24 | * | 
| 25 | 25 | * @access public | 
| 26 | 26 | */ | 
| 27 | -class EditInProductionWarning extends AbstractNode | |
| 28 | -{ | |
| 27 | +class EditInProductionWarning extends AbstractNode { | |
| 29 | 28 | /** | 
| 30 | 29 | * Generates warning message when editing 'index_name' field | 
| 31 | 30 | * | 
| @@ -25,8 +25,7 @@ | ||
| 25 | 25 | * | 
| 26 | 26 | * @access public | 
| 27 | 27 | */ | 
| 28 | -class SolrCoreStatus extends AbstractNode | |
| 29 | -{ | |
| 28 | +class SolrCoreStatus extends AbstractNode { | |
| 30 | 29 | /** | 
| 31 | 30 | * Shows Solr core status for given 'index_name' | 
| 32 | 31 | * | 
| @@ -33,8 +33,7 @@ | ||
| 33 | 33 | * | 
| 34 | 34 | * @access public | 
| 35 | 35 | */ | 
| 36 | -class DataHandler implements LoggerAwareInterface | |
| 37 | -{ | |
| 36 | +class DataHandler implements LoggerAwareInterface { | |
| 38 | 37 | use LoggerAwareTrait; | 
| 39 | 38 | |
| 40 | 39 | /** | 
| @@ -148,10 +148,10 @@ discard block | ||
| 148 | 148 |                      ) { | 
| 149 | 149 | // Get current configuration. | 
| 150 | 150 | $result = $queryBuilder | 
| 151 | - ->select($table . '.is_listed AS is_listed') | |
| 151 | + ->select($table.'.is_listed AS is_listed') | |
| 152 | 152 | ->from($table) | 
| 153 | 153 | ->where( | 
| 154 | - $queryBuilder->expr()->eq($table . '.uid', (int) $id), | |
| 154 | + $queryBuilder->expr()->eq($table.'.uid', (int) $id), | |
| 155 | 155 | Helper::whereExpression($table) | 
| 156 | 156 | ) | 
| 157 | 157 | ->setMaxResults(1) | 
| @@ -174,10 +174,10 @@ discard block | ||
| 174 | 174 |                      ) { | 
| 175 | 175 | // Get current configuration. | 
| 176 | 176 | $result = $queryBuilder | 
| 177 | - ->select($table . '.index_autocomplete AS index_autocomplete') | |
| 177 | + ->select($table.'.index_autocomplete AS index_autocomplete') | |
| 178 | 178 | ->from($table) | 
| 179 | 179 | ->where( | 
| 180 | - $queryBuilder->expr()->eq($table . '.uid', (int) $id), | |
| 180 | + $queryBuilder->expr()->eq($table.'.uid', (int) $id), | |
| 181 | 181 | Helper::whereExpression($table) | 
| 182 | 182 | ) | 
| 183 | 183 | ->setMaxResults(1) | 
| @@ -347,7 +347,7 @@ discard block | ||
| 347 | 347 |          if ($solr->ready) { | 
| 348 | 348 | // Delete Solr document. | 
| 349 | 349 | $updateQuery = $solr->service->createUpdate(); | 
| 350 | -            $updateQuery->addDeleteQuery('uid:' . (int) $id); | |
| 350 | +            $updateQuery->addDeleteQuery('uid:'.(int) $id); | |
| 351 | 351 | $updateQuery->addCommit(); | 
| 352 | 352 | $solr->service->update($updateQuery); | 
| 353 | 353 | } | 
| @@ -370,7 +370,7 @@ discard block | ||
| 370 | 370 | $document->setCurrentDocument($doc); | 
| 371 | 371 | Indexer::add($document, $this->getDocumentRepository()); | 
| 372 | 372 |          } else { | 
| 373 | -            $this->logger->error('Failed to re-index document with UID ' . (string) $id); | |
| 373 | +            $this->logger->error('Failed to re-index document with UID '.(string) $id); | |
| 374 | 374 | } | 
| 375 | 375 | } | 
| 376 | 376 | |
| @@ -421,7 +421,7 @@ discard block | ||
| 421 | 421 |                      try { | 
| 422 | 422 | $response = $solr->service->coreAdmin($query); | 
| 423 | 423 |                          if ($response->getWasSuccessful() == false) { | 
| 424 | -                            $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr'); | |
| 424 | +                            $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr'); | |
| 425 | 425 | } | 
| 426 | 426 |                      } catch (\Exception $e) { | 
| 427 | 427 | $this->logger->warning($e->getMessage()); | 
| @@ -365,8 +365,8 @@ discard block | ||
| 365 | 365 | private function reindexDocument($id):void | 
| 366 | 366 |      { | 
| 367 | 367 | $document = $this->getDocumentRepository()->findByUid((int) $id); | 
| 368 | - $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], true); | |
| 369 | -        if ($document !== null && $doc !== null) { | |
| 368 | + $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], TRUE); | |
| 369 | +        if ($document !== NULL && $doc !== NULL) { | |
| 370 | 370 | $document->setCurrentDocument($doc); | 
| 371 | 371 | Indexer::add($document, $this->getDocumentRepository()); | 
| 372 | 372 |          } else { | 
| @@ -414,13 +414,13 @@ discard block | ||
| 414 | 414 | $query = $solr->service->createCoreAdmin(); | 
| 415 | 415 | $action = $query->createUnload(); | 
| 416 | 416 | $action->setCore($resArray['core']); | 
| 417 | - $action->setDeleteDataDir(true); | |
| 418 | - $action->setDeleteIndex(true); | |
| 419 | - $action->setDeleteInstanceDir(true); | |
| 417 | + $action->setDeleteDataDir(TRUE); | |
| 418 | + $action->setDeleteIndex(TRUE); | |
| 419 | + $action->setDeleteInstanceDir(TRUE); | |
| 420 | 420 | $query->setAction($action); | 
| 421 | 421 |                      try { | 
| 422 | 422 | $response = $solr->service->coreAdmin($query); | 
| 423 | -                        if ($response->getWasSuccessful() == false) { | |
| 423 | +                        if ($response->getWasSuccessful() == FALSE) { | |
| 424 | 424 |                              $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr'); | 
| 425 | 425 | } | 
| 426 | 426 |                      } catch (\Exception $e) { | 
| @@ -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; | 
| @@ -20,8 +20,7 @@ | ||
| 20 | 20 | * | 
| 21 | 21 | * @access public | 
| 22 | 22 | */ | 
| 23 | -class KitodoProductionHacks | |
| 24 | -{ | |
| 23 | +class KitodoProductionHacks { | |
| 25 | 24 | /** | 
| 26 | 25 | * Hook for \Kitodo\Dlf\Common\MetsDocument::establishRecordId() | 
| 27 | 26 | * When using Kitodo.Production the record identifier is saved only in MODS, but not | 
| @@ -24,8 +24,7 @@ discard block | ||
| 24 | 24 | * | 
| 25 | 25 | * @access public | 
| 26 | 26 | */ | 
| 27 | -class ConfigurationForm | |
| 28 | -{ | |
| 27 | +class ConfigurationForm { | |
| 29 | 28 | |
| 30 | 29 | /** | 
| 31 | 30 | * Check if a connection to a Solr server could be established with the given credentials. | 
| @@ -60,8 +59,7 @@ discard block | ||
| 60 | 59 | * | 
| 61 | 60 | * @return void | 
| 62 | 61 | */ | 
| 63 | - public function __construct() | |
| 64 | -    { | |
| 62 | +    public function __construct() { | |
| 65 | 63 | // Load backend localization file. | 
| 66 | 64 |          Helper::getLanguageService()->includeLLFile('EXT:dlf/Resources/Private/Language/locallang_be.xlf'); | 
| 67 | 65 | } |