Passed
Pull Request — master (#123)
by Sebastian
03:43
created
Build/Documentation/dbdocs/generate.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,16 +11,16 @@
 block discarded – undo
11 11
  * LICENSE.txt file that was distributed with this source code.
12 12
  */
13 13
 
14
-$classLoader = require_once __DIR__ . '/../../../vendor/autoload.php';
14
+$classLoader = require_once __DIR__.'/../../../vendor/autoload.php';
15 15
 
16 16
 $outputPath = $argv[1] ?? null;
17 17
 if (empty($outputPath) || !is_writable(($outputPath))) {
18
-    echo 'Error: Output path not specified or not writable' . "\n";
18
+    echo 'Error: Output path not specified or not writable'."\n";
19 19
     exit(1);
20 20
 }
21 21
 
22
-putenv('TYPO3_PATH_ROOT=' . __DIR__ . '/public');
23
-putenv('TYPO3_PATH_APP=' . __DIR__);
22
+putenv('TYPO3_PATH_ROOT='.__DIR__.'/public');
23
+putenv('TYPO3_PATH_APP='.__DIR__);
24 24
 
25 25
 // For compatibility with TYPO v9
26 26
 define('PATH_thisScript', __FILE__);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 $classLoader = require_once __DIR__ . '/../../../vendor/autoload.php';
15 15
 
16
-$outputPath = $argv[1] ?? null;
16
+$outputPath = $argv[1] ?? NULL;
17 17
 if (empty($outputPath) || !is_writable(($outputPath))) {
18 18
     echo 'Error: Output path not specified or not writable' . "\n";
19 19
     exit(1);
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 // For request types other than "FE", the configuration manager would try to access the database.
29 29
 \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
30
-\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, false);
30
+\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, FALSE);
31 31
 
32 32
 $generator = new \Kitodo\DbDocs\Generator();
33 33
 $tables = $generator->collectTables();
Please login to merge, or discard this patch.
Classes/ViewHelpers/MetadataWrapVariableViewHelper.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,13 +35,11 @@
 block discarded – undo
35 35
  *     {typoscript -> kitodo:metadataWrapVariable(name: 'wrapInfo')}
36 36
  *
37 37
  */
