Completed
Push — master ( 139eb5...89aec4 )
by
unknown
20s queued 16s
created
Classes/Eid/PageViewProxy.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
  * @subpackage dlf
35 35
  * @access public
36 36
  */
37
-class PageViewProxy
38
-{
37
+class PageViewProxy {
39 38
     /**
40 39
      * @var RequestFactory
41 40
      */
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      */
47 46
     protected $extConf;
48 47
 
49
-    public function __construct()
50
-    {
48
+    public function __construct() {
51 49
         $this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
52 50
         $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
53 51
     }
@@ -173,8 +171,7 @@  discard block
 block discarded – undo
173 171
      * @param ServerRequestInterface $request
174 172
      * @return ResponseInterface
175 173
      */
176
-    public function main(ServerRequestInterface $request)
177
-    {
174
+    public function main(ServerRequestInterface $request) {
178 175
         switch ($request->getMethod()) {
179 176
             case 'OPTIONS':
180 177
                 return $this->handleOptions($request);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,11 +140,11 @@
 block discarded – undo
140 140
                 // For performance, don't download content up-front. Rather, we'll
141 141
                 // download and upload simultaneously.
142 142
                 // https://docs.guzzlephp.org/en/6.5/request-options.html#stream
143
-                'stream' => true,
143
+                'stream' => TRUE,
144 144
 
145 145
                 // Don't throw exceptions when a non-success status code is
146 146
                 // received. We handle these manually.
147
-                'http_errors' => false,
147
+                'http_errors' => FALSE,
148 148
             ]);
149 149
         } catch (\Exception $e) {
150 150
             return new JsonResponse(['message' => 'Could not fetch resource of given URL.'], 500);
Please login to merge, or discard this patch.
Classes/Eid/SearchSuggest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $parameters = $request->getParsedBody();
46 46
         $solrCore = (string) $parameters['solrcore'];
47 47
         $uHash = (string) $parameters['uHash'];
48
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
48
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
49 49
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
50 50
         }
51 51
         // Perform Solr query.
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,16 +30,14 @@
 block discarded – undo
30 30
  * @subpackage dlf
31 31
  * @access public
32 32
  */
33
-class SearchSuggest
34
-{
33
+class SearchSuggest {
35 34
     /**
36 35
      * The main method of the eID script
37 36
      *
38 37
      * @param ServerRequestInterface $request
39 38
      * @return ResponseInterface XML response of search suggestions
40 39
      */
41
-    public function main(ServerRequestInterface $request)
42
-    {
40
+    public function main(ServerRequestInterface $request) {
43 41
         $output = [];
44 42
         // Get input parameters and decrypt core name.
45 43
         $parameters = $request->getParsedBody();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $parameters = $request->getParsedBody();
46 46
         $solrCore = (string) $parameters['solrcore'];
47 47
         $uHash = (string) $parameters['uHash'];
48
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
48
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === FALSE) {
49 49
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
50 50
         }
51 51
         // Perform Solr query.
Please login to merge, or discard this patch.
ext_localconf.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,22 +65,22 @@
 block discarded – undo
65 65
 $_EXTKEY = 'dlf';
66 66
 // Register tools for toolbox plugin.
67 67
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = [];
68
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool';
69
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool';
70
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool';
71
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool';
72
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool';
73
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool';
74
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool';
68
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool';
69
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool';
70
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool';
71
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool';
72
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool';
73
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool';
74
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool';
75 75
 // Register hooks.
76 76
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
77 77
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
78 78
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class;
79 79
 // Register AJAX eID handlers.
80
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class . '::main';
81
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class . '::main';
80
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class.'::main';
81
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class.'::main';
82 82
 if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? false) {
83
-    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
83
+    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main';
84 84
 }
85 85
 // Use Caching Framework for Solr queries
86 86
 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'])) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 // Register AJAX eID handlers.
80 80
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class . '::main';
81 81
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class . '::main';
82
-if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? false) {
82
+if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? FALSE) {
83 83
     $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
84 84
 }
85 85
 // Use Caching Framework for Solr queries
Please login to merge, or discard this patch.
Classes/Controller/StatisticsController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
         $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings);
34 34
 
35 35
         // Set replacements.
36
-        $args['###TITLES###'] = $foundNumbers['titles'] . ' ' . htmlspecialchars(
36
+        $args['###TITLES###'] = $foundNumbers['titles'].' '.htmlspecialchars(
37 37
             LocalizationUtility::translate(
38 38
                 ($foundNumbers['titles'] > 1 ? 'titles' : 'title'), 'dlf'
39 39
             )
40 40
         );
41 41
 
42
-        $args['###VOLUMES###'] = $foundNumbers['volumes'] . ' ' . htmlspecialchars(
42
+        $args['###VOLUMES###'] = $foundNumbers['volumes'].' '.htmlspecialchars(
43 43
             LocalizationUtility::translate(
44 44
                 ($foundNumbers['volumes'] > 1 ? 'volumes' : 'volume'), 'dlf'
45 45
             )
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,15 +21,13 @@
 block discarded – undo
21 21
  * @subpackage dlf
22 22
  * @access public
23 23
  */
24
-class StatisticsController extends AbstractController
25
-{
24
+class StatisticsController extends AbstractController {
26 25
     /**
27 26
      * The main method of the plugin
28 27
      *
29 28
      * @return void
30 29
      */
31
-    public function mainAction()
32
-    {
30
+    public function mainAction() {
33 31
         $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings);
34 32
 
35 33
         // Set replacements.
Please login to merge, or discard this patch.
Classes/Domain/Repository/DocumentRepository.php 4 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,6 @@
 block discarded – undo
210 210
      * Volumes are documents that are both
211 211
      *  a) "leaf" elements i.e. partof != 0
212 212
      *  b) "root" elements that are not referenced by other documents ("root" elements that have no descendants)
213
-
214 213
      * @param array $settings
215 214
      *
216 215
      * @return array
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 
357 357
         $excludeOtherWhere = '';
358 358
         if ($settings['excludeOther']) {
359
-            $excludeOtherWhere = 'tx_dlf_documents.pid=' . intval($settings['storagePid']);
359
+            $excludeOtherWhere = 'tx_dlf_documents.pid='.intval($settings['storagePid']);
360 360
         }
361 361
         // Check if there are any metadata to suggest.
362 362
         $result = $queryBuilder
@@ -408,12 +408,12 @@  discard block
 block discarded – undo
408 408
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
409 409
             ->getConnectionForTable('tx_dlf_documents');
410 410
 
411
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
412
-            'FROM `tx_dlf_documents` ' .
413
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
414
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
415
-            'WHERE `tx_dlf_documents`.`record_id` = ? ' .
416
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
411
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
412
+            'FROM `tx_dlf_documents` '.
413
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
414
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
415
+            'WHERE `tx_dlf_documents`.`record_id` = ? '.
416
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
417 417
             $where;
418 418
 
419 419
         $values = [
@@ -443,13 +443,13 @@  discard block
 block discarded – undo
443 443
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
444 444
             ->getConnectionForTable('tx_dlf_documents');
445 445
 
446
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
447
-            'FROM `tx_dlf_documents` ' .
448
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
449
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
450
-            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) ' .
451
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
452
-            'AND ' . Helper::whereExpression('tx_dlf_collections') . ' ' .
446
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
447
+            'FROM `tx_dlf_documents` '.
448
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
449
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
450
+            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) '.
451
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
452
+            'AND '.Helper::whereExpression('tx_dlf_collections').' '.
453 453
             'GROUP BY `tx_dlf_documents`.`uid` ';
454 454
 
455 455
         $values = [
Please login to merge, or discard this patch.
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @return \Kitodo\Dlf\Domain\Model\Document|null
50 50
      */
51
-    public function findOneByParameters($parameters)
52
-    {
51
+    public function findOneByParameters($parameters) {
53 52
         $doc = null;
54 53
         $document = null;
55 54
 
@@ -93,8 +92,7 @@  discard block
 block discarded – undo
93 92
      *
94 93
      * @return \Kitodo\Dlf\Domain\Model\Document|null
95 94
      */
96
-    public function findOldestDocument()
97
-    {
95
+    public function findOldestDocument() {
98 96
         $query = $this->createQuery();
99 97
 
100 98
         $query->setOrderings(['tstamp' => QueryInterface::ORDER_ASCENDING]);
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
      * @param  \Kitodo\Dlf\Domain\Model\Structure $structure
109 107
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
110 108
      */
111
-    public function getChildrenOfYearAnchor($partOf, $structure)
112
-    {
109
+    public function getChildrenOfYearAnchor($partOf, $structure) {
113 110
         $query = $this->createQuery();
114 111
 
115 112
         $query->matching($query->equals('structure', $structure));
@@ -130,8 +127,7 @@  discard block
 block discarded – undo
130 127
      *
131 128
      * @return \Kitodo\Dlf\Domain\Model\Document|null
132 129
      */
133
-    public function findOneByIdAndSettings($uid, $settings = [])
134
-    {
130
+    public function findOneByIdAndSettings($uid, $settings = []) {
135 131
         $settings = ['documentSets' => $uid];
136 132
 
137 133
         return $this->findDocumentsBySettings($settings)->getFirst();
@@ -144,8 +140,7 @@  discard block
 block discarded – undo
144 140
      *
145 141
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
146 142
      */
147
-    public function findDocumentsBySettings($settings = [])
148
-    {
143
+    public function findDocumentsBySettings($settings = []) {
149 144
         $query = $this->createQuery();
150 145
 
151 146
         $constraints = [];
@@ -175,8 +170,7 @@  discard block
 block discarded – undo
175 170
      *
176 171
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
177 172
      */
178
-    public function findAllByCollectionsLimited($collections, $limit = 50)
179
-    {
173
+    public function findAllByCollectionsLimited($collections, $limit = 50) {
180 174
         $query = $this->createQuery();
181 175
 
182 176
         // order by start_date -> start_time...
@@ -213,8 +207,7 @@  discard block
 block discarded – undo
213 207
      *
214 208
      * @return array
215 209
      */
216
-    public function getStatisticsForSelectedCollection($settings)
217
-    {
210
+    public function getStatisticsForSelectedCollection($settings) {
218 211
         if ($settings['collections']) {
219 212
             // Include only selected collections.
220 213
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
@@ -348,8 +341,7 @@  discard block
 block discarded – undo
348 341
      *
349 342
      * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
350 343
      */
351
-    public function getTableOfContentsFromDb($uid, $pid, $settings)
352
-    {
344
+    public function getTableOfContentsFromDb($uid, $pid, $settings) {
353 345
         // Build table of contents from database.
354 346
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
355 347
             ->getQueryBuilderForTable('tx_dlf_documents');
@@ -397,8 +389,7 @@  discard block
 block discarded – undo
397 389
      *
398 390
      * @return array The found document object
399 391
      */
400
-    public function getOaiRecord($settings, $parameters)
401
-    {
392
+    public function getOaiRecord($settings, $parameters) {
402 393
         $where = '';
403 394
 
404 395
         if (!$settings['show_userdefined']) {
@@ -438,8 +429,7 @@  discard block
 block discarded – undo
438 429
      *
439 430
      * @return array The found document objects
440 431
      */
441
-    public function getOaiDocumentList($settings, $documentsToProcess)
442
-    {
432
+    public function getOaiDocumentList($settings, $documentsToProcess) {
443 433
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
444 434
             ->getConnectionForTable('tx_dlf_documents');
445 435
 
@@ -474,8 +464,7 @@  discard block
 block discarded – undo
474 464
      *
475 465
      * @return array
476 466
      */
477
-    public function findAllByUids($uids, $checkPartof = false)
478
-    {
467
+    public function findAllByUids($uids, $checkPartof = false) {
479 468
         // get all documents from db we are talking about
480 469
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
481 470
         $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_dlf_documents');
@@ -524,8 +513,7 @@  discard block
 block discarded – undo
524 513
      *
525 514
      * @return array
526 515
      */
527
-    public function findChildrenOfEach(array $uids)
528
-    {
516
+    public function findChildrenOfEach(array $uids) {
529 517
         $allDocuments = $this->findAllByUids($uids, true);
530 518
 
531 519
         $result = [];
@@ -546,8 +534,7 @@  discard block
 block discarded – undo
546 534
      * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $listedMetadata
547 535
      * @return array
548 536
      */
549
-    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null)
550
-    {
537
+    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null) {
551 538
         // set settings global inside this repository
552 539
         // (may be necessary when SolrSearch calls back)
553 540
         $this->settings = $settings;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function findOneByParameters($parameters)
52 52
     {
53
-        $doc = null;
54
-        $document = null;
53
+        $doc = NULL;
54
+        $document = NULL;
55 55
 
56 56
         if (isset($parameters['id']) && MathUtility::canBeInterpretedAsInteger($parameters['id'])) {
57 57
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
         } else if (isset($parameters['location']) && GeneralUtility::isValidUrl($parameters['location'])) {
65 65
 
66
-            $doc = Doc::getInstance($parameters['location'], [], true);
66
+            $doc = Doc::getInstance($parameters['location'], [], TRUE);
67 67
 
68 68
             if ($doc->recordId) {
69 69
                 $document = $this->findOneByRecordId($doc->recordId);
70 70
             }
71 71
 
72
-            if ($document === null) {
72
+            if ($document === NULL) {
73 73
                 // create new (dummy) Document object
74 74
                 $document = GeneralUtility::makeInstance(Document::class);
75 75
                 $document->setLocation($parameters['location']);
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 
78 78
         }
79 79
 
80
-        if ($document !== null && $doc === null) {
81
-            $doc = Doc::getInstance($document->getLocation(), [], true);
80
+        if ($document !== NULL && $doc === NULL) {
81
+            $doc = Doc::getInstance($document->getLocation(), [], TRUE);
82 82
         }
83 83
 
84
-        if ($doc !== null) {
84
+        if ($doc !== NULL) {
85 85
             $document->setDoc($doc);
86 86
         }
87 87
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         }
156 156
 
157 157
         if (isset($settings['excludeOther']) && (int) $settings['excludeOther'] === 0) {
158
-            $query->getQuerySettings()->setRespectStoragePage(false);
158
+            $query->getQuerySettings()->setRespectStoragePage(FALSE);
159 159
         }
160 160
 
161 161
         if (count($constraints)) {
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      *
475 475
      * @return array
476 476
      */
477
-    public function findAllByUids($uids, $checkPartof = false)
477
+    public function findAllByUids($uids, $checkPartof = FALSE)
478 478
     {
479 479
         // get all documents from db we are talking about
480 480
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
      */
527 527
     public function findChildrenOfEach(array $uids)
528 528
     {
529
-        $allDocuments = $this->findAllByUids($uids, true);
529
+        $allDocuments = $this->findAllByUids($uids, TRUE);
530 530
 
531 531
         $result = [];
532 532
         foreach ($allDocuments as $doc) {
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
      * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $listedMetadata
547 547
      * @return array
548 548
      */
549
-    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null)
549
+    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = NULL)
550 550
     {
551 551
         // set settings global inside this repository
552 552
         // (may be necessary when SolrSearch calls back)
Please login to merge, or discard this patch.
Classes/ViewHelpers/StdWrapViewHelper.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,10 @@  discard block
 block discarded – undo
15 15
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
16 16
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
17 17
 
18
-class StdWrapViewHelper extends AbstractViewHelper
19
-{
18
+class StdWrapViewHelper extends AbstractViewHelper {
20 19
     protected $escapeOutput = false;
21 20
 
22
-    public function initializeArguments()
23
-    {
21
+    public function initializeArguments() {
24 22
         parent::initializeArguments();
25 23
         $this->registerArgument('wrap', 'string', 'The wrap information', true);
26 24
         $this->registerArgument('data', 'array', 'Data for the content object', false);
@@ -31,8 +29,7 @@  discard block
 block discarded – undo
31 29
      *
32 30
      * @return string
33 31
      */
34
-    public function render()
35
-    {
32
+    public function render() {
36 33
         $wrap = $this->arguments['wrap'];
37 34
         $data = $this->arguments['data'] ?? [];
38 35
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 
18 18
 class StdWrapViewHelper extends AbstractViewHelper
19 19
 {
20
-    protected $escapeOutput = false;
20
+    protected $escapeOutput = FALSE;
21 21
 
22 22
     public function initializeArguments()
23 23
     {
24 24
         parent::initializeArguments();
25
-        $this->registerArgument('wrap', 'string', 'The wrap information', true);
26
-        $this->registerArgument('data', 'array', 'Data for the content object', false);
25
+        $this->registerArgument('wrap', 'string', 'The wrap information', TRUE);
26
+        $this->registerArgument('data', 'array', 'Data for the content object', FALSE);
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
Tests/Functional/FunctionalTestCase.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration();
72 72
 
73 73
         if ($this->disableJsonWrappedResponse) {
74
-            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function ($ext) {
74
+            $this->frameworkExtensionsToLoad = array_filter($this->frameworkExtensionsToLoad, function($ext) {
75 75
                 return $ext !== 'Resources/Core/Functional/Extensions/json_response';
76 76
             });
77 77
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
85 85
 
86
-        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/';
86
+        $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-'.$this->identifier.'/';
87 87
         $this->httpClient = new HttpClient([
88 88
             'base_uri' => $this->baseUrl,
89 89
             'http_errors' => false,
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
 
128 128
     protected function addSiteConfig($identifier, $baseUrl)
129 129
     {
130
-        $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml');
130
+        $siteConfig = Yaml::parseFile(__DIR__.'/../Fixtures/siteconfig.yaml');
131 131
         $siteConfig['base'] = $baseUrl;
132 132
         $siteConfig['languages'][0]['base'] = $baseUrl;
133 133
 
134
-        $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier;
134
+        $siteConfigPath = $this->instancePath.'/typo3conf/sites/'.$identifier;
135 135
         @mkdir($siteConfigPath, 0775, true);
136
-        file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
136
+        file_put_contents($siteConfigPath.'/config.yaml', Yaml::dump($siteConfig));
137 137
     }
138 138
 
139 139
     protected function initializeRepository(string $className, int $storagePid)
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $jsonDocuments = json_decode(file_get_contents($path), true);
153 153
 
154 154
         $updateQuery = $solr->service->createUpdate();
155
-        $documents = array_map(function ($jsonDoc) use ($updateQuery) {
155
+        $documents = array_map(function($jsonDoc) use ($updateQuery) {
156 156
             $document = $updateQuery->createDocument();
157 157
             foreach ($jsonDoc as $key => $value) {
158 158
                 $document->setField($key, $value);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @var bool
51 51
      */
52
-    protected $disableJsonWrappedResponse = false;
52
+    protected $disableJsonWrappedResponse = FALSE;
53 53
 
54 54
     /** @var ObjectManager */
55 55
     protected $objectManager;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $this->baseUrl = 'http://web:8000/public/typo3temp/var/tests/functional-' . $this->identifier . '/';
87 87
         $this->httpClient = new HttpClient([
88 88
             'base_uri' => $this->baseUrl,
89
-            'http_errors' => false,
89
+            'http_errors' => FALSE,
90 90
         ]);
91 91
 
92 92
         $this->addSiteConfig('dlf-testing', $this->baseUrl);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $siteConfig['languages'][0]['base'] = $baseUrl;
133 133
 
134 134
         $siteConfigPath = $this->instancePath . '/typo3conf/sites/' . $identifier;
135
-        @mkdir($siteConfigPath, 0775, true);
135
+        @mkdir($siteConfigPath, 0775, TRUE);
136 136
         file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
137 137
     }
138 138
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     protected function importSolrDocuments(Solr $solr, string $path)
151 151
     {
152
-        $jsonDocuments = json_decode(file_get_contents($path), true);
152
+        $jsonDocuments = json_decode(file_get_contents($path), TRUE);
153 153
 
154 154
         $updateQuery = $solr->service->createUpdate();
155 155
         $documents = array_map(function ($jsonDoc) use ($updateQuery) {
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     protected $httpClient;
69 69
 
70
-    public function __construct()
71
-    {
70
+    public function __construct() {
72 71
         parent::__construct();
73 72
 
74 73
         $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration();
@@ -95,8 +94,7 @@  discard block
 block discarded – undo
95 94
         $this->addSiteConfig('dlf-testing', $this->baseUrl);
96 95
     }
97 96
 
98
-    protected function getDlfConfiguration()
99
-    {
97
+    protected function getDlfConfiguration() {
100 98
         return [
101 99
             'fileGrpImages' => 'DEFAULT,MAX',
102 100
             'fileGrpThumbs' => 'THUMBS',
@@ -134,8 +132,7 @@  discard block
 block discarded – undo
134 132
         ];
135 133
     }
136 134
 
137
-    protected function addSiteConfig($identifier, $baseUrl)
138
-    {
135
+    protected function addSiteConfig($identifier, $baseUrl) {
139 136
         $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml');
140 137
         $siteConfig['base'] = $baseUrl;
141 138
         $siteConfig['languages'][0]['base'] = $baseUrl;
@@ -145,8 +142,7 @@  discard block
 block discarded – undo
145 142
         file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
146 143
     }
147 144
 
148
-    protected function initializeRepository(string $className, int $storagePid)
149
-    {
145
+    protected function initializeRepository(string $className, int $storagePid) {
150 146
         $repository = $this->objectManager->get($className);
151 147
 
152 148
         $querySettings = $this->objectManager->get(Typo3QuerySettings::class);
@@ -156,8 +152,7 @@  discard block
 block discarded – undo
156 152
         return $repository;
157 153
     }
158 154
 
159
-    protected function importSolrDocuments(Solr $solr, string $path)
160
-    {
155
+    protected function importSolrDocuments(Solr $solr, string $path) {
161 156
         $jsonDocuments = json_decode(file_get_contents($path), true);
162 157
 
163 158
         $updateQuery = $solr->service->createUpdate();
@@ -176,8 +171,7 @@  discard block
 block discarded – undo
176 171
         $solr->service->update($updateQuery);
177 172
     }
178 173
 
179
-    protected function initLanguageService(string $locale)
180
-    {
174
+    protected function initLanguageService(string $locale) {
181 175
         if (class_exists(\TYPO3\CMS\Core\Localization\LanguageServiceFactory::class)) {
182 176
             $GLOBALS['LANG'] = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\LanguageServiceFactory::class)->create($locale);
183 177
         } else {
@@ -193,8 +187,7 @@  discard block
 block discarded – undo
193 187
     /**
194 188
      * Assert that $sub is recursively contained within $super.
195 189
      */
196
-    protected function assertArrayMatches(array $sub, array $super, string $message = '')
197
-    {
190
+    protected function assertArrayMatches(array $sub, array $super, string $message = '') {
198 191
         $this->assertEquals($sub, ArrayUtility::intersectRecursive($super, $sub), $message);
199 192
     }
200 193
 }
Please login to merge, or discard this patch.
Tests/Functional/Api/OaiPmhTest.php 3 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
     {
38 38
         parent::setUp();
39 39
 
40
-        $this->oaiUrl = $this->baseUrl . '/index.php?id=' . $this->oaiPage;
41
-        $this->oaiUrlNoStoragePid = $this->baseUrl . '/index.php?id=' . $this->oaiPageNoStoragePid;
40
+        $this->oaiUrl = $this->baseUrl.'/index.php?id='.$this->oaiPage;
41
+        $this->oaiUrlNoStoragePid = $this->baseUrl.'/index.php?id='.$this->oaiPageNoStoragePid;
42 42
 
43
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml');
44
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/metadata.xml');
45
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml');
46
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/pages.xml');
47
-        $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/pages.xml');
48
-        $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/solrcores.xml');
43
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml');
44
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/metadata.xml');
45
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml');
46
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/pages.xml');
47
+        $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/pages.xml');
48
+        $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/solrcores.xml');
49 49
 
50 50
         $this->persistenceManager = $this->objectManager->get(PersistenceManager::class);
51 51
         $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             $coreName = Solr::createCore();
63 63
             $solr = Solr::getInstance($coreName);
64 64
 
65
-            $this->importSolrDocuments($solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json');
65
+            $this->importSolrDocuments($solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json');
66 66
         }
67 67
 
68 68
         $oaiCoreModel = $this->solrCoreRepository->findByUid(11001);
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
 use SimpleXMLElement;
13 13
 use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
14 14
 
15
-class OaiPmhTest extends FunctionalTestCase
16
-{
15
+class OaiPmhTest extends FunctionalTestCase {
17 16
     protected $disableJsonWrappedResponse = true;
18 17
 
19 18
     protected $coreExtensionsToLoad = [
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
         $this->setUpOaiSolr();
54 53
     }
55 54
 
56
-    protected function setUpOaiSolr()
57
-    {
55
+    protected function setUpOaiSolr() {
58 56
         // Setup Solr only once for all tests in this suite
59 57
         static $solr = null;
60 58
 
@@ -74,8 +72,7 @@  discard block
 block discarded – undo
74 72
     /**
75 73
      * @test
76 74
      */
77
-    public function correctlyRespondsOnBadVerb()
78
-    {
75
+    public function correctlyRespondsOnBadVerb() {
79 76
         $client = new HttpClient();
80 77
         $response = $client->get($this->baseUrl, [
81 78
             'query' => [
@@ -100,8 +97,7 @@  discard block
 block discarded – undo
100 97
     /**
101 98
      * @test
102 99
      */
103
-    public function canIdentify()
104
-    {
100
+    public function canIdentify() {
105 101
         $oai = Endpoint::build($this->oaiUrl);
106 102
         $identity = $oai->identify();
107 103
 
@@ -114,8 +110,7 @@  discard block
 block discarded – undo
114 110
     /**
115 111
      * @test
116 112
      */
117
-    public function identifyGivesFallbackDatestampWhenNoDocuments()
118
-    {
113
+    public function identifyGivesFallbackDatestampWhenNoDocuments() {
119 114
         $oai = Endpoint::build($this->oaiUrlNoStoragePid);
120 115
         $identity = $oai->identify();
121 116
 
@@ -125,8 +120,7 @@  discard block
 block discarded – undo
125 120
     /**
126 121
      * @test
127 122
      */
128
-    public function canListMetadataFormats()
129
-    {
123
+    public function canListMetadataFormats() {
130 124
         $oai = Endpoint::build($this->oaiUrl);
131 125
         $formats = $oai->listMetadataFormats();
132 126
 
@@ -141,8 +135,7 @@  discard block
 block discarded – undo
141 135
     /**
142 136
      * @test
143 137
      */
144
-    public function canListRecords()
145
-    {
138
+    public function canListRecords() {
146 139
         $oai = Endpoint::build($this->oaiUrl);
147 140
         $result = $oai->listRecords('mets');
148 141
 
@@ -155,8 +148,7 @@  discard block
 block discarded – undo
155 148
     /**
156 149
      * @test
157 150
      */
158
-    public function noRecordsUntil1900()
159
-    {
151
+    public function noRecordsUntil1900() {
160 152
         $this->expectException(OaipmhException::class);
161 153
         $this->expectExceptionMessage('empty list');
162 154
 
@@ -169,8 +161,7 @@  discard block
 block discarded – undo
169 161
     /**
170 162
      * @test
171 163
      */
172
-    public function canUseResumptionToken()
173
-    {
164
+    public function canUseResumptionToken() {
174 165
         // NOTE: cursor and expirationDate are optional by the specification,
175 166
         //       but we include them in our implementation
176 167
 
@@ -228,8 +219,7 @@  discard block
 block discarded – undo
228 219
     /**
229 220
      * @test
230 221
      */
231
-    public function noResumptionTokenForCompleteList()
232
-    {
222
+    public function noResumptionTokenForCompleteList() {
233 223
         $client = new HttpClient();
234 224
 
235 225
         foreach (['ListIdentifiers', 'ListRecords'] as $verb) {
@@ -251,8 +241,7 @@  discard block
 block discarded – undo
251 241
     /**
252 242
      * @test
253 243
      */
254
-    public function canListAndResumeIdentifiers()
255
-    {
244
+    public function canListAndResumeIdentifiers() {
256 245
         $oai = Endpoint::build($this->oaiUrl);
257 246
         $result = $oai->listIdentifiers('mets');
258 247
 
@@ -265,18 +254,15 @@  discard block
 block discarded – undo
265 254
         $this->assertEquals('oai:de:slub-dresden:db:id-476248086', $record->identifier);
266 255
     }
267 256
 
268
-    protected function parseUtc(string $dateTime)
269
-    {
257
+    protected function parseUtc(string $dateTime) {
270 258
         return DateTime::createFromFormat('Y-m-d\TH:i:s\Z', $dateTime);
271 259
     }
272 260
 
273
-    protected function assertUtcDateString(string $dateTime)
274
-    {
261
+    protected function assertUtcDateString(string $dateTime) {
275 262
         $this->assertInstanceOf(DateTime::class, $this->parseUtc($dateTime));
276 263
     }
277 264
 
278
-    protected function assertInFuture(string $dateTime)
279
-    {
265
+    protected function assertInFuture(string $dateTime) {
280 266
         $this->assertGreaterThan(new DateTime(), $this->parseUtc($dateTime));
281 267
     }
282 268
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrIndexingTest.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
         $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000);
44 44
         $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000);
45 45
 
46
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml');
47
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml');
48
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/metadata.xml');
46
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml');
47
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml');
48
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/metadata.xml');
49 49
     }
50 50
 
51 51
     /**
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $core = $this->createSolrCore();
114 114
 
115
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_fulltext.xml');
116
-        $this->importSolrDocuments($core->solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json');
117
-        $this->importSolrDocuments($core->solr, __DIR__ . '/../../Fixtures/Common/documents_fulltext.solr.json');
115
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_fulltext.xml');
116
+        $this->importSolrDocuments($core->solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json');
117
+        $this->importSolrDocuments($core->solr, __DIR__.'/../../Fixtures/Common/documents_fulltext.solr.json');
118 118
 
119 119
         $collections = $this->collectionRepository->findCollectionsBySettings([
120 120
             'index_name' => ['Musik', 'Projekt: Dresdner Hefte'],
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
 use TYPO3\CMS\Extbase\Object\ObjectManager;
17 17
 use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
18 18
 
19
-class SolrIndexingTest extends FunctionalTestCase
20
-{
19
+class SolrIndexingTest extends FunctionalTestCase {
21 20
     /** @var PersistenceManager */
22 21
     protected $persistenceManager;
23 22
 
@@ -51,8 +50,7 @@  discard block
 block discarded – undo
51 50
     /**
52 51
      * @test
53 52
      */
54
-    public function canCreateCore()
55
-    {
53
+    public function canCreateCore() {
56 54
         $coreName = uniqid('testCore');
57 55
         $solr = Solr::getInstance($coreName);
58 56
         $this->assertNull($solr->core);
@@ -67,8 +65,7 @@  discard block
 block discarded – undo
67 65
     /**
68 66
      * @test
69 67
      */
70
-    public function canIndexAndSearchDocument()
71
-    {
68
+    public function canIndexAndSearchDocument() {
72 69
         $core = $this->createSolrCore();
73 70
 
74 71
         $document = $this->documentRepository->findByUid(1001);
@@ -108,8 +105,7 @@  discard block
 block discarded – undo
108 105
     /**
109 106
      * @test
110 107
      */
111
-    public function canSearchInCollections()
112
-    {
108
+    public function canSearchInCollections() {
113 109
         $core = $this->createSolrCore();
114 110
 
115 111
         $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_fulltext.xml');
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,17 +86,17 @@
 block discarded – undo
86 86
             'storagePid' => $document->getPid(),
87 87
         ];
88 88
 
89
-        $solrSearch = $this->documentRepository->findSolrByCollection(null, $solrSettings, ['query' => '*']);
89
+        $solrSearch = $this->documentRepository->findSolrByCollection(NULL, $solrSettings, ['query' => '*']);
90 90
         $solrSearch->getQuery()->execute();
91 91
         $this->assertEquals(1, count($solrSearch));
92 92
         $this->assertEquals(15, $solrSearch->getNumFound());
93 93
 
94 94
         // Check that the title stored in Solr matches the title of database entry
95
-        $docTitleInSolr = false;
95
+        $docTitleInSolr = FALSE;
96 96
         foreach ($solrSearch->getSolrResults()['documents'] as $solrDoc) {
97 97
             if ($solrDoc['toplevel'] && $solrDoc['uid'] === $document->getUid()) {
98 98
                 $this->assertEquals($document->getTitle(), $solrDoc['title']);
99
-                $docTitleInSolr = true;
99
+                $docTitleInSolr = TRUE;
100 100
                 break;
101 101
             }
102 102
         }
Please login to merge, or discard this patch.