We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -268,10 +268,10 @@ |
||
| 268 | 268 | 'readOnly' => 1, |
| 269 | 269 | 'fieldControl' => [ |
| 270 | 270 | 'elementBrowser' => [ |
| 271 | - 'disabled' => true |
|
| 271 | + 'disabled' => TRUE |
|
| 272 | 272 | ] |
| 273 | 273 | ], |
| 274 | - 'hideDeleteIcon' => true |
|
| 274 | + 'hideDeleteIcon' => TRUE |
|
| 275 | 275 | ], |
| 276 | 276 | ], |
| 277 | 277 | 'volume' => [ |
@@ -14,19 +14,19 @@ |
||
| 14 | 14 | } |
| 15 | 15 | // Define constants. |
| 16 | 16 | if (!defined('DEVLOG_SEVERITY_OK')) { |
| 17 | - define ('DEVLOG_SEVERITY_OK', -1); |
|
| 17 | + define('DEVLOG_SEVERITY_OK', -1); |
|
| 18 | 18 | } |
| 19 | 19 | if (!defined('DEVLOG_SEVERITY_INFO')) { |
| 20 | - define ('DEVLOG_SEVERITY_INFO', 0); |
|
| 20 | + define('DEVLOG_SEVERITY_INFO', 0); |
|
| 21 | 21 | } |
| 22 | 22 | if (!defined('DEVLOG_SEVERITY_NOTICE')) { |
| 23 | - define ('DEVLOG_SEVERITY_NOTICE', 1); |
|
| 23 | + define('DEVLOG_SEVERITY_NOTICE', 1); |
|
| 24 | 24 | } |
| 25 | 25 | if (!defined('DEVLOG_SEVERITY_WARNING')) { |
| 26 | - define ('DEVLOG_SEVERITY_WARNING', 2); |
|
| 26 | + define('DEVLOG_SEVERITY_WARNING', 2); |
|
| 27 | 27 | } |
| 28 | 28 | if (!defined('DEVLOG_SEVERITY_ERROR')) { |
| 29 | - define ('DEVLOG_SEVERITY_ERROR', 3); |
|
| 29 | + define('DEVLOG_SEVERITY_ERROR', 3); |
|
| 30 | 30 | } |
| 31 | 31 | // Register plugins. |
| 32 | 32 | \Kitodo\Dlf\Hooks\ExtensionManagementUtility::addPItoST43($_EXTKEY, \Kitodo\Dlf\Plugin\AudioPlayer::class, '_audioplayer', 'list_type', TRUE); |
@@ -27,13 +27,11 @@ discard block |
||
| 27 | 27 | /** |
| 28 | 28 | * Reindex a collection into database and solr. |
| 29 | 29 | */ |
| 30 | -class ReindexCommand extends Command |
|
| 31 | -{ |
|
| 30 | +class ReindexCommand extends Command { |
|
| 32 | 31 | /** |
| 33 | 32 | * Configure the command by defining the name, options and arguments |
| 34 | 33 | */ |
| 35 | - public function configure() |
|
| 36 | - { |
|
| 34 | + public function configure() { |
|
| 37 | 35 | $this |
| 38 | 36 | ->setDescription('Reindex a collection into database and solr.') |
| 39 | 37 | ->setHelp('') |
@@ -75,8 +73,7 @@ discard block |
||
| 75 | 73 | * @param InputInterface $input |
| 76 | 74 | * @param OutputInterface $output |
| 77 | 75 | */ |
| 78 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 79 | - { |
|
| 76 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 80 | 77 | // Make sure the _cli_ user is loaded |
| 81 | 78 | Bootstrap::getInstance()->initializeBackendAuthentication(); |
| 82 | 79 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | ->setHelp('') |
| 40 | 40 | ->addOption( |
| 41 | 41 | 'dry-run', |
| 42 | - null, |
|
| 42 | + NULL, |
|
| 43 | 43 | InputOption::VALUE_NONE, |
| 44 | 44 | 'If this option is set, the files will not actually be processed but the location URI is shown.' |
| 45 | 45 | ) |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // Make sure the _cli_ user is loaded |
| 81 | 81 | Bootstrap::getInstance()->initializeBackendAuthentication(); |
| 82 | 82 | |
| 83 | - $dryRun = $input->getOption('dry-run') != false ? true : false; |
|
| 83 | + $dryRun = $input->getOption('dry-run') != FALSE ? TRUE : FALSE; |
|
| 84 | 84 | |
| 85 | 85 | $io = new SymfonyStyle($input, $output); |
| 86 | 86 | $io->title($this->getDescription()); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $documents = $this->getAllDocuments($startingPoint); |
| 126 | 126 | } else { |
| 127 | 127 | // coll may be a single integer, a list of integer |
| 128 | - if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), true)))) { |
|
| 128 | + if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), TRUE)))) { |
|
| 129 | 129 | $io->error('ERROR: "' . $input->getOption('coll') . '" is not a valid list of collection UIDs for --coll|-c.'); |
| 130 | 130 | exit(1); |
| 131 | 131 | } |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $queryBuilder->expr()->in( |
| 231 | 231 | 'tx_dlf_collections_join.uid', |
| 232 | 232 | $queryBuilder->createNamedParameter( |
| 233 | - GeneralUtility::intExplode(',', $collIds, true), |
|
| 233 | + GeneralUtility::intExplode(',', $collIds, TRUE), |
|
| 234 | 234 | Connection::PARAM_INT_ARRAY |
| 235 | 235 | ) |
| 236 | 236 | ), |
@@ -226,23 +226,23 @@ discard block |
||
| 226 | 226 | ) |
| 227 | 227 | ) |
| 228 | 228 | -> where( |
| 229 | - $queryBuilder->expr()->andX( |
|
| 230 | - $queryBuilder->expr()->in( |
|
| 231 | - 'tx_dlf_collections_join.uid', |
|
| 232 | - $queryBuilder->createNamedParameter( |
|
| 233 | - GeneralUtility::intExplode(',', $collIds, true), |
|
| 234 | - Connection::PARAM_INT_ARRAY |
|
| 235 | - ) |
|
| 236 | - ), |
|
| 237 | - $queryBuilder->expr()->eq( |
|
| 238 | - 'tx_dlf_collections_join.pid', |
|
| 239 | - $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT) |
|
| 240 | - ), |
|
| 241 | - $queryBuilder->expr()->eq( |
|
| 242 | - 'tx_dlf_relations_joins.ident', |
|
| 243 | - $queryBuilder->createNamedParameter('docs_colls') |
|
| 244 | - ) |
|
| 245 | - ) |
|
| 229 | + $queryBuilder->expr()->andX( |
|
| 230 | + $queryBuilder->expr()->in( |
|
| 231 | + 'tx_dlf_collections_join.uid', |
|
| 232 | + $queryBuilder->createNamedParameter( |
|
| 233 | + GeneralUtility::intExplode(',', $collIds, true), |
|
| 234 | + Connection::PARAM_INT_ARRAY |
|
| 235 | + ) |
|
| 236 | + ), |
|
| 237 | + $queryBuilder->expr()->eq( |
|
| 238 | + 'tx_dlf_collections_join.pid', |
|
| 239 | + $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT) |
|
| 240 | + ), |
|
| 241 | + $queryBuilder->expr()->eq( |
|
| 242 | + 'tx_dlf_relations_joins.ident', |
|
| 243 | + $queryBuilder->createNamedParameter('docs_colls') |
|
| 244 | + ) |
|
| 245 | + ) |
|
| 246 | 246 | ) |
| 247 | 247 | ->groupBy('tx_dlf_documents.uid') |
| 248 | 248 | ->orderBy('tx_dlf_documents.uid', 'ASC') |
@@ -274,10 +274,10 @@ discard block |
||
| 274 | 274 | ->select('uid') |
| 275 | 275 | ->from('tx_dlf_documents') |
| 276 | 276 | -> where( |
| 277 | - $queryBuilder->expr()->eq( |
|
| 278 | - 'tx_dlf_documents.pid', |
|
| 279 | - $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT) |
|
| 280 | - ) |
|
| 277 | + $queryBuilder->expr()->eq( |
|
| 278 | + 'tx_dlf_documents.pid', |
|
| 279 | + $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT) |
|
| 280 | + ) |
|
| 281 | 281 | ) |
| 282 | 282 | ->orderBy('tx_dlf_documents.uid', 'ASC') |
| 283 | 283 | ->execute(); |
@@ -87,17 +87,17 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | $startingPoint = 0; |
| 89 | 89 | if (MathUtility::canBeInterpretedAsInteger($input->getOption('pid'))) { |
| 90 | - $startingPoint = MathUtility::forceIntegerInRange((int)$input->getOption('pid'), 0); |
|
| 90 | + $startingPoint = MathUtility::forceIntegerInRange((int) $input->getOption('pid'), 0); |
|
| 91 | 91 | } |
| 92 | 92 | if ($startingPoint == 0) { |
| 93 | - $io->error('ERROR: No valid PID (' . $startingPoint . ') given.'); |
|
| 93 | + $io->error('ERROR: No valid PID ('.$startingPoint.') given.'); |
|
| 94 | 94 | exit(1); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | if ($input->getOption('solr')) { |
| 98 | 98 | $allSolrCores = $this->getSolrCores($startingPoint); |
| 99 | 99 | if (MathUtility::canBeInterpretedAsInteger($input->getOption('solr'))) { |
| 100 | - $solrCoreUid = MathUtility::forceIntegerInRange((int)$input->getOption('solr'), 0); |
|
| 100 | + $solrCoreUid = MathUtility::forceIntegerInRange((int) $input->getOption('solr'), 0); |
|
| 101 | 101 | } else { |
| 102 | 102 | $solrCoreName = $input->getOption('solr'); |
| 103 | 103 | $solrCoreUid = $allSolrCores[$solrCoreName]; |
@@ -105,13 +105,13 @@ discard block |
||
| 105 | 105 | // Abort if solrCoreUid is empty or not in the array of allowed solr cores. |
| 106 | 106 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
| 107 | 107 | foreach ($allSolrCores as $index_name => $uid) { |
| 108 | - $output_solrCores .= ' ' . $uid . ' : ' . $index_name ."\n"; |
|
| 108 | + $output_solrCores .= ' '.$uid.' : '.$index_name."\n"; |
|
| 109 | 109 | } |
| 110 | 110 | if (empty($output_solrCores)) { |
| 111 | - $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "No valid cores found on PID " . $startingPoint .".\n" . $output_solrCores); |
|
| 111 | + $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."No valid cores found on PID ".$startingPoint.".\n".$output_solrCores); |
|
| 112 | 112 | exit(1); |
| 113 | 113 | } else { |
| 114 | - $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . $output_solrCores); |
|
| 114 | + $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".$output_solrCores); |
|
| 115 | 115 | exit(1); |
| 116 | 116 | } |
| 117 | 117 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | } else { |
| 127 | 127 | // coll may be a single integer, a list of integer |
| 128 | 128 | if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), true)))) { |
| 129 | - $io->error('ERROR: "' . $input->getOption('coll') . '" is not a valid list of collection UIDs for --coll|-c.'); |
|
| 129 | + $io->error('ERROR: "'.$input->getOption('coll').'" is not a valid list of collection UIDs for --coll|-c.'); |
|
| 130 | 130 | exit(1); |
| 131 | 131 | } |
| 132 | 132 | $documents = $this->getDocumentsToProceed($input->getOption('coll'), $startingPoint); |
@@ -136,10 +136,10 @@ discard block |
||
| 136 | 136 | $doc = Document::getInstance($document, $startingPoint, TRUE); |
| 137 | 137 | if ($doc->ready) { |
| 138 | 138 | if ($dryRun) { |
| 139 | - $io->writeln('DRY RUN: Would index ' . $id . '/' . count($documents) . ' ' . $doc->uid . ' ' . $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.'); |
|
| 139 | + $io->writeln('DRY RUN: Would index '.$id.'/'.count($documents).' '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.'); |
|
| 140 | 140 | } else { |
| 141 | 141 | if ($io->isVerbose()) { |
| 142 | - $io->writeln(date('Y-m-d H:i:s') . ' ' . $id . '/' . count($documents) . ' ' . $doc->uid . ' ' . $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.'); |
|
| 142 | + $io->writeln(date('Y-m-d H:i:s').' '.$id.'/'.count($documents).' '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.'); |
|
| 143 | 143 | } |
| 144 | 144 | // ...and save it to the database... |
| 145 | 145 | if (!$doc->save($startingPoint, $solrCoreUid)) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ->getQueryBuilderForTable('tx_dlf_solrcores'); |
| 170 | 170 | |
| 171 | 171 | $solrCores = []; |
| 172 | - $pageId = (int)$pageId; |
|
| 172 | + $pageId = (int) $pageId; |
|
| 173 | 173 | $result = $queryBuilder |
| 174 | 174 | ->select('uid', 'index_name') |
| 175 | 175 | ->from('tx_dlf_solrcores') |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | ->getQueryBuilderForTable('tx_dlf_documents'); |
| 204 | 204 | |
| 205 | 205 | $documents = []; |
| 206 | - $pageId = (int)$pageId; |
|
| 206 | + $pageId = (int) $pageId; |
|
| 207 | 207 | $result = $queryBuilder |
| 208 | 208 | ->select('tx_dlf_documents.uid') |
| 209 | 209 | ->from('tx_dlf_documents') |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | ->getQueryBuilderForTable('tx_dlf_documents'); |
| 270 | 270 | |
| 271 | 271 | $documents = []; |
| 272 | - $pageId = (int)$pageId; |
|
| 272 | + $pageId = (int) $pageId; |
|
| 273 | 273 | $result = $queryBuilder |
| 274 | 274 | ->select('uid') |
| 275 | 275 | ->from('tx_dlf_documents') |
@@ -26,13 +26,11 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * Index single document into database and solr. |
| 28 | 28 | */ |
| 29 | -class IndexCommand extends Command |
|
| 30 | -{ |
|
| 29 | +class IndexCommand extends Command { |
|
| 31 | 30 | /** |
| 32 | 31 | * Configure the command by defining the name, options and arguments |
| 33 | 32 | */ |
| 34 | - public function configure() |
|
| 35 | - { |
|
| 33 | + public function configure() { |
|
| 36 | 34 | $this |
| 37 | 35 | ->setDescription('Index single document into database and solr.') |
| 38 | 36 | ->setHelp('') |
@@ -68,8 +66,7 @@ discard block |
||
| 68 | 66 | * @param InputInterface $input |
| 69 | 67 | * @param OutputInterface $output |
| 70 | 68 | */ |
| 71 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 72 | - { |
|
| 69 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 73 | 70 | // Make sure the _cli_ user is loaded |
| 74 | 71 | Bootstrap::getInstance()->initializeBackendAuthentication(); |
| 75 | 72 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | ->setHelp('') |
| 39 | 39 | ->addOption( |
| 40 | 40 | 'dry-run', |
| 41 | - null, |
|
| 41 | + NULL, |
|
| 42 | 42 | InputOption::VALUE_NONE, |
| 43 | 43 | 'If this option is set, the files will not actually be processed but the location URI is shown.' |
| 44 | 44 | ) |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | // Make sure the _cli_ user is loaded |
| 74 | 74 | Bootstrap::getInstance()->initializeBackendAuthentication(); |
| 75 | 75 | |
| 76 | - $dryRun = $input->getOption('dry-run') != false ? true : false; |
|
| 76 | + $dryRun = $input->getOption('dry-run') != FALSE ? TRUE : FALSE; |
|
| 77 | 77 | |
| 78 | 78 | $io = new SymfonyStyle($input, $output); |
| 79 | 79 | $io->title($this->getDescription()); |
@@ -80,17 +80,17 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $startingPoint = 0; |
| 82 | 82 | if (MathUtility::canBeInterpretedAsInteger($input->getOption('pid'))) { |
| 83 | - $startingPoint = MathUtility::forceIntegerInRange((int)$input->getOption('pid'), 0); |
|
| 83 | + $startingPoint = MathUtility::forceIntegerInRange((int) $input->getOption('pid'), 0); |
|
| 84 | 84 | } |
| 85 | 85 | if ($startingPoint == 0) { |
| 86 | - $io->error('ERROR: No valid PID (' . $startingPoint . ') given.'); |
|
| 86 | + $io->error('ERROR: No valid PID ('.$startingPoint.') given.'); |
|
| 87 | 87 | exit(1); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | if ($input->getOption('solr')) { |
| 91 | 91 | $allSolrCores = $this->getSolrCores($startingPoint); |
| 92 | 92 | if (MathUtility::canBeInterpretedAsInteger($input->getOption('solr'))) { |
| 93 | - $solrCoreUid = MathUtility::forceIntegerInRange((int)$input->getOption('solr'), 0); |
|
| 93 | + $solrCoreUid = MathUtility::forceIntegerInRange((int) $input->getOption('solr'), 0); |
|
| 94 | 94 | } else { |
| 95 | 95 | $solrCoreName = $input->getOption('solr'); |
| 96 | 96 | $solrCoreUid = $allSolrCores[$solrCoreName]; |
@@ -98,13 +98,13 @@ discard block |
||
| 98 | 98 | // Abort if solrCoreUid is empty or not in the array of allowed solr cores. |
| 99 | 99 | if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) { |
| 100 | 100 | foreach ($allSolrCores as $index_name => $uid) { |
| 101 | - $output_solrCores .= ' ' . $uid . ' : ' . $index_name ."\n"; |
|
| 101 | + $output_solrCores .= ' '.$uid.' : '.$index_name."\n"; |
|
| 102 | 102 | } |
| 103 | 103 | if (empty($output_solrCores)) { |
| 104 | - $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "No valid cores found on PID " . $startingPoint .".\n" . $output_solrCores); |
|
| 104 | + $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."No valid cores found on PID ".$startingPoint.".\n".$output_solrCores); |
|
| 105 | 105 | exit(1); |
| 106 | 106 | } else { |
| 107 | - $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . $output_solrCores); |
|
| 107 | + $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".$output_solrCores); |
|
| 108 | 108 | exit(1); |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | if (!MathUtility::canBeInterpretedAsInteger($input->getOption('doc')) |
| 117 | 117 | && !GeneralUtility::isValidUrl($input->getOption('doc'))) { |
| 118 | - $io->error('ERROR: "' . $input->getOption('doc') . '" is not a valid document UID or URL for --doc|-d.'); |
|
| 118 | + $io->error('ERROR: "'.$input->getOption('doc').'" is not a valid document UID or URL for --doc|-d.'); |
|
| 119 | 119 | exit(1); |
| 120 | 120 | } |
| 121 | 121 | |
@@ -123,10 +123,10 @@ discard block |
||
| 123 | 123 | $doc = Document::getInstance($input->getOption('doc'), $startingPoint, TRUE); |
| 124 | 124 | if ($doc->ready) { |
| 125 | 125 | if ($dryRun) { |
| 126 | - $io->section('DRY RUN: Would index ' . $doc->uid . ' '. $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.'); |
|
| 126 | + $io->section('DRY RUN: Would index '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.'); |
|
| 127 | 127 | } else { |
| 128 | 128 | if ($io->isVerbose()) { |
| 129 | - $io->section('Will index ' . $doc->uid . ' ' . $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.'); |
|
| 129 | + $io->section('Will index '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.'); |
|
| 130 | 130 | } |
| 131 | 131 | // ...and save it to the database... |
| 132 | 132 | if (!$doc->save($startingPoint, $solrCoreUid)) { |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | ->getQueryBuilderForTable('tx_dlf_solrcores'); |
| 158 | 158 | |
| 159 | 159 | $solrCores = []; |
| 160 | - $pageId = (int)$pageId; |
|
| 160 | + $pageId = (int) $pageId; |
|
| 161 | 161 | $result = $queryBuilder |
| 162 | 162 | ->select('uid', 'index_name') |
| 163 | 163 | ->from('tx_dlf_solrcores') |
@@ -72,9 +72,9 @@ |
||
| 72 | 72 | $this->template = $this->templateService->getSubpart($this->cObj->fileResource($this->conf['templateFile']), $part); |
| 73 | 73 | } else { |
| 74 | 74 | if (empty($directory)) { |
| 75 | - $templateLocation = 'EXT:'.$this->extKey.'/Resources/Private/Templates/' . Helper::getUnqualifiedClassName(get_class($this)) . '.tmpl'; |
|
| 75 | + $templateLocation = 'EXT:'.$this->extKey.'/Resources/Private/Templates/'.Helper::getUnqualifiedClassName(get_class($this)).'.tmpl'; |
|
| 76 | 76 | } else { |
| 77 | - $templateLocation = 'EXT:'.$this->extKey.'/Resources/Private/Templates/'. $directory . '/' . Helper::getUnqualifiedClassName(get_class($this)) . '.tmpl'; |
|
| 77 | + $templateLocation = 'EXT:'.$this->extKey.'/Resources/Private/Templates/'.$directory.'/'.Helper::getUnqualifiedClassName(get_class($this)).'.tmpl'; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | // Load default template file. |
@@ -558,7 +558,7 @@ |
||
| 558 | 558 | $results = $solr->service->select($selectQuery); |
| 559 | 559 | $facet = $results->getFacetSet(); |
| 560 | 560 | |
| 561 | - $facetCollectionArray = array(); |
|
| 561 | + $facetCollectionArray = array (); |
|
| 562 | 562 | |
| 563 | 563 | // replace everything expect numbers and comma |
| 564 | 564 | $facetCollections = preg_replace('/[^0-9,]/', '', $this->conf['facetCollections']); |
@@ -741,7 +741,7 @@ |
||
| 741 | 741 | ) |
| 742 | 742 | ->from('tx_dlf_collections') |
| 743 | 743 | ->where( |
| 744 | - $queryBuilder->expr()->in('tx_dlf_collections.sys_language_uid', array(-1, 0)), |
|
| 744 | + $queryBuilder->expr()->in('tx_dlf_collections.sys_language_uid', array (-1, 0)), |
|
| 745 | 745 | $queryBuilder->expr()->eq('tx_dlf_collections.pid', intval($this->conf['pages'])), |
| 746 | 746 | $queryBuilder->expr()->neq('tx_dlf_collections.oai_name', ''), |
| 747 | 747 | $where, |
@@ -268,7 +268,7 @@ |
||
| 268 | 268 | ) |
| 269 | 269 | ->from('tx_dlf_solrcores') |
| 270 | 270 | ->where( |
| 271 | - $queryBuilder->expr()->in('tx_dlf_solrcores.pid', array(intval($this->id), 0)), |
|
| 271 | + $queryBuilder->expr()->in('tx_dlf_solrcores.pid', array (intval($this->id), 0)), |
|
| 272 | 272 | Helper::whereExpression('tx_dlf_solrcores') |
| 273 | 273 | ) |
| 274 | 274 | ->execute(); |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | /* @var $xml \SimpleXMLElement */ |
| 483 | 483 | $xml->registerXPathNamespace('mets', 'http://www.loc.gov/METS/'); |
| 484 | 484 | $xpathResult = $xml->xpath('//mets:mets'); |
| 485 | - $documentFormat = ($xpathResult !== false && count($xpathResult)>0) ? 'METS' : null; |
|
| 485 | + $documentFormat = ($xpathResult !== false && count($xpathResult) > 0) ? 'METS' : null; |
|
| 486 | 486 | } else { |
| 487 | 487 | // Try to load file as IIIF resource instead. |
| 488 | 488 | $contentAsJsonArray = json_decode($content, true); |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | return $depth; |
| 750 | 750 | } elseif (array_key_exists('children', $element)) { |
| 751 | 751 | $foundInChildren = $this->getTreeDepth($element['children'], $depth + 1, $logId); |
| 752 | - if ($foundInChildren!==false) { |
|
| 752 | + if ($foundInChildren !== false) { |
|
| 753 | 753 | return $foundInChildren; |
| 754 | 754 | } |
| 755 | 755 | } |
@@ -986,7 +986,7 @@ discard block |
||
| 986 | 986 | ->from('tx_dlf_collections') |
| 987 | 987 | ->where( |
| 988 | 988 | $queryBuilder->expr()->eq('tx_dlf_collections.pid', intval($pid)), |
| 989 | - $queryBuilder->expr()->in('tx_dlf_collections.sys_language_uid', array(-1, 0)), |
|
| 989 | + $queryBuilder->expr()->in('tx_dlf_collections.sys_language_uid', array (-1, 0)), |
|
| 990 | 990 | Helper::whereExpression('tx_dlf_collections') |
| 991 | 991 | ) |
| 992 | 992 | ->execute(); |
@@ -415,9 +415,9 @@ discard block |
||
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | // Create new instance depending on format (METS or IIIF) ... |
| 418 | - $documentFormat = null; |
|
| 419 | - $xml = null; |
|
| 420 | - $iiif = null; |
|
| 418 | + $documentFormat = NULL; |
|
| 419 | + $xml = NULL; |
|
| 420 | + $iiif = NULL; |
|
| 421 | 421 | // Try to get document format from database |
| 422 | 422 | if (MathUtility::canBeInterpretedAsInteger($uid)) { |
| 423 | 423 | /** @var QueryBuilder $queryBuilder */ |
@@ -480,15 +480,15 @@ discard block |
||
| 480 | 480 | libxml_disable_entity_loader($previousValueOfEntityLoader); |
| 481 | 481 | // Reset libxml's error logging. |
| 482 | 482 | libxml_use_internal_errors($libxmlErrors); |
| 483 | - if ($xml !== false) { |
|
| 483 | + if ($xml !== FALSE) { |
|
| 484 | 484 | /* @var $xml \SimpleXMLElement */ |
| 485 | 485 | $xml->registerXPathNamespace('mets', 'http://www.loc.gov/METS/'); |
| 486 | 486 | $xpathResult = $xml->xpath('//mets:mets'); |
| 487 | - $documentFormat = ($xpathResult !== false && count($xpathResult)>0) ? 'METS' : null; |
|
| 487 | + $documentFormat = ($xpathResult !== FALSE && count($xpathResult)>0) ? 'METS' : NULL; |
|
| 488 | 488 | } else { |
| 489 | 489 | // Try to load file as IIIF resource instead. |
| 490 | - $contentAsJsonArray = json_decode($content, true); |
|
| 491 | - if ($contentAsJsonArray !== null) { |
|
| 490 | + $contentAsJsonArray = json_decode($content, TRUE); |
|
| 491 | + if ($contentAsJsonArray !== NULL) { |
|
| 492 | 492 | // Load plugin configuration. |
| 493 | 493 | $conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); |
| 494 | 494 | IiifHelper::setUrlReader(IiifUrlReader::getInstance()); |
@@ -752,12 +752,12 @@ discard block |
||
| 752 | 752 | return $depth; |
| 753 | 753 | } elseif (array_key_exists('children', $element)) { |
| 754 | 754 | $foundInChildren = $this->getTreeDepth($element['children'], $depth + 1, $logId); |
| 755 | - if ($foundInChildren!==false) { |
|
| 755 | + if ($foundInChildren!==FALSE) { |
|
| 756 | 756 | return $foundInChildren; |
| 757 | 757 | } |
| 758 | 758 | } |
| 759 | 759 | } |
| 760 | - return false; |
|
| 760 | + return FALSE; |
|
| 761 | 761 | } |
| 762 | 762 | |
| 763 | 763 | /** |