38
-class MetadataWrapVariableViewHelper extends AbstractViewHelper
39
-{
38
+class MetadataWrapVariableViewHelper extends AbstractViewHelper {
40 39
     /**
41 40
      * @return void
42 41
      */
43
-    public function initializeArguments()
44
-    {
42
+    public function initializeArguments() {
45 43
         $this->registerArgument('name', 'string', 'Name of variable to create', true);
46 44
     }
47 45
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function initializeArguments()
44 44
     {
45
-        $this->registerArgument('name', 'string', 'Name of variable to create', true);
45
+        $this->registerArgument('name', 'string', 'Name of variable to create', TRUE);
46 46
     }
47 47
 
48 48
     /**
Please login to merge, or discard this patch.
Classes/Controller/FeedsController.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
         if ($library) {
72 72
             $feedMeta['copyright'] = $library->getLabel();
73 73
         } else {
74
-            $this->logger->error('Failed to fetch label of selected library with "' . $this->settings['library'] . '"');
74
+            $this->logger->error('Failed to fetch label of selected library with "'.$this->settings['library'].'"');
75 75
         }
76 76
 
77 77
         if (
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
                 ) {
92 92
                     $superiorTitle = Doc::getTitle($document->getPartof(), true);
93 93
                     if (!empty($superiorTitle)) {
94
-                        $title .= '[' . $superiorTitle . ']';
94
+                        $title .= '['.$superiorTitle.']';
95 95
                     }
96 96
                 }
97 97
                 // Get title of document.
98 98
                 if (!empty($document->getTitle())) {
99
-                    $title .= ' ' . $document->getTitle();
99
+                    $title .= ' '.$document->getTitle();
100 100
                 }
101 101
                 // Set default title if empty.
102 102
                 if (empty($title)) {
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
                 }
105 105
                 // Append volume information.
106 106
                 if (!empty($document->getVolume())) {
107
-                    $title .= ', ' . LocalizationUtility::translate('volume', 'dlf') . ' ' . $document->getVolume();
107
+                    $title .= ', '.LocalizationUtility::translate('volume', 'dlf').' '.$document->getVolume();
108 108
                 }
109 109
                 // Is this document new or updated?
110 110
                 if ($document->getCrdate() == $document->getTstamp()) {
111
-                    $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf') . ' ' . trim($title);
111
+                    $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf').' '.trim($title);
112 112
                 } else {
113
-                    $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf') . ' ' . trim($title);
113
+                    $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf').' '.trim($title);
114 114
                 }
115 115
 
116 116
                 $document->setTitle($title);
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  * @subpackage dlf
26 26
  * @access public
27 27
  */
28
-class FeedsController extends AbstractController
29
-{
28
+class FeedsController extends AbstractController {
30 29
 
31 30
     /**
32 31
      * @var LibraryRepository
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
     /**
37 36
      * @param LibraryRepository $libraryRepository
38 37
      */
39
-    public function injectLibraryRepository(LibraryRepository $libraryRepository)
40
-    {
38
+    public function injectLibraryRepository(LibraryRepository $libraryRepository) {
41 39
         $this->libraryRepository = $libraryRepository;
42 40
     }
43 41
 
@@ -46,8 +44,7 @@  discard block
 block discarded – undo
46 44
      *
47 45
      * @return void
48 46
      */
49
-    public function initializeAction()
50
-    {
47
+    public function initializeAction() {
51 48
         $this->request->setFormat('xml');
52 49
     }
53 50
 
@@ -56,8 +53,7 @@  discard block
 block discarded – undo
56 53
      *
57 54
      * @return void
58 55
      */
59
-    public function mainAction()
60
-    {
56
+    public function mainAction() {
61 57
         // access to GET parameter tx_dlf_feeds['collection']
62 58
         $requestData = $this->request->getArguments();
63 59
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             || GeneralUtility::inList($this->settings['collections'], $requestData['collection'])
81 81
         ) {
82 82
 
83
-            $documents = $this->documentRepository->findAllByCollectionsLimited(GeneralUtility::intExplode(',', $requestData['collection'], true), $this->settings['limit']);
83
+            $documents = $this->documentRepository->findAllByCollectionsLimited(GeneralUtility::intExplode(',', $requestData['collection'], TRUE), $this->settings['limit']);
84 84
 
85 85
             foreach ($documents as $document) {
86 86
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 if ((empty($document->getTitle()) || !empty($this->settings['prependSuperiorTitle']))
90 90
                     && !empty($document->getPartof())
91 91
                 ) {
92
-                    $superiorTitle = Doc::getTitle($document->getPartof(), true);
92
+                    $superiorTitle = Doc::getTitle($document->getPartof(), TRUE);
93 93
                     if (!empty($superiorTitle)) {
94 94
                         $title .= '[' . $superiorTitle . ']';
95 95
                     }
Please login to merge, or discard this patch.
Classes/Controller/OaiPmhController.php 3 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -243,10 +243,10 @@  discard block
 block discarded – undo
243 243
             if ($root->item(0) instanceof \DOMNode) {
244 244
                 $mets = $xml->saveXML($root->item(0));
245 245
             } else {
246
-                $this->logger->error('No METS part found in document with location "' . $record['location'] . '"');
246
+                $this->logger->error('No METS part found in document with location "'.$record['location'].'"');
247 247
             }
248 248
         } else {
249
-            $this->logger->error('Could not load XML file from "' . $record['location'] . '"');
249
+            $this->logger->error('Could not load XML file from "'.$record['location'].'"');
250 250
         }
251 251
         return $mets;
252 252
     }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
             $pageSettings = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
413 413
             $storagePid = $pageSettings["plugin."]["tx_dlf."]["persistence."]["storagePid"];
414 414
             if ($storagePid > 0) {
415
-                $this->logger->notice('No records found with PID ' . $storagePid);
415
+                $this->logger->notice('No records found with PID '.$storagePid);
416 416
             } else {
417 417
                 $this->logger->notice('No records found');
418 418
             }
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
             if (!empty($resArray)) {
496 496
                 // check, if all required fields are available for a given identifier
497 497
                 foreach ($details['requiredFields'] as $required) {
498
-                    $methodName = 'get' . GeneralUtility::underscoredToUpperCamelCase($required);
498
+                    $methodName = 'get'.GeneralUtility::underscoredToUpperCamelCase($required);
499 499
                     if (empty($resArray->$methodName())) {
500 500
                         // Skip metadata formats whose requirements are not met.
501 501
                         continue 2;
@@ -600,9 +600,9 @@  discard block
 block discarded – undo
600 600
 
601 601
             if ($resArray = $result->fetch()) {
602 602
                 if ($resArray['index_query'] != "") {
603
-                    $solr_query .= '(' . $resArray['index_query'] . ')';
603
+                    $solr_query .= '('.$resArray['index_query'].')';
604 604
                 } else {
605
-                    $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"';
605
+                    $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"';
606 606
                 }
607 607
             } else {
608 608
                 $this->error = 'noSetHierarchy';
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         }
615 615
         // Check for required fields.
616 616
         foreach ($this->formats[$this->parameters['metadataPrefix']]['requiredFields'] as $required) {
617
-            $solr_query .= ' NOT ' . $required . ':""';
617
+            $solr_query .= ' NOT '.$required.':""';
618 618
         }
619 619
         // toplevel="true" is always required
620 620
         $solr_query .= ' AND toplevel:true';
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
             ) {
629 629
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'],
630 630
                     $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
631
-                $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z';
631
+                $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z';
632 632
             } else {
633 633
                 $this->error = 'badArgument';
634 634
                 return;
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
             ) {
645 645
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'],
646 646
                     $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
647
-                $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z';
647
+                $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z';
648 648
                 if ($from != "*" && $from > $until) {
649 649
                     $this->error = 'badArgument';
650 650
                 }
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
                 $this->error = 'badArgument';
662 662
             }
663 663
         }
664
-        $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']';
664
+        $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']';
665 665
         $documentSet = [];
666 666
         $solr = Solr::getInstance($this->settings['solrcore']);
667 667
         if (!$solr->ready) {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
         $resumptionTokenInfo['cursor'] = $currentCursor;
781 781
         $resumptionTokenInfo['completeListSize'] = $documentListSet['metadata']['completeListSize'];
782 782
         $expireDateTime = new \DateTime();
783
-        $expireDateTime->add(new \DateInterval('PT' . $this->settings['expired'] . 'S'));
783
+        $expireDateTime->add(new \DateInterval('PT'.$this->settings['expired'].'S'));
784 784
         $resumptionTokenInfo['expired'] = $expireDateTime;
785 785
 
786 786
         $omitResumptionToken = $currentCursor === 0 && $numShownDocuments >= $documentListSet['metadata']['completeListSize'];
Please login to merge, or discard this patch.
Braces   +19 added lines, -38 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
  * @subpackage dlf
28 28
  * @access public
29 29
  */
30
-class OaiPmhController extends AbstractController
31
-{
30
+class OaiPmhController extends AbstractController {
32 31
     /**
33 32
      * @var TokenRepository
34 33
      */
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
     /**
38 37
      * @param TokenRepository $tokenRepository
39 38
      */
40
-    public function injectTokenRepository(TokenRepository $tokenRepository)
41
-    {
39
+    public function injectTokenRepository(TokenRepository $tokenRepository) {
42 40
         $this->tokenRepository = $tokenRepository;
43 41
     }
44 42
 
@@ -50,8 +48,7 @@  discard block
 block discarded – undo
50 48
     /**
51 49
      * @param CollectionRepository $collectionRepository
52 50
      */
53
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
54
-    {
51
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
55 52
         $this->collectionRepository = $collectionRepository;
56 53
     }
57 54
 
@@ -63,8 +60,7 @@  discard block
 block discarded – undo
63 60
     /**
64 61
      * @param LibraryRepository $libraryRepository
65 62
      */
66
-    public function injectLibraryRepository(LibraryRepository $libraryRepository)
67
-    {
63
+    public function injectLibraryRepository(LibraryRepository $libraryRepository) {
68 64
         $this->libraryRepository = $libraryRepository;
69 65
     }
70 66
 
@@ -73,8 +69,7 @@  discard block
 block discarded – undo
73 69
      *
74 70
      * @return void
75 71
      */
76
-    public function initializeAction()
77
-    {
72
+    public function initializeAction() {
78 73
         $this->request->setFormat('xml');
79 74
     }
80 75
 
@@ -122,8 +117,7 @@  discard block
 block discarded – undo
122 117
      *
123 118
      * @return void
124 119
      */
125
-    protected function deleteExpiredTokens()
126
-    {
120
+    protected function deleteExpiredTokens() {
127 121
         // Delete expired resumption tokens.
128 122
         $this->tokenRepository->deleteExpiredTokens($this->settings['expired']);
129 123
     }
@@ -135,8 +129,7 @@  discard block
 block discarded – undo
135 129
      *
136 130
      * @return void
137 131
      */
138
-    protected function getUrlParams()
139
-    {
132
+    protected function getUrlParams() {
140 133
         $allowedParams = [
141 134
             'verb',
142 135
             'identifier',
@@ -166,8 +159,7 @@  discard block
 block discarded – undo
166 159
      *
167 160
      * @return array $metadata: The mapped metadata array
168 161
      */
169
-    protected function getDcData(array $record)
170
-    {
162
+    protected function getDcData(array $record) {
171 163
         $metadata = [];
172 164
 
173 165
         $metadata[] = ['dc:identifier' => $record['record_id']];
@@ -232,8 +224,7 @@  discard block
 block discarded – undo
232 224
      *
233 225
      * @return string: The fetched METS XML
234 226
      */
235
-    protected function getMetsData(array $record)
236
-    {
227
+    protected function getMetsData(array $record) {
237 228
         $mets = null;
238 229
         // Load METS file.
239 230
         $xml = new \DOMDocument();
@@ -256,8 +247,7 @@  discard block
 block discarded – undo
256 247
      *
257 248
      * @return void
258 249
      */
259
-    public function mainAction()
260
-    {
250
+    public function mainAction() {
261 251
         // Get allowed GET and POST variables.
262 252
         $this->getUrlParams();
263 253
 
@@ -324,8 +314,7 @@  discard block
 block discarded – undo
324 314
      *
325 315
      * @return void
326 316
      */
327
-    protected function verbGetRecord()
328
-    {
317
+    protected function verbGetRecord() {
329 318
         if (count($this->parameters) !== 3 || empty($this->parameters['metadataPrefix']) || empty($this->parameters['identifier'])) {
330 319
             $this->error = 'badArgument';
331 320
             return;
@@ -377,8 +366,7 @@  discard block
 block discarded – undo
377 366
      *
378 367
      * @return void
379 368
      */
380
-    protected function verbIdentify()
381
-    {
369
+    protected function verbIdentify() {
382 370
         $library = $this->libraryRepository->findByUid($this->settings['library']);
383 371
 
384 372
         $oaiIdentifyInfo = [];
@@ -427,8 +415,7 @@  discard block
 block discarded – undo
427 415
      *
428 416
      * @return void
429 417
      */
430
-    protected function verbListIdentifiers()
431
-    {
418
+    protected function verbListIdentifiers() {
432 419
         // If we have a resumption token we can continue our work
433 420
         if (!empty($this->parameters['resumptionToken'])) {
434 421
             // "resumptionToken" is an exclusive argument.
@@ -482,8 +469,7 @@  discard block
 block discarded – undo
482 469
      *
483 470
      * @return void
484 471
      */
485
-    protected function verbListMetadataFormats()
486
-    {
472
+    protected function verbListMetadataFormats() {
487 473
         $resArray = [];
488 474
         // check for the optional "identifier" parameter
489 475
         if (isset($this->parameters['identifier'])) {
@@ -515,8 +501,7 @@  discard block
 block discarded – undo
515 501
      *
516 502
      * @return void
517 503
      */
518
-    protected function verbListRecords()
519
-    {
504
+    protected function verbListRecords() {
520 505
         // Check for invalid arguments.
521 506
         if (!empty($this->parameters['resumptionToken'])) {
522 507
             // "resumptionToken" is an exclusive argument.
@@ -571,8 +556,7 @@  discard block
 block discarded – undo
571 556
      *
572 557
      * @return void
573 558
      */
574
-    protected function verbListSets()
575
-    {
559
+    protected function verbListSets() {
576 560
         // It is required to set a oai_name inside the collection record to be shown in oai-pmh plugin.
577 561
         $this->settings['hideEmptyOaiNames'] = true;
578 562
 
@@ -588,8 +572,7 @@  discard block
 block discarded – undo
588 572
      *
589 573
      * @return array|null Array of matching records
590 574
      */
591
-    protected function fetchDocumentUIDs()
592
-    {
575
+    protected function fetchDocumentUIDs() {
593 576
         $solr_query = '';
594 577
         // Check "set" for valid value.
595 578
         if (!empty($this->parameters['set'])) {
@@ -698,8 +681,7 @@  discard block
 block discarded – undo
698 681
      *
699 682
      * @return array of enriched records
700 683
      */
701
-    protected function generateOutputForDocumentList(array $documentListSet)
702
-    {
684
+    protected function generateOutputForDocumentList(array $documentListSet) {
703 685
         $documentsToProcess = array_splice($documentListSet['elements'], 0, (int) $this->settings['limit']);
704 686
         if (empty($documentsToProcess)) {
705 687
             $this->error = 'noRecordsMatch';
@@ -752,8 +734,7 @@  discard block
 block discarded – undo
752 734
      *
753 735
      * @return void
754 736
      */
755
-    protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments)
756
-    {
737
+    protected function generateResumptionTokenForDocumentListSet(array $documentListSet, int $numShownDocuments) {
757 738
         // The cursor specifies how many elements have already been returned in previous requests
758 739
         // See http://www.openarchives.org/OAI/openarchivesprotocol.html#FlowControl
759 740
         $currentCursor = $documentListSet['metadata']['cursor'];
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     protected function getMetsData(array $record)
236 236
     {
237
-        $mets = null;
237
+        $mets = NULL;
238 238
         // Load METS file.
239 239
         $xml = new \DOMDocument();
240 240
         if ($xml->load($record['location'])) {
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         } else {
314 314
             // No resumption token found or resumption token expired.
315 315
             $this->error = 'badResumptionToken';
316
-            return null;
316
+            return NULL;
317 317
         }
318 318
     }
319 319
 
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
     protected function verbListSets()
575 575
     {
576 576
         // It is required to set a oai_name inside the collection record to be shown in oai-pmh plugin.
577
-        $this->settings['hideEmptyOaiNames'] = true;
577
+        $this->settings['hideEmptyOaiNames'] = TRUE;
578 578
 
579 579
         $oaiSets = $this->collectionRepository->findCollectionsBySettings($this->settings);
580 580
 
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
                 }
607 607
             } else {
608 608
                 $this->error = 'noSetHierarchy';
609
-                return null;
609
+                return NULL;
610 610
             }
611 611
         } else {
612 612
             // If no set is specified we have to query for all collections
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
         $currentCursor = $documentListSet['metadata']['cursor'];
760 760
 
761 761
         if (count($documentListSet['elements']) !== 0) {
762
-            $resumptionToken = uniqid('', false);
762
+            $resumptionToken = uniqid('', FALSE);
763 763
 
764 764
             $documentListSet['metadata']['cursor'] += $numShownDocuments;
765 765
 
Please login to merge, or discard this patch.
Classes/Controller/AbstractController.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 if ($this->document) {
126 126
                     $doc = Doc::getInstance($this->document->getLocation(), $this->settings, true);
127 127
                 } else {
128
-                    $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $this->settings['storagePid'] . '" for document loading');
128
+                    $this->logger->error('Invalid UID "'.$requestData['id'].'" or PID "'.$this->settings['storagePid'].'" for document loading');
129 129
                 }
130 130
             } else if (GeneralUtility::isValidUrl($requestData['id'])) {
131 131
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
                     $this->document->setLocation($requestData['id']);
145 145
                 } else {
146
-                    $this->logger->error('Invalid location given "' . $requestData['id'] . '" for document loading');
146
+                    $this->logger->error('Invalid location given "'.$requestData['id'].'" for document loading');
147 147
                 }
148 148
             }
149 149
 
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
                 if ($this->document !== null && $doc !== null) {
161 161
                     $this->document->setDoc($doc);
162 162
                 } else {
163
-                    $this->logger->error('Failed to load document with record ID "' . $requestData['recordId'] . '"');
163
+                    $this->logger->error('Failed to load document with record ID "'.$requestData['recordId'].'"');
164 164
                 }
165 165
             }
166 166
         } else {
167
-            $this->logger->error('Invalid ID "' . $requestData['id'] . '" or PID "' . $this->settings['storagePid'] . '" for document loading');
167
+            $this->logger->error('Invalid ID "'.$requestData['id'].'" or PID "'.$this->settings['storagePid'].'" for document loading');
168 168
         }
169 169
     }
170 170
 
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * @param DocumentRepository $documentRepository
46 46
      */
47
-    public function injectDocumentRepository(DocumentRepository $documentRepository)
48
-    {
47
+    public function injectDocumentRepository(DocumentRepository $documentRepository) {
49 48
         $this->documentRepository = $documentRepository;
50 49
     }
51 50
 
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
      * @access protected
86 85
      * @return void
87 86
      */
88
-    protected function initialize()
89
-    {
87
+    protected function initialize() {
90 88
         $this->requestData = GeneralUtility::_GPmerged('tx_dlf');
91 89
         if (empty($this->requestData['page'])) {
92 90
             $this->requestData['page'] = 1;
@@ -112,8 +110,7 @@  discard block
 block discarded – undo
112 110
      *
113 111
      * @return void
114 112
      */
115
-    protected function loadDocument($requestData)
116
-    {
113
+    protected function loadDocument($requestData) {
117 114
         // Try to get document format from database
118 115
         if (!empty($requestData['id'])) {
119 116
 
@@ -178,8 +175,7 @@  discard block
 block discarded – undo
178 175
      *
179 176
      * @return boolean
180 177
      */
181
-    protected function isDocMissingOrEmpty()
182
-    {
178
+    protected function isDocMissingOrEmpty() {
183 179
         return $this->isDocMissing() || $this->document->getDoc()->numPages < 1;
184 180
     }
185 181
 
@@ -188,8 +184,7 @@  discard block
 block discarded – undo
188 184
      *
189 185
      * @return boolean
190 186
      */
191
-    protected function isDocMissing()
192
-    {
187
+    protected function isDocMissing() {
193 188
         return $this->document === null || $this->document->getDoc() === null;
194 189
     }
195 190
 
@@ -211,8 +206,7 @@  discard block
 block discarded – undo
211 206
      *
212 207
      * @return null|string|array
213 208
      */
214
-    protected function getParametersSafely($parameterName)
215
-    {
209
+    protected function getParametersSafely($parameterName) {
216 210
         if ($this->request->hasArgument($parameterName)) {
217 211
             return $this->request->getArgument($parameterName);
218 212
         }
@@ -226,8 +220,7 @@  discard block
 block discarded – undo
226 220
      *
227 221
      * @return void
228 222
      */
229
-    public function __construct()
230
-    {
223
+    public function __construct() {
231 224
         $this->initialize();
232 225
     }
233 226
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -117,26 +117,26 @@  discard block
 block discarded – undo
117 117
         // Try to get document format from database
118 118
         if (!empty($requestData['id'])) {
119 119
 
120
-            $doc = null;
120
+            $doc = NULL;
121 121
 
122 122
             if (MathUtility::canBeInterpretedAsInteger($requestData['id'])) {
123 123
                 // find document from repository by uid
124 124
                 $this->document = $this->documentRepository->findOneByIdAndSettings((int) $requestData['id']);
125 125
                 if ($this->document) {
126
-                    $doc = Doc::getInstance($this->document->getLocation(), $this->settings, true);
126
+                    $doc = Doc::getInstance($this->document->getLocation(), $this->settings, TRUE);
127 127
                 } else {
128 128
                     $this->logger->error('Invalid UID "' . $requestData['id'] . '" or PID "' . $this->settings['storagePid'] . '" for document loading');
129 129
                 }
130 130
             } else if (GeneralUtility::isValidUrl($requestData['id'])) {
131 131
 
132
-                $doc = Doc::getInstance($requestData['id'], $this->settings, true);
132
+                $doc = Doc::getInstance($requestData['id'], $this->settings, TRUE);
133 133
 
134
-                if ($doc !== null) {
134
+                if ($doc !== NULL) {
135 135
                     if ($doc->recordId) {
136 136
                         $this->document = $this->documentRepository->findOneByRecordId($doc->recordId);
137 137
                     }
138 138
 
139
-                    if ($this->document === null) {
139
+                    if ($this->document === NULL) {
140 140
                         // create new dummy Document object
141 141
                         $this->document = GeneralUtility::makeInstance(Document::class);
142 142
                     }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 }
153 153
             }
154 154
 
155
-            if ($this->document !== null && $doc !== null) {
155
+            if ($this->document !== NULL && $doc !== NULL) {
156 156
                 $this->document->setDoc($doc);
157 157
             }
158 158
 
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
 
161 161
             $this->document = $this->documentRepository->findOneByRecordId($requestData['recordId']);
162 162
 
163
-            if ($this->document !== null) {
164
-                $doc = Doc::getInstance($this->document->getLocation(), $this->settings, true);
165
-                if ($this->document !== null && $doc !== null) {
163
+            if ($this->document !== NULL) {
164
+                $doc = Doc::getInstance($this->document->getLocation(), $this->settings, TRUE);
165
+                if ($this->document !== NULL && $doc !== NULL) {
166 166
                     $this->document->setDoc($doc);
167 167
                 } else {
168 168
                     $this->logger->error('Failed to load document with record ID "' . $requestData['recordId'] . '"');
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      */
191 191
     protected function isDocMissing()
192 192
     {
193
-        return $this->document === null || $this->document->getDoc() === null;
193
+        return $this->document === NULL || $this->document->getDoc() === NULL;
194 194
     }
195 195
 
196 196
     /**
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         if ($this->request->hasArgument($parameterName)) {
217 217
             return $this->request->getArgument($parameterName);
218 218
         }
219
-        return null;
219
+        return NULL;
220 220
     }
221 221
 
222 222
     /**
Please login to merge, or discard this patch.
Classes/Controller/CollectionController.php 3 patches
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class CollectionController extends AbstractController
33
-{
32
+class CollectionController extends AbstractController {
34 33
     /**
35 34
      * @var CollectionRepository
36 35
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
     /**
40 39
      * @param CollectionRepository $collectionRepository
41 40
      */
42
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
43
-    {
41
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
44 42
         $this->collectionRepository = $collectionRepository;
45 43
     }
46 44
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
     /**
53 51
      * @param MetadataRepository $metadataRepository
54 52
      */
55
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
56
-    {
53
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
57 54
         $this->metadataRepository = $metadataRepository;
58 55
     }
59 56
 
@@ -62,8 +59,7 @@  discard block
 block discarded – undo
62 59
      *
63 60
      * @return void
64 61
      */
65
-    public function listAction()
66
-    {
62
+    public function listAction() {
67 63
         $solr = Solr::getInstance($this->settings['solrcore']);
68 64
 
69 65
         if (!$solr->ready) {
@@ -146,8 +142,7 @@  discard block
 block discarded – undo
146 142
      *
147 143
      * @return void
148 144
      */
149
-    public function showAction(\Kitodo\Dlf\Domain\Model\Collection $collection)
150
-    {
145
+    public function showAction(\Kitodo\Dlf\Domain\Model\Collection $collection) {
151 146
         $searchParams = $this->getParametersSafely('searchParameter');
152 147
 
153 148
         // Instaniate the Solr. Without Solr present, we can't do anything.
@@ -199,8 +194,7 @@  discard block
 block discarded – undo
199 194
      *
200 195
      * @return void
201 196
      */
202
-    public function showSortedAction()
203
-    {
197
+    public function showSortedAction() {
204 198
         // if search was triggered, get search parameters from POST variables
205 199
         $searchParams = $this->getParametersSafely('searchParameter');
206 200
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         }
88 88
 
89 89
         if (count($collections) == 1 && empty($this->settings['dont_show_single']) && is_array($collections)) {
90
-            $this->forward('show', null, null, ['collection' => array_pop($collections)]);
90
+            $this->forward('show', NULL, NULL, ['collection' => array_pop($collections)]);
91 91
         }
92 92
 
93 93
         $processedCollections = [];
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $searchParams['collection'] = $collection;
167 167
         // If a targetPid is given, the results will be shown by ListView on the target page.
168 168
         if (!empty($this->settings['targetPid'])) {
169
-            $this->redirect('main', 'ListView', null,
169
+            $this->redirect('main', 'ListView', NULL,
170 170
                 [
171 171
                     'searchParameter' => $searchParams,
172 172
                     'widgetPage' => $widgetPage
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
         }
176 176
 
177 177
         // get all metadata records to be shown in results
178
-        $listedMetadata = $this->metadataRepository->findByIsListed(true);
178
+        $listedMetadata = $this->metadataRepository->findByIsListed(TRUE);
179 179
 
180 180
         // get all sortable metadata records
181
-        $sortableMetadata = $this->metadataRepository->findByIsSortable(true);
181
+        $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE);
182 182
 
183 183
         // get all documents of given collection
184 184
         $solrResults = $this->documentRepository->findSolrByCollection($collection, $this->settings, $searchParams, $listedMetadata);
@@ -204,13 +204,13 @@  discard block
 block discarded – undo
204 204
         // if search was triggered, get search parameters from POST variables
205 205
         $searchParams = $this->getParametersSafely('searchParameter');
206 206
 
207
-        $collection = null;
207
+        $collection = NULL;
208 208
         if ($searchParams['collection']['__identity'] && MathUtility::canBeInterpretedAsInteger($searchParams['collection']['__identity'])) {
209 209
             $collection = $this->collectionRepository->findByUid($searchParams['collection']['__identity']);
210 210
         }
211 211
 
212 212
         // output is done by show action
213
-        $this->forward('show', null, null, ['searchParameter' => $searchParams, 'collection' => $collection]);
213
+        $this->forward('show', NULL, NULL, ['searchParameter' => $searchParams, 'collection' => $collection]);
214 214
 
215 215
     }
216 216
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,20 +96,20 @@
 block discarded – undo
96 96
         foreach ($collections as $collection) {
97 97
             $solr_query = '';
98 98
             if ($collection->getIndexSearch() != '') {
99
-                $solr_query .= '(' . $collection->getIndexSearch() . ')';
99
+                $solr_query .= '('.$collection->getIndexSearch().')';
100 100
             } else {
101
-                $solr_query .= 'collection:("' . Solr::escapeQuery($collection->getIndexName()) . '")';
101
+                $solr_query .= 'collection:("'.Solr::escapeQuery($collection->getIndexName()).'")';
102 102
             }
103 103
 
104 104
             // virtual collection might yield documents, that are not toplevel true or partof anything
105 105
             if ($collection->getIndexSearch()) {
106 106
                 $params['query'] = $solr_query;
107 107
             } else {
108
-                $params['query'] = $solr_query . ' AND partof:0 AND toplevel:true';
108
+                $params['query'] = $solr_query.' AND partof:0 AND toplevel:true';
109 109
             }
110 110
             $partOfNothing = $solr->search_raw($params);
111 111
 
112
-            $params['query'] = $solr_query . ' AND NOT partof:0 AND toplevel:true';
112
+            $params['query'] = $solr_query.' AND NOT partof:0 AND toplevel:true';
113 113
             $partOfSomething = $solr->search_raw($params);
114 114
             // Titles are all documents that are "root" elements i.e. partof == 0
115 115
             $collectionInfo['titles'] = [];
Please login to merge, or discard this patch.
Classes/Controller/ToolboxController.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                 $image['mimetypeLabel'] = $mimetypeLabel;
254 254
                 break;
255 255
             } else {
256
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
256
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
257 257
             }
258 258
         }
259 259
         return $image;
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
             empty($page1Link)
345 345
             && empty($page2Link)
346 346
         ) {
347
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"');
347
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"');
348 348
         }
349 349
 
350 350
         if (!empty($page1Link)) {
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         if (!empty($workLink)) {
384 384
             $workLink = $workLink;
385 385
         } else {
386
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"');
386
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"');
387 387
         }
388 388
         return $workLink;
389 389
     }
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -23,15 +23,13 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class ToolboxController extends AbstractController
27
-{
26
+class ToolboxController extends AbstractController {
28 27
     /**
29 28
      * The main method of the plugin
30 29
      *
31 30
      * @return void
32 31
      */
33
-    public function mainAction()
34
-    {
32
+    public function mainAction() {
35 33
         // Load current document.
36 34
         $this->loadDocument($this->requestData);
37 35
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @return void
54 52
      */
55
-    public function annotationtool()
56
-    {
53
+    public function annotationtool() {
57 54
         if ($this->isDocMissingOrEmpty()) {
58 55
             // Quit without doing anything if required variables are not set.
59 56
             return '';
@@ -91,8 +88,7 @@  discard block
 block discarded – undo
91 88
      *
92 89
      * @return void
93 90
      */
94
-    public function fulltextdownloadtool()
95
-    {
91
+    public function fulltextdownloadtool() {
96 92
         if (
97 93
             $this->isDocMissingOrEmpty()
98 94
             || empty($this->extConf['fileGrpFulltext'])
@@ -136,8 +132,7 @@  discard block
 block discarded – undo
136 132
      *
137 133
      * @return void
138 134
      */
139
-    public function fulltexttool()
140
-    {
135
+    public function fulltexttool() {
141 136
         if (
142 137
             $this->isDocMissingOrEmpty()
143 138
             || empty($this->extConf['fileGrpFulltext'])
@@ -181,8 +176,7 @@  discard block
 block discarded – undo
181 176
      *
182 177
      * @return void
183 178
      */
184
-    public function imagedownloadtool()
185
-    {
179
+    public function imagedownloadtool() {
186 180
         if (
187 181
             $this->isDocMissingOrEmpty()
188 182
             || empty($this->settings['fileGrpsImageDownload'])
@@ -224,8 +218,7 @@  discard block
 block discarded – undo
224 218
      *
225 219
      * @return array Array of image links and image format information
226 220
      */
227
-    protected function getImage($page)
228
-    {
221
+    protected function getImage($page) {
229 222
         $image = [];
230 223
         // Get @USE value of METS fileGrp.
231 224
         $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->settings['fileGrpsImageDownload']);
@@ -258,8 +251,7 @@  discard block
 block discarded – undo
258 251
      *
259 252
      * @return void
260 253
      */
261
-    public function imagemanipulationtool()
262
-    {
254
+    public function imagemanipulationtool() {
263 255
         // Set parent element for initialization.
264 256
         $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool';
265 257
 
@@ -272,8 +264,7 @@  discard block
 block discarded – undo
272 264
      *
273 265
      * @return void
274 266
      */
275
-    public function pdfdownloadtool()
276
-    {
267
+    public function pdfdownloadtool() {
277 268
         if (
278 269
             $this->isDocMissingOrEmpty()
279 270
             || empty($this->extConf['fileGrpDownload'])
@@ -310,8 +301,7 @@  discard block
 block discarded – undo
310 301
      *
311 302
      * @return array Link to downloadable page
312 303
      */
313
-    protected function getPageLink()
314
-    {
304
+    protected function getPageLink() {
315 305
         $page1Link = '';
316 306
         $page2Link = '';
317 307
         $pageLinkArray = [];
@@ -355,8 +345,7 @@  discard block
 block discarded – undo
355 345
      *
356 346
      * @return string Link to downloadable work
357 347
      */
358
-    protected function getWorkLink()
359
-    {
348
+    protected function getWorkLink() {
360 349
         $workLink = '';
361 350
         $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['fileGrpDownload']);
362 351
         // Get work link.
@@ -385,8 +374,7 @@  discard block
 block discarded – undo
385 374
      *
386 375
      * @return void
387 376
      */
388
-    public function searchindocumenttool()
389
-    {
377
+    public function searchindocumenttool() {
390 378
         if (
391 379
             $this->isDocMissingOrEmpty()
392 380
             || empty($this->extConf['fileGrpFulltext'])
@@ -448,8 +436,7 @@  discard block
 block discarded – undo
448 436
      *
449 437
      * @return string with current document id
450 438
      */
451
-    protected function getCurrentDocumentId()
452
-    {
439
+    protected function getCurrentDocumentId() {
453 440
         $id = $this->document->getUid();
454 441
 
455 442
         if ($id !== null && $id > 0) {
@@ -484,8 +471,7 @@  discard block
 block discarded – undo
484 471
      *
485 472
      * @return string with encrypted core name
486 473
      */
487
-    protected function getEncryptedCoreName()
488
-    {
474
+    protected function getEncryptedCoreName() {
489 475
         // Get core name.
490 476
         $name = Helper::getIndexNameFromUid($this->settings['solrcore'], 'tx_dlf_solrcores');
491 477
         // Encrypt core name.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         foreach ($tools as $tool) {
44 44
             $tool = trim(str_replace('tx_dlf_', '', $tool));
45 45
             $this->$tool();
46
-            $this->view->assign($tool, true);
46
+            $this->view->assign($tool, TRUE);
47 47
         }
48 48
     }
49 49
 
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 
78 78
         $annotationContainers = $this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$this->requestData['page']]]['annotationContainers'];
79 79
         if (
80
-            $annotationContainers != null
80
+            $annotationContainers != NULL
81 81
             && sizeof($annotationContainers) > 0
82 82
         ) {
83
-            $this->view->assign('annotationTool', true);
83
+            $this->view->assign('annotationTool', TRUE);
84 84
         } else {
85
-            $this->view->assign('annotationTool', false);
85
+            $this->view->assign('annotationTool', FALSE);
86 86
         }
87 87
     }
88 88
 
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
             }
126 126
         }
127 127
         if (!empty($fullTextFile)) {
128
-            $this->view->assign('fulltextDownload', true);
128
+            $this->view->assign('fulltextDownload', TRUE);
129 129
         } else {
130
-            $this->view->assign('fulltextDownload', false);
130
+            $this->view->assign('fulltextDownload', FALSE);
131 131
         }
132 132
     }
133 133
 
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
             }
170 170
         }
171 171
         if (!empty($fullTextFile)) {
172
-            $this->view->assign('fulltext', true);
172
+            $this->view->assign('fulltext', TRUE);
173 173
             $this->view->assign('activateFullTextInitially', MathUtility::forceIntegerInRange($this->settings['activateFullTextInitially'], 0, 1, 0));
174 174
         } else {
175
-            $this->view->assign('fulltext', false);
175
+            $this->view->assign('fulltext', FALSE);
176 176
         }
177 177
     }
178 178
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
         // Set parent element for initialization.
264 264
         $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool';
265 265
 
266
-        $this->view->assign('imageManipulation', true);
266
+        $this->view->assign('imageManipulation', TRUE);
267 267
         $this->view->assign('parentContainer', $parentContainer);
268 268
     }
269 269
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     {
453 453
         $id = $this->document->getUid();
454 454
 
455
-        if ($id !== null && $id > 0) {
455
+        if ($id !== NULL && $id > 0) {
456 456
             // we found the document uid
457 457
             return (string) $id;
458 458
         } else {
Please login to merge, or discard this patch.
Classes/Controller/NavigationController.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 
75 75
         $pageOptions = [];
76 76
         for ($i = 1; $i <= $this->document->getDoc()->numPages; $i++) {
77
-            $pageOptions[$i] = '[' . $i . ']' . ($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : '');
77
+            $pageOptions[$i] = '['.$i.']'.($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : '');
78 78
         }
79 79
         $this->view->assign('pageOptions', $pageOptions);
80 80
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class NavigationController extends AbstractController
27
-{
26
+class NavigationController extends AbstractController {
28 27
     /**
29 28
      * Method to get the page select values and use them with chash
30 29
      * @param \Kitodo\Dlf\Domain\Model\PageSelectForm|NULL $pageSelectForm
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
      *
54 53
      * @return void
55 54
      */
56
-    public function mainAction()
57
-    {
55
+    public function mainAction() {
58 56
         // Load current document.
59 57
         $this->loadDocument($this->requestData);
60 58
         if ($this->isDocMissing()) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Classes/Controller/TableOfContentsController.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
                 }
141 141
             }
142 142
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
143
-            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB');
143
+            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB');
144 144
         }
145 145
         return $entryArray;
146 146
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  * @subpackage dlf
25 25
  * @access public
26 26
  */
27
-class TableOfContentsController extends AbstractController
28
-{
27
+class TableOfContentsController extends AbstractController {
29 28
     /**
30 29
      * This holds the active entries according to the currently selected page
31 30
      *
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      *
40 39
      * @return void
41 40
      */
42
-    public function mainAction()
43
-    {
41
+    public function mainAction() {
44 42
         // Load current document.
45 43
         $this->loadDocument($this->requestData);
46 44
         if ($this->isDocMissing()) {
@@ -63,8 +61,7 @@  discard block
 block discarded – undo
63 61
      * @access protected
64 62
      * @return array HMENU array
65 63
      */
66
-    protected function makeMenuArray()
67
-    {
64
+    protected function makeMenuArray() {
68 65
         // Set default values for page if not set.
69 66
         // $this->requestData['page'] may be integer or string (physical structure @ID)
70 67
         if (
@@ -140,8 +137,7 @@  discard block
 block discarded – undo
140 137
      *
141 138
      * @return array HMENU array for menu entry
142 139
      */
143
-    protected function getMenuEntry(array $entry, $recursive = false)
144
-    {
140
+    protected function getMenuEntry(array $entry, $recursive = false) {
145 141
         $entry = $this->resolveMenuEntry($entry);
146 142
 
147 143
         $entryArray = [];
@@ -235,8 +231,7 @@  discard block
 block discarded – undo
235 231
      * @param array $entry
236 232
      * @return array
237 233
      */
238
-    protected function resolveMenuEntry($entry)
239
-    {
234
+    protected function resolveMenuEntry($entry) {
240 235
         // If the menu entry points to the parent document,
241 236
         // resolve to the parent UID set on indexation.
242 237
         $doc = $this->document->getDoc();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
             }
100 100
             // Go through table of contents and create all menu entries.
101 101
             foreach ($this->document->getDoc()->tableOfContents as $entry) {
102
-                $menuArray[] = $this->getMenuEntry($entry, true);
102
+                $menuArray[] = $this->getMenuEntry($entry, TRUE);
103 103
             }
104 104
         } else {
105 105
             // Go through table of contents and create top-level menu entries.
106 106
             foreach ($this->document->getDoc()->tableOfContents as $entry) {
107
-                $menuArray[] = $this->getMenuEntry($entry, false);
107
+                $menuArray[] = $this->getMenuEntry($entry, FALSE);
108 108
             }
109 109
             // Build table of contents from database.
110 110
             $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         'pagination' => '',
124 124
                         'targetUid' => $resArray['uid']
125 125
                     ];
126
-                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false);
126
+                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE);
127 127
                 }
128 128
             }
129 129
         }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      *
141 141
      * @return array HMENU array for menu entry
142 142
      */
143
-    protected function getMenuEntry(array $entry, $recursive = false)
143
+    protected function getMenuEntry(array $entry, $recursive = FALSE)
144 144
     {
145 145
         $entry = $this->resolveMenuEntry($entry);
146 146
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         }
199 199
         // Build sub-menu if available and called recursively.
200 200
         if (
201
-            $recursive === true
201
+            $recursive === TRUE
202 202
             && !empty($entry['children'])
203 203
         ) {
204 204
             // Build sub-menu only if one of the following conditions apply:
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                     if (in_array($child['id'], $this->activeEntries)) {
217 217
                         $entryArray['ITEM_STATE'] = 'ACT';
218 218
                     }
219
-                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true);
219
+                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE);
220 220
                 }
221 221
             }
222 222
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
Please login to merge, or discard this patch.