@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | class OaiPmhTest extends FunctionalTestCase |
| 16 | 16 | { |
| 17 | - protected $disableJsonWrappedResponse = true; |
|
| 17 | + protected $disableJsonWrappedResponse = TRUE; |
|
| 18 | 18 | |
| 19 | 19 | protected $coreExtensionsToLoad = [ |
| 20 | 20 | 'fluid', |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | protected function setUpOaiSolr() |
| 57 | 57 | { |
| 58 | 58 | // Setup Solr only once for all tests in this suite |
| 59 | - static $solr = null; |
|
| 59 | + static $solr = NULL; |
|
| 60 | 60 | |
| 61 | - if ($solr === null) { |
|
| 61 | + if ($solr === NULL) { |
|
| 62 | 62 | $coreName = Solr::createCore(); |
| 63 | 63 | $solr = Solr::getInstance($coreName); |
| 64 | 64 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | $this->expectExceptionMessage('empty list'); |
| 162 | 162 | |
| 163 | 163 | $oai = Endpoint::build($this->oaiUrl); |
| 164 | - $result = $oai->listRecords('mets', null, (new DateTime())->setDate(1900, 1, 1)); |
|
| 164 | + $result = $oai->listRecords('mets', NULL, (new DateTime())->setDate(1900, 1, 1)); |
|
| 165 | 165 | |
| 166 | 166 | $result->current(); |
| 167 | 167 | } |
@@ -51,15 +51,15 @@ discard block |
||
| 51 | 51 | { |
| 52 | 52 | parent::setUp(); |
| 53 | 53 | |
| 54 | - $this->oaiUrl = $this->baseUrl . 'index.php?id=' . $this->oaiPage; |
|
| 55 | - $this->oaiUrlNoStoragePid = $this->baseUrl . 'index.php?id=' . $this->oaiPageNoStoragePid; |
|
| 54 | + $this->oaiUrl = $this->baseUrl.'index.php?id='.$this->oaiPage; |
|
| 55 | + $this->oaiUrlNoStoragePid = $this->baseUrl.'index.php?id='.$this->oaiPageNoStoragePid; |
|
| 56 | 56 | |
| 57 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.csv'); |
|
| 58 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/metadata.csv'); |
|
| 59 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/libraries.csv'); |
|
| 60 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/pages.csv'); |
|
| 61 | - $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/pages.xml'); |
|
| 62 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/OaiPmh/solrcores.csv'); |
|
| 57 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_1.csv'); |
|
| 58 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/metadata.csv'); |
|
| 59 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/libraries.csv'); |
|
| 60 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/pages.csv'); |
|
| 61 | + $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/pages.xml'); |
|
| 62 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/OaiPmh/solrcores.csv'); |
|
| 63 | 63 | |
| 64 | 64 | $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000); |
| 65 | 65 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $coreName = Solr::createCore(); |
| 76 | 76 | $solr = Solr::getInstance($coreName); |
| 77 | 77 | |
| 78 | - $this->importSolrDocuments($solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json'); |
|
| 78 | + $this->importSolrDocuments($solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json'); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $oaiCoreModel = $this->solrCoreRepository->findByUid(11001); |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | use Phpoaipmh\Exception\OaipmhException; |
| 22 | 22 | use SimpleXMLElement; |
| 23 | 23 | |
| 24 | -class OaiPmhTest extends FunctionalTestCase |
|
| 25 | -{ |
|
| 24 | +class OaiPmhTest extends FunctionalTestCase { |
|
| 26 | 25 | protected $disableJsonWrappedResponse = true; |
| 27 | 26 | |
| 28 | 27 | protected $coreExtensionsToLoad = [ |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | $this->setUpOaiSolr(); |
| 67 | 66 | } |
| 68 | 67 | |
| 69 | - protected function setUpOaiSolr() |
|
| 70 | - { |
|
| 68 | + protected function setUpOaiSolr() { |
|
| 71 | 69 | // Setup Solr only once for all tests in this suite |
| 72 | 70 | static $solr = null; |
| 73 | 71 | |
@@ -87,8 +85,7 @@ discard block |
||
| 87 | 85 | /** |
| 88 | 86 | * @test |
| 89 | 87 | */ |
| 90 | - public function correctlyRespondsOnBadVerb() |
|
| 91 | - { |
|
| 88 | + public function correctlyRespondsOnBadVerb() { |
|
| 92 | 89 | $client = new HttpClient(); |
| 93 | 90 | $response = $client->get($this->baseUrl, [ |
| 94 | 91 | 'query' => [ |
@@ -113,8 +110,7 @@ discard block |
||
| 113 | 110 | /** |
| 114 | 111 | * @test |
| 115 | 112 | */ |
| 116 | - public function canIdentify() |
|
| 117 | - { |
|
| 113 | + public function canIdentify() { |
|
| 118 | 114 | $oai = Endpoint::build($this->oaiUrl); |
| 119 | 115 | $identity = $oai->identify(); |
| 120 | 116 | |
@@ -127,8 +123,7 @@ discard block |
||
| 127 | 123 | /** |
| 128 | 124 | * @test |
| 129 | 125 | */ |
| 130 | - public function identifyGivesFallbackDatestampWhenNoDocuments() |
|
| 131 | - { |
|
| 126 | + public function identifyGivesFallbackDatestampWhenNoDocuments() { |
|
| 132 | 127 | $oai = Endpoint::build($this->oaiUrlNoStoragePid); |
| 133 | 128 | $identity = $oai->identify(); |
| 134 | 129 | |
@@ -138,8 +133,7 @@ discard block |
||
| 138 | 133 | /** |
| 139 | 134 | * @test |
| 140 | 135 | */ |
| 141 | - public function canListMetadataFormats() |
|
| 142 | - { |
|
| 136 | + public function canListMetadataFormats() { |
|
| 143 | 137 | $oai = Endpoint::build($this->oaiUrl); |
| 144 | 138 | $formats = $oai->listMetadataFormats(); |
| 145 | 139 | |
@@ -154,8 +148,7 @@ discard block |
||
| 154 | 148 | /** |
| 155 | 149 | * @test |
| 156 | 150 | */ |
| 157 | - public function canListRecords() |
|
| 158 | - { |
|
| 151 | + public function canListRecords() { |
|
| 159 | 152 | $oai = Endpoint::build($this->oaiUrl); |
| 160 | 153 | $result = $oai->listRecords('mets'); |
| 161 | 154 | |
@@ -168,8 +161,7 @@ discard block |
||
| 168 | 161 | /** |
| 169 | 162 | * @test |
| 170 | 163 | */ |
| 171 | - public function noRecordsUntil1900() |
|
| 172 | - { |
|
| 164 | + public function noRecordsUntil1900() { |
|
| 173 | 165 | $this->expectException(OaipmhException::class); |
| 174 | 166 | $this->expectExceptionMessage('empty list'); |
| 175 | 167 | |
@@ -182,8 +174,7 @@ discard block |
||
| 182 | 174 | /** |
| 183 | 175 | * @test |
| 184 | 176 | */ |
| 185 | - public function canUseResumptionToken() |
|
| 186 | - { |
|
| 177 | + public function canUseResumptionToken() { |
|
| 187 | 178 | // NOTE: cursor and expirationDate are optional by the specification, |
| 188 | 179 | // but we include them in our implementation |
| 189 | 180 | |
@@ -241,8 +232,7 @@ discard block |
||
| 241 | 232 | /** |
| 242 | 233 | * @test |
| 243 | 234 | */ |
| 244 | - public function noResumptionTokenForCompleteList() |
|
| 245 | - { |
|
| 235 | + public function noResumptionTokenForCompleteList() { |
|
| 246 | 236 | $client = new HttpClient(); |
| 247 | 237 | |
| 248 | 238 | foreach (['ListIdentifiers', 'ListRecords'] as $verb) { |
@@ -264,8 +254,7 @@ discard block |
||
| 264 | 254 | /** |
| 265 | 255 | * @test |
| 266 | 256 | */ |
| 267 | - public function canListAndResumeIdentifiers() |
|
| 268 | - { |
|
| 257 | + public function canListAndResumeIdentifiers() { |
|
| 269 | 258 | $oai = Endpoint::build($this->oaiUrl); |
| 270 | 259 | $result = $oai->listIdentifiers('mets'); |
| 271 | 260 | |
@@ -278,18 +267,15 @@ discard block |
||
| 278 | 267 | self::assertEquals('oai:de:slub-dresden:db:id-476248086', $record->identifier); |
| 279 | 268 | } |
| 280 | 269 | |
| 281 | - protected function parseUtc(string $dateTime) |
|
| 282 | - { |
|
| 270 | + protected function parseUtc(string $dateTime) { |
|
| 283 | 271 | return DateTime::createFromFormat('Y-m-d\TH:i:s\Z', $dateTime); |
| 284 | 272 | } |
| 285 | 273 | |
| 286 | - protected function assertUtcDateString(string $dateTime) |
|
| 287 | - { |
|
| 274 | + protected function assertUtcDateString(string $dateTime) { |
|
| 288 | 275 | self::assertInstanceOf(DateTime::class, $this->parseUtc($dateTime)); |
| 289 | 276 | } |
| 290 | 277 | |
| 291 | - protected function assertInFuture(string $dateTime) |
|
| 292 | - { |
|
| 278 | + protected function assertInFuture(string $dateTime) { |
|
| 293 | 279 | self::assertGreaterThan(new DateTime(), $this->parseUtc($dateTime)); |
| 294 | 280 | } |
| 295 | 281 | } |
@@ -48,8 +48,8 @@ |
||
| 48 | 48 | |
| 49 | 49 | $settingsParts = explode("/", $model); |
| 50 | 50 | $fileName = end($settingsParts); |
| 51 | - $path = substr($model, 0, strrpos($model, $fileName)); |
|
| 52 | - $modelSettings = $path . "metadata/" . $fileName . "_viewer"; |
|
| 51 | + $path = substr($model, 0, strrpos($model, $fileName)); |
|
| 52 | + $modelSettings = $path."metadata/".$fileName."_viewer"; |
|
| 53 | 53 | |
| 54 | 54 | if (!empty($modelConverted)) { |
| 55 | 55 | $model = $modelConverted; |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | * |
| 20 | 20 | * @access public |
| 21 | 21 | */ |
| 22 | -class View3DController extends AbstractController |
|
| 23 | -{ |
|
| 22 | +class View3DController extends AbstractController { |
|
| 24 | 23 | /** |
| 25 | 24 | * @access public |
| 26 | 25 | * |
@@ -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 | * |
@@ -16,67 +16,67 @@ |
||
| 16 | 16 | // Plugin "audioplayer". |
| 17 | 17 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_audioplayer'] = 'layout,select_key,pages,recursive'; |
| 18 | 18 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_audioplayer'] = 'pi_flexform'; |
| 19 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/AudioPlayer.xml'); |
|
| 19 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_audioplayer', 'FILE:EXT:'.'dlf/Configuration/FlexForms/AudioPlayer.xml'); |
|
| 20 | 20 | // Plugin "basket". |
| 21 | 21 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_basket'] = 'layout,select_key,pages,recursive'; |
| 22 | 22 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_basket'] = 'pi_flexform'; |
| 23 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Basket.xml'); |
|
| 23 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_basket', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Basket.xml'); |
|
| 24 | 24 | // Plugin "calendar". |
| 25 | 25 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_calendar'] = 'layout,select_key,pages,recursive'; |
| 26 | 26 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_calendar'] = 'pi_flexform'; |
| 27 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Calendar.xml'); |
|
| 27 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_calendar', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Calendar.xml'); |
|
| 28 | 28 | // Plugin "collection". |
| 29 | 29 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_collection'] = 'layout,select_key,pages,recursive'; |
| 30 | 30 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_collection'] = 'pi_flexform'; |
| 31 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Collection.xml'); |
|
| 31 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_collection', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Collection.xml'); |
|
| 32 | 32 | // Plugin "feeds". |
| 33 | 33 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_feeds'] = 'layout,select_key,pages,recursive'; |
| 34 | 34 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_feeds'] = 'pi_flexform'; |
| 35 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Feeds.xml'); |
|
| 35 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_feeds', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Feeds.xml'); |
|
| 36 | 36 | // Plugin "listview". |
| 37 | 37 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_listview'] = 'layout,select_key,pages,recursive'; |
| 38 | 38 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_listview'] = 'pi_flexform'; |
| 39 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/ListView.xml'); |
|
| 39 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_listview', 'FILE:EXT:'.'dlf/Configuration/FlexForms/ListView.xml'); |
|
| 40 | 40 | // Plugin "metadata". |
| 41 | 41 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_metadata'] = 'layout,select_key,pages,recursive'; |
| 42 | 42 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_metadata'] = 'pi_flexform'; |
| 43 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Metadata.xml'); |
|
| 43 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_metadata', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Metadata.xml'); |
|
| 44 | 44 | // Plugin "navigation". |
| 45 | 45 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_navigation'] = 'layout,select_key,pages,recursive'; |
| 46 | 46 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_navigation'] = 'pi_flexform'; |
| 47 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Navigation.xml'); |
|
| 47 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_navigation', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Navigation.xml'); |
|
| 48 | 48 | // Plugin "oaipmh". |
| 49 | 49 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_oaipmh'] = 'layout,select_key,pages,recursive'; |
| 50 | 50 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_oaipmh'] = 'pi_flexform'; |
| 51 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/OaiPmh.xml'); |
|
| 51 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_oaipmh', 'FILE:EXT:'.'dlf/Configuration/FlexForms/OaiPmh.xml'); |
|
| 52 | 52 | // Plugin "pagegrid". |
| 53 | 53 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pagegrid'] = 'layout,select_key,pages,recursive'; |
| 54 | 54 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pagegrid'] = 'pi_flexform'; |
| 55 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/PageGrid.xml'); |
|
| 55 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pagegrid', 'FILE:EXT:'.'dlf/Configuration/FlexForms/PageGrid.xml'); |
|
| 56 | 56 | // Plugin "pageview". |
| 57 | 57 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_pageview'] = 'layout,select_key,pages,recursive'; |
| 58 | 58 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_pageview'] = 'pi_flexform'; |
| 59 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/PageView.xml'); |
|
| 59 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_pageview', 'FILE:EXT:'.'dlf/Configuration/FlexForms/PageView.xml'); |
|
| 60 | 60 | // Plugin "search". |
| 61 | 61 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_search'] = 'layout,select_key,pages,recursive'; |
| 62 | 62 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_search'] = 'pi_flexform'; |
| 63 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Search.xml'); |
|
| 63 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_search', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Search.xml'); |
|
| 64 | 64 | // Plugin "statistics". |
| 65 | 65 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_statistics'] = 'layout,select_key,pages,recursive'; |
| 66 | 66 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_statistics'] = 'pi_flexform'; |
| 67 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Statistics.xml'); |
|
| 67 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_statistics', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Statistics.xml'); |
|
| 68 | 68 | // Plugin "tableofcontents". |
| 69 | 69 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_tableofcontents'] = 'layout,select_key,pages,recursive'; |
| 70 | 70 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_tableofcontents'] = 'pi_flexform'; |
| 71 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/TableOfContents.xml'); |
|
| 71 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_tableofcontents', 'FILE:EXT:'.'dlf/Configuration/FlexForms/TableOfContents.xml'); |
|
| 72 | 72 | // Plugin "toolbox". |
| 73 | 73 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_toolbox'] = 'layout,select_key,pages,recursive'; |
| 74 | 74 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_toolbox'] = 'pi_flexform'; |
| 75 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/Toolbox.xml'); |
|
| 75 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_toolbox', 'FILE:EXT:'.'dlf/Configuration/FlexForms/Toolbox.xml'); |
|
| 76 | 76 | // Plugin "view3d". |
| 77 | 77 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['dlf_view3d'] = 'layout,select_key,pages,recursive'; |
| 78 | 78 | $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['dlf_view3d'] = 'pi_flexform'; |
| 79 | -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_view3d', 'FILE:EXT:' . 'dlf/Configuration/FlexForms/View3D.xml'); |
|
| 79 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('dlf_view3d', 'FILE:EXT:'.'dlf/Configuration/FlexForms/View3D.xml'); |
|
| 80 | 80 | |
| 81 | 81 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( |
| 82 | 82 | 'Kitodo.Dlf', |
@@ -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 | } |
@@ -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 | * |
@@ -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) |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | ) { |
| 174 | 174 | // Get current configuration. |
| 175 | 175 | $result = $queryBuilder |
| 176 | - ->select($table . '.index_autocomplete AS index_autocomplete') |
|
| 176 | + ->select($table.'.index_autocomplete AS index_autocomplete') |
|
| 177 | 177 | ->from($table) |
| 178 | 178 | ->where( |
| 179 | - $queryBuilder->expr()->eq($table . '.uid', (int) $id), |
|
| 179 | + $queryBuilder->expr()->eq($table.'.uid', (int) $id), |
|
| 180 | 180 | Helper::whereExpression($table) |
| 181 | 181 | ) |
| 182 | 182 | ->setMaxResults(1) |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | if ($solr->ready) { |
| 252 | 252 | // Delete Solr document. |
| 253 | 253 | $updateQuery = $solr->service->createUpdate(); |
| 254 | - $updateQuery->addDeleteQuery('uid:' . (int) $id); |
|
| 254 | + $updateQuery->addDeleteQuery('uid:'.(int) $id); |
|
| 255 | 255 | $updateQuery->addCommit(); |
| 256 | 256 | $solr->service->update($updateQuery); |
| 257 | 257 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $document->setCurrentDocument($doc); |
| 264 | 264 | Indexer::add($document, $this->getDocumentRepository()); |
| 265 | 265 | } else { |
| 266 | - $this->logger->error('Failed to re-index document with UID ' . (string) $id); |
|
| 266 | + $this->logger->error('Failed to re-index document with UID '.(string) $id); |
|
| 267 | 267 | } |
| 268 | 268 | } |
| 269 | 269 | } |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | if ($solr->ready) { |
| 331 | 331 | // Delete Solr document. |
| 332 | 332 | $updateQuery = $solr->service->createUpdate(); |
| 333 | - $updateQuery->addDeleteQuery('uid:' . (int) $id); |
|
| 333 | + $updateQuery->addDeleteQuery('uid:'.(int) $id); |
|
| 334 | 334 | $updateQuery->addCommit(); |
| 335 | 335 | $solr->service->update($updateQuery); |
| 336 | 336 | if ($command == 'delete') { |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | $document->setCurrentDocument($doc); |
| 346 | 346 | Indexer::add($document, $this->getDocumentRepository()); |
| 347 | 347 | } else { |
| 348 | - $this->logger->error('Failed to re-index document with UID ' . (string) $id); |
|
| 348 | + $this->logger->error('Failed to re-index document with UID '.(string) $id); |
|
| 349 | 349 | } |
| 350 | 350 | break; |
| 351 | 351 | } |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | // Nothing to do here. |
| 397 | 397 | } |
| 398 | 398 | } |
| 399 | - $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr'); |
|
| 399 | + $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr'); |
|
| 400 | 400 | } |
| 401 | 401 | } |
| 402 | 402 | } |
@@ -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 | /** |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | } else { |
| 259 | 259 | // Reindex document. |
| 260 | 260 | $document = $this->getDocumentRepository()->findByUid((int) $id); |
| 261 | - $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], true); |
|
| 262 | - if ($document !== null && $doc !== null) { |
|
| 261 | + $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], TRUE); |
|
| 262 | + if ($document !== NULL && $doc !== NULL) { |
|
| 263 | 263 | $document->setCurrentDocument($doc); |
| 264 | 264 | Indexer::add($document, $this->getDocumentRepository()); |
| 265 | 265 | } else { |
@@ -340,8 +340,8 @@ discard block |
||
| 340 | 340 | case 'undelete': |
| 341 | 341 | // Reindex document. |
| 342 | 342 | $document = $this->getDocumentRepository()->findByUid((int) $id); |
| 343 | - $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], true); |
|
| 344 | - if ($document !== null && $doc !== null) { |
|
| 343 | + $doc = AbstractDocument::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], TRUE); |
|
| 344 | + if ($document !== NULL && $doc !== NULL) { |
|
| 345 | 345 | $document->setCurrentDocument($doc); |
| 346 | 346 | Indexer::add($document, $this->getDocumentRepository()); |
| 347 | 347 | } else { |
@@ -383,9 +383,9 @@ discard block |
||
| 383 | 383 | $query = $solr->service->createCoreAdmin(); |
| 384 | 384 | $action = $query->createUnload(); |
| 385 | 385 | $action->setCore($resArray['core']); |
| 386 | - $action->setDeleteDataDir(true); |
|
| 387 | - $action->setDeleteIndex(true); |
|
| 388 | - $action->setDeleteInstanceDir(true); |
|
| 386 | + $action->setDeleteDataDir(TRUE); |
|
| 387 | + $action->setDeleteIndex(TRUE); |
|
| 388 | + $action->setDeleteInstanceDir(TRUE); |
|
| 389 | 389 | $query->setAction($action); |
| 390 | 390 | try { |
| 391 | 391 | $response = $solr->service->coreAdmin($query); |
@@ -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 |