Passed
Pull Request — master (#103)
by Alexander
03:37
created
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/BasketController.php 3 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 foreach ($this->requestData['selected'] as $docValue) {
110 110
                     if ($docValue['id']) {
111 111
                         $docData = $this->getDocumentData($docValue['id'], $docValue);
112
-                        $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
112
+                        $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
113 113
                         $this->redirectToUri($pdfUrl);
114 114
                     }
115 115
                 }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         if ($allMails->count() > 0) {
173 173
             $mailSelect[0] = htmlspecialchars(LocalizationUtility::translate('basket.chooseMail', 'dlf'));
174 174
             foreach ($allMails as $mail) {
175
-                $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()) . ' (' . htmlspecialchars($mail->getMail()) . ')';
175
+                $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()).' ('.htmlspecialchars($mail->getMail()).')';
176 176
             }
177 177
             $this->view->assign('mailSelect', $mailSelect);
178 178
         }
@@ -256,12 +256,12 @@  discard block
 block discarded – undo
256 256
 
257 257
         $entryArray['BASKETDATA'] = $docData;
258 258
 
259
-        $entryKey = $id . '_' . $startpage;
259
+        $entryKey = $id.'_'.$startpage;
260 260
         if (!empty($startX)) {
261
-            $entryKey .= '_' . $startX;
261
+            $entryKey .= '_'.$startX;
262 262
         }
263 263
         if (!empty($endX)) {
264
-            $entryKey .= '_' . $endX;
264
+            $entryKey .= '_'.$endX;
265 265
         }
266 266
 
267 267
         $entryArray['id'] = $id;
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : (int) $data['endY'], $urlParams);
313 313
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : (int) $data['rotation'], $urlParams);
314 314
 
315
-            $downloadUrl = $this->settings['pdfgenerate'] . $urlParams;
315
+            $downloadUrl = $this->settings['pdfgenerate'].$urlParams;
316 316
 
317 317
             $title = $this->document->getTitle();
318 318
             if (empty($title)) {
@@ -323,15 +323,15 @@  discard block
 block discarded – undo
323 323
             $info = '';
324 324
             if ($data['startX'] != '' && $data['endX'] != '') {
325 325
                 // cutout
326
-                $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')) . ' ';
326
+                $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')).' ';
327 327
             }
328 328
             if ($data['startpage'] == $data['endpage']) {
329 329
                 // One page
330
-                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'];
330
+                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'];
331 331
             } else {
332
-                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'] . '-' . $data['endpage'];
332
+                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'].'-'.$data['endpage'];
333 333
             }
334
-            $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . htmlspecialchars($title) . '</a> (' . $info . ')';
334
+            $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.htmlspecialchars($title).'</a> ('.$info.')';
335 335
             if ($data['startpage'] == $data['endpage']) {
336 336
                 $pageNums = 1;
337 337
             } else {
@@ -407,12 +407,12 @@  discard block
 block discarded – undo
407 407
             if ($_piVars['addToBasket'] == 'list') {
408 408
                 $documentItem['endpage'] = $this->document->getDoc()->numPages;
409 409
             }
410
-            $arrayKey = $documentItem['id'] . '_' . $page;
410
+            $arrayKey = $documentItem['id'].'_'.$page;
411 411
             if (!empty($documentItem['startX'])) {
412
-                $arrayKey .= '_' . $documentItem['startX'];
412
+                $arrayKey .= '_'.$documentItem['startX'];
413 413
             }
414 414
             if (!empty($documentItem['endX'])) {
415
-                $arrayKey .= '_' . $documentItem['endX'];
415
+                $arrayKey .= '_'.$documentItem['endX'];
416 416
             }
417 417
             // do not add more than one identical object
418 418
             if (!in_array($arrayKey, $items)) {
@@ -431,14 +431,14 @@  discard block
 block discarded – undo
431 431
                     // remove parameter endpage
432 432
                     $pdfParams = str_replace(",##endpage##", '', $pdfParams);
433 433
                 }
434
-                $pdfGenerateUrl = $this->settings['pdfgenerate'] . $pdfParams;
434
+                $pdfGenerateUrl = $this->settings['pdfgenerate'].$pdfParams;
435 435
                 if ($this->settings['pregeneration']) {
436 436
                     // send ajax request to webapp
437 437
                     $output .= '
438 438
      <script>
439 439
       $(document).ready(function(){
440 440
        $.ajax({
441
-         url: "' . $pdfGenerateUrl . '",
441
+         url: "' . $pdfGenerateUrl.'",
442 442
        }).done(function() {
443 443
        });
444 444
       });
@@ -476,12 +476,12 @@  discard block
 block discarded – undo
476 476
         }
477 477
         foreach ($_piVars['selected'] as $value) {
478 478
             if (isset($value['id'])) {
479
-                $arrayKey = $value['id'] . '_' . $value['startpage'];
479
+                $arrayKey = $value['id'].'_'.$value['startpage'];
480 480
                 if (!empty($value['startX'])) {
481
-                    $arrayKey .= '_' . $value['startX'];
481
+                    $arrayKey .= '_'.$value['startX'];
482 482
                 }
483 483
                 if (!empty($value['endX'])) {
484
-                    $arrayKey .= '_' . $value['endX'];
484
+                    $arrayKey .= '_'.$value['endX'];
485 485
                 }
486 486
                 if (isset($items[$arrayKey])) {
487 487
                     unset($items[$arrayKey]);
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 
515 515
         $mailObject = $this->mailRepository->findByUid(intval($mailId))->getFirst();
516 516
 
517
-        $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf')) . "\n";
517
+        $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf'))."\n";
518 518
         $numberOfPages = 0;
519 519
         $pdfUrl = $this->settings['pdfdownload'];
520 520
         // prepare links
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
             if ($docValue['id']) {
523 523
                 $explodeId = explode("_", $docValue['id']);
524 524
                 $docData = $this->getDocumentData($explodeId[0], $docValue);
525
-                $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
525
+                $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
526 526
                 $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
527 527
                 if ($pages === 0) {
528 528
                     $numberOfPages = $numberOfPages + 1;
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
         }
534 534
         // Remove leading/tailing pdfparamseperator
535 535
         $pdfUrl = trim($pdfUrl, $this->settings['pdfparamseparator']);
536
-        $mailBody = $mailText . $pdfUrl;
536
+        $mailBody = $mailText.$pdfUrl;
537 537
         // Get hook objects.
538 538
         $hookObjects = Helper::getHookObjects($this->scriptRelPath);
539 539
         // Hook for getting a customized mail body.
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
         $newActionLog = GeneralUtility::makeInstance(ActionLog::class);
561 561
         $newActionLog->setFileName($pdfUrl);
562 562
         $newActionLog->setCountPages($numberOfPages);
563
-        $newActionLog->setLabel('Mail: ' . $mailObject->getMail());
563
+        $newActionLog->setLabel('Mail: '.$mailObject->getMail());
564 564
 
565 565
         if ($GLOBALS["TSFE"]->loginUser) {
566 566
             // internal user
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         foreach ($this->requestData['selected'] as $docId => $docValue) {
593 593
             if ($docValue['id']) {
594 594
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
595
-                $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
595
+                $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
596 596
                 $numberOfPages += $docData['pageNums'];
597 597
             }
598 598
         }
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
                 if ($docValue['id']) {
611 611
                     $explodeId = explode("_", $docId);
612 612
                     $docData = $this->getDocumentData($explodeId[0], $docValue);
613
-                    $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
613
+                    $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
614 614
                     $numberOfPages += $docData['pageNums'];
615 615
                 }
616 616
             }
@@ -627,12 +627,12 @@  discard block
 block discarded – undo
627 627
             // internal user
628 628
             $actionLog->setUserId($GLOBALS["TSFE"]->fe_user->user['uid']);
629 629
             $actionLog->setName($GLOBALS["TSFE"]->fe_user->user['username']);
630
-            $actionLog->setLabel('Print: ' . $printer->getLabel());
630
+            $actionLog->setLabel('Print: '.$printer->getLabel());
631 631
         } else {
632 632
             // external user
633 633
             $actionLog->setUserId(0);
634 634
             $actionLog->setName('n/a');
635
-            $actionLog->setLabel('Print: ' . $printer->getLabel());
635
+            $actionLog->setLabel('Print: '.$printer->getLabel());
636 636
         }
637 637
         // add action to protocol
638 638
         $this->actionLogRepository->add($actionLog);
Please login to merge, or discard this patch.
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
  * @subpackage dlf
32 32
  * @access public
33 33
  */
34
-class BasketController extends AbstractController
35
-{
34
+class BasketController extends AbstractController {
36 35
     /**
37 36
      * @var BasketRepository
38 37
      */
@@ -41,8 +40,7 @@  discard block
 block discarded – undo
41 40
     /**
42 41
      * @param BasketRepository $basketRepository
43 42
      */
44
-    public function injectBasketRepository(BasketRepository $basketRepository)
45
-    {
43
+    public function injectBasketRepository(BasketRepository $basketRepository) {
46 44
         $this->basketRepository = $basketRepository;
47 45
     }
48 46
 
@@ -54,8 +52,7 @@  discard block
 block discarded – undo
54 52
     /**
55 53
      * @param MailRepository $mailRepository
56 54
      */
57
-    public function injectMailRepository(MailRepository $mailRepository)
58
-    {
55
+    public function injectMailRepository(MailRepository $mailRepository) {
59 56
         $this->mailRepository = $mailRepository;
60 57
     }
61 58
 
@@ -67,8 +64,7 @@  discard block
 block discarded – undo
67 64
     /**
68 65
      * @param PrinterRepository $printerRepository
69 66
      */
70
-    public function injectPrinterRepository(PrinterRepository $printerRepository)
71
-    {
67
+    public function injectPrinterRepository(PrinterRepository $printerRepository) {
72 68
         $this->printerRepository = $printerRepository;
73 69
     }
74 70
 
@@ -80,8 +76,7 @@  discard block
 block discarded – undo
80 76
     /**
81 77
      * @param ActionLogRepository $actionLogRepository
82 78
      */
83
-    public function injectActionLogRepository(ActionLogRepository $actionLogRepository)
84
-    {
79
+    public function injectActionLogRepository(ActionLogRepository $actionLogRepository) {
85 80
         $this->actionLogRepository = $actionLogRepository;
86 81
     }
87 82
 
@@ -90,8 +85,7 @@  discard block
 block discarded – undo
90 85
      *
91 86
      * @return void
92 87
      */
93
-    public function basketAction()
94
-    {
88
+    public function basketAction() {
95 89
         $basket = $this->getBasketData();
96 90
 
97 91
         // action remove from basket
@@ -137,8 +131,7 @@  discard block
 block discarded – undo
137 131
      *
138 132
      * @return void
139 133
      */
140
-    public function addAction()
141
-    {
134
+    public function addAction() {
142 135
         $basket = $this->getBasketData();
143 136
 
144 137
         if (
@@ -156,8 +149,7 @@  discard block
 block discarded – undo
156 149
      *
157 150
      * @return void
158 151
      */
159
-    public function mainAction()
160
-    {
152
+    public function mainAction() {
161 153
         $basket = $this->getBasketData();
162 154
 
163 155
         $countDocs = 0;
@@ -203,8 +195,7 @@  discard block
 block discarded – undo
203 195
      *
204 196
      * @return Basket The found data from user session.
205 197
      */
206
-    protected function getBasketData()
207
-    {
198
+    protected function getBasketData() {
208 199
         // get user session
209 200
         $sessionId = $GLOBALS['TSFE']->fe_user->id;
210 201
 
@@ -238,8 +229,7 @@  discard block
 block discarded – undo
238 229
      *
239 230
      * @return string One basket entry
240 231
      */
241
-    protected function getEntry($data)
242
-    {
232
+    protected function getEntry($data) {
243 233
         if (is_object($data)) {
244 234
             $data = get_object_vars($data);
245 235
         }
@@ -291,8 +281,7 @@  discard block
 block discarded – undo
291 281
      *
292 282
      * @return mixed download url or false
293 283
      */
294
-    protected function getDocumentData($id, $data)
295
-    {
284
+    protected function getDocumentData($id, $data) {
296 285
         // get document instance to load further information
297 286
         $this->loadDocument(['id' => $id]);
298 287
         if ($this->document) {
@@ -360,8 +349,7 @@  discard block
 block discarded – undo
360 349
      *
361 350
      * @return array Basket data and Javascript output
362 351
      */
363
-    protected function addToBasket($_piVars, $basket)
364
-    {
352
+    protected function addToBasket($_piVars, $basket) {
365 353
         $output = '';
366 354
 
367 355
         if (!$_piVars['startpage']) {
@@ -468,8 +456,7 @@  discard block
 block discarded – undo
468 456
      *
469 457
      * @return Basket basket
470 458
      */
471
-    protected function removeFromBasket($_piVars, $basket)
472
-    {
459
+    protected function removeFromBasket($_piVars, $basket) {
473 460
         if (!empty($basket->getDocIds())) {
474 461
             $items = json_decode($basket->getDocIds());
475 462
             $items = get_object_vars($items);
@@ -507,8 +494,7 @@  discard block
 block discarded – undo
507 494
      *
508 495
      * @return void
509 496
      */
510
-    protected function sendMail()
511
-    {
497
+    protected function sendMail() {
512 498
         // send mail
513 499
         $mailId = $this->requestData['mail_action'];
514 500
 
@@ -585,8 +571,7 @@  discard block
 block discarded – undo
585 571
      *
586 572
      * @return void
587 573
      */
588
-    protected function printDocument($basket)
589
-    {
574
+    protected function printDocument($basket) {
590 575
         $pdfUrl = $this->settings['pdfprint'];
591 576
         $numberOfPages = 0;
592 577
         foreach ($this->requestData['selected'] as $docId => $docValue) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
         $countDocs = 0;
164 164
         if ($basket->getDocIds()) {
165
-            $countDocs = count(json_decode($basket->getDocIds(), true));
165
+            $countDocs = count(json_decode($basket->getDocIds(), TRUE));
166 166
         }
167 167
         $this->view->assign('countDocs', $countDocs);
168 168
 
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
             $basket = $this->basketRepository->findOneByFeUserId((int) $GLOBALS['TSFE']->fe_user->user['uid']);
213 213
         } else {
214 214
             $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', '');
215
-            $GLOBALS['TSFE']->fe_user->sesData_change = true;
215
+            $GLOBALS['TSFE']->fe_user->sesData_change = TRUE;
216 216
             $GLOBALS['TSFE']->fe_user->storeSessionData();
217 217
 
218 218
             $basket = $this->basketRepository->findOneBySessionId($sessionId);
219 219
         }
220 220
         // session doesnt exists
221
-        if ($basket === null) {
221
+        if ($basket === NULL) {
222 222
             // create new basket in db
223 223
             $basket = GeneralUtility::makeInstance(Basket::class);
224 224
             $basket->setSessionId($sessionId);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                 'record_id' => $this->document->getRecordId(),
348 348
             ];
349 349
         }
350
-        return false;
350
+        return FALSE;
351 351
     }
352 352
 
353 353
     /**
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         } else {
370 370
             $page = (int) $_piVars['startpage'];
371 371
         }
372
-        if ($page != null || $_piVars['addToBasket'] == 'list') {
372
+        if ($page != NULL || $_piVars['addToBasket'] == 'list') {
373 373
             $documentItem = [
374 374
                 'id' => (int) $_piVars['id'],
375 375
                 'startpage' => (int) $_piVars['startpage'],
@@ -391,8 +391,8 @@  discard block
 block discarded – undo
391 391
             // get document instance to load further information
392 392
             $this->loadDocument(['id' => $documentItem['id']]);
393 393
             if (
394
-                $this->document === null
395
-                || $this->document->getDoc() === null
394
+                $this->document === NULL
395
+                || $this->document->getDoc() === NULL
396 396
             ) {
397 397
                 // Quit without doing anything if required variables are not set.
398 398
                 return;
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             }
448 448
 
449 449
             $basket->setDocIds(json_encode($items));
450
-            if ($basket->getUid() === null) {
450
+            if ($basket->getUid() === NULL) {
451 451
                 $this->basketRepository->add($basket);
452 452
             } else {
453 453
                 $this->basketRepository->update($basket);
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   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
  * @subpackage dlf
33 33
  * @access public
34 34
  */
35
-abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController implements LoggerAwareInterface
36
-{
35
+abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController implements LoggerAwareInterface {
37 36
     use LoggerAwareTrait;
38 37
 
39 38
     /**
@@ -44,8 +43,7 @@  discard block
 block discarded – undo
44 43
     /**
45 44
      * @param DocumentRepository $documentRepository
46 45
      */
47
-    public function injectDocumentRepository(DocumentRepository $documentRepository)
48
-    {
46
+    public function injectDocumentRepository(DocumentRepository $documentRepository) {
49 47
         $this->documentRepository = $documentRepository;
50 48
     }
51 49
 
@@ -85,8 +83,7 @@  discard block
 block discarded – undo
85 83
      * @access protected
86 84
      * @return void
87 85
      */
88
-    protected function initialize()
89
-    {
86
+    protected function initialize() {
90 87
         $this->requestData = GeneralUtility::_GPmerged('tx_dlf');
91 88
         if (empty($this->requestData['page'])) {
92 89
             $this->requestData['page'] = 1;
@@ -112,8 +109,7 @@  discard block
 block discarded – undo
112 109
      *
113 110
      * @return void
114 111
      */
115
-    protected function loadDocument($requestData)
116
-    {
112
+    protected function loadDocument($requestData) {
117 113
         // Try to get document format from database
118 114
         if (!empty($requestData['id'])) {
119 115
 
@@ -186,8 +182,7 @@  discard block
 block discarded – undo
186 182
      *
187 183
      * @return null|string|array
188 184
      */
189
-    protected function getParametersSafely($parameterName)
190
-    {
185
+    protected function getParametersSafely($parameterName) {
191 186
         if ($this->request->hasArgument($parameterName)) {
192 187
             return $this->request->getArgument($parameterName);
193 188
         }
@@ -201,8 +196,7 @@  discard block
 block discarded – undo
201 196
      *
202 197
      * @return void
203 198
      */
204
-    public function __construct()
205
-    {
199
+    public function __construct() {
206 200
         $this->initialize();
207 201
     }
208 202
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +10 added lines, -10 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
                     }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 }
148 148
             }
149 149
 
150
-            if ($this->document !== null && $doc !== null) {
150
+            if ($this->document !== NULL && $doc !== NULL) {
151 151
                 $this->document->setDoc($doc);
152 152
             }
153 153
 
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 
156 156
             $this->document = $this->documentRepository->findOneByRecordId($requestData['recordId']);
157 157
 
158
-            if ($this->document !== null) {
159
-                $doc = Doc::getInstance($this->document->getLocation(), $this->settings, true);
160
-                if ($this->document !== null && $doc !== null) {
158
+            if ($this->document !== NULL) {
159
+                $doc = Doc::getInstance($this->document->getLocation(), $this->settings, TRUE);
160
+                if ($this->document !== NULL && $doc !== NULL) {
161 161
                     $this->document->setDoc($doc);
162 162
                 } else {
163 163
                     $this->logger->error('Failed to load document with record ID "' . $requestData['recordId'] . '"');
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         if ($this->request->hasArgument($parameterName)) {
192 192
             return $this->request->getArgument($parameterName);
193 193
         }
194
-        return null;
194
+        return NULL;
195 195
     }
196 196
 
197 197
     /**
Please login to merge, or discard this patch.
Classes/Controller/CalendarController.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 $_day = date('j', $dateTimestamp);
149 149
                 $calendarIssuesByYear[$_year][$_month][$_day][] = $issue;
150 150
             } else {
151
-                $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication');
151
+                $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication');
152 152
             }
153 153
         }
154 154
         // Sort by years.
@@ -271,16 +271,16 @@  discard block
 block discarded – undo
271 271
                 'DAYFRI_NAME' => strftime('%a', strtotime('last Friday')),
272 272
                 'DAYSAT_NAME' => strftime('%a', strtotime('last Saturday')),
273 273
                 'DAYSUN_NAME' => strftime('%a', strtotime('last Sunday')),
274
-                'MONTHNAME'  => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year,
274
+                'MONTHNAME'  => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year,
275 275
                 'CALYEAR' => ($i == $firstMonth) ? $year : ''
276 276
             ];
277 277
 
278
-            $firstOfMonth = strtotime($year . '-' . $i . '-1');
278
+            $firstOfMonth = strtotime($year.'-'.$i.'-1');
279 279
             $lastOfMonth = strtotime('last day of', ($firstOfMonth));
280 280
             $firstOfMonthStart = strtotime('last Monday', $firstOfMonth);
281 281
             // There are never more than 6 weeks in a month.
282 282
             for ($j = 0; $j <= 5; $j++) {
283
-                $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart);
283
+                $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart);
284 284
 
285 285
                 $calendarData[$i]['week'][$j] = [
286 286
                     'DAYMON' => ['dayValue' => '&nbsp;'],
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
                 ];
294 294
                 // Every week has seven days. ;-)
295 295
                 for ($k = 0; $k <= 6; $k++) {
296
-                    $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek);
296
+                    $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek);
297 297
                     if (
298 298
                         $currentDayTime >= $firstOfMonth
299 299
                         && $currentDayTime <= $lastOfMonth
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                             }
325 325
                             $dayLinkDiv = $dayLinksText;
326 326
                         }
327
-                        switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) {
327
+                        switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) {
328 328
                             case '0':
329 329
                                 $calendarData[$i]['week'][$j]['DAYSUN']['dayValue'] = strftime('%d', $currentDayTime);
330 330
                                 if ((int) $dayLinks === (int) date('j', $currentDayTime)) {
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class CalendarController extends AbstractController
30
-{
29
+class CalendarController extends AbstractController {
31 30
     /**
32 31
      * @var StructureRepository
33 32
      */
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
     /**
37 36
      * @param StructureRepository $structureRepository
38 37
      */
39
-    public function injectStructureRepository(StructureRepository $structureRepository)
40
-    {
38
+    public function injectStructureRepository(StructureRepository $structureRepository) {
41 39
         $this->structureRepository = $structureRepository;
42 40
     }
43 41
 
@@ -54,8 +52,7 @@  discard block
 block discarded – undo
54 52
      *
55 53
      * @return void
56 54
      */
57
-    public function mainAction()
58
-    {
55
+    public function mainAction() {
59 56
         // Set initial document (anchor or year file) if configured.
60 57
         if (empty($this->requestData['id']) && !empty($this->settings['initialDocument'])) {
61 58
             $this->requestData['id'] = $this->settings['initialDocument'];
@@ -100,8 +97,7 @@  discard block
 block discarded – undo
100 97
      *
101 98
      * @return void
102 99
      */
103
-    public function calendarAction()
104
-    {
100
+    public function calendarAction() {
105 101
         // access arguments passed by the mainAction()
106 102
         $mainrequestData = $this->request->getArguments();
107 103
 
@@ -204,8 +200,7 @@  discard block
 block discarded – undo
204 200
      *
205 201
      * @return void
206 202
      */
207
-    public function yearsAction()
208
-    {
203
+    public function yearsAction() {
209 204
         // access arguments passed by the mainAction()
210 205
         $mainrequestData = $this->request->getArguments();
211 206
 
@@ -259,8 +254,7 @@  discard block
 block discarded – undo
259 254
      *
260 255
      * @return string Content for template subpart
261 256
      */
262
-    protected function getCalendarYear($calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12)
263
-    {
257
+    protected function getCalendarYear($calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) {
264 258
         $calendarData = [];
265 259
         for ($i = $firstMonth; $i <= $lastMonth; $i++) {
266 260
             $calendarData[$i] = [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         // Load current document.
65 65
         $this->loadDocument($this->requestData);
66
-        if ($this->document === null) {
66
+        if ($this->document === NULL) {
67 67
             // Quit without doing anything if required variables are not set.
68 68
             return;
69 69
         }
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
         switch ($type) {
79 79
             case 'newspaper':
80 80
             case 'ephemera':
81
-                $this->forward('years', null, null, $this->requestData);
81
+                $this->forward('years', NULL, NULL, $this->requestData);
82 82
                 break;
83 83
             case 'year':
84
-                $this->forward('calendar', null, null, $this->requestData);
84
+                $this->forward('calendar', NULL, NULL, $this->requestData);
85 85
                 break;
86 86
             case 'issue':
87 87
             default:
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         // Load current document.
112 112
         $this->loadDocument($this->requestData);
113
-        if ($this->document === null) {
113
+        if ($this->document === NULL) {
114 114
             // Quit without doing anything if required variables are not set.
115 115
             return;
116 116
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 $title = $document->getTitle();
128 128
             } else {
129 129
                 $title = !empty($document->getMetsLabel()) ? $document->getMetsLabel() : $document->getMetsOrderlabel();
130
-                if (strtotime($title) !== false) {
130
+                if (strtotime($title) !== FALSE) {
131 131
                     $title = strftime('%x', strtotime($title));
132 132
                 }
133 133
             }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         $calendarIssuesByYear = [];
143 143
         foreach ($issues as $issue) {
144 144
             $dateTimestamp = strtotime($issue['year']);
145
-            if ($dateTimestamp !== false) {
145
+            if ($dateTimestamp !== FALSE) {
146 146
                 $_year = date('Y', $dateTimestamp);
147 147
                 $_month = date('n', $dateTimestamp);
148 148
                 $_day = date('j', $dateTimestamp);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
         // Load current document.
216 216
         $this->loadDocument($this->requestData);
217
-        if ($this->document === null) {
217
+        if ($this->document === NULL) {
218 218
             // Quit without doing anything if required variables are not set.
219 219
             return;
220 220
         }
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
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
         $countVolumes = $this->documentRepository->countAllVolumes($this->settings);
35 35
 
36 36
         // Set replacements.
37
-        $args['###TITLES###'] = $countTitles . ' ' . htmlspecialchars(
37
+        $args['###TITLES###'] = $countTitles.' '.htmlspecialchars(
38 38
             LocalizationUtility::translate(
39 39
                 ($countTitles > 1 ? 'titles' : 'title'), 'dlf'
40 40
             )
41 41
         );
42 42
 
43
-        $args['###VOLUMES###'] = $countVolumes . ' ' . htmlspecialchars(
43
+        $args['###VOLUMES###'] = $countVolumes.' '.htmlspecialchars(
44 44
             LocalizationUtility::translate(
45 45
                 ($countTitles > 1 ? 'volumes' : 'volume'), 'dlf'
46 46
             )
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
         $countTitles = $this->documentRepository->countAllTitles($this->settings);
34 32
         $countVolumes = $this->documentRepository->countAllVolumes($this->settings);
35 33
 
Please login to merge, or discard this patch.
Classes/Controller/SearchController.php 3 patches
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $this->searchParams = $this->getParametersSafely('searchParameter');
78 78
 
79 79
         // output is done by main action
80
-        $this->forward('main', null, null, ['searchParameter' => $this->searchParams]);
80
+        $this->forward('main', NULL, NULL, ['searchParameter' => $this->searchParams]);
81 81
     }
82 82
 
83 83
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function mainAction()
91 91
     {
92
-        $listViewSearch = false;
92
+        $listViewSearch = FALSE;
93 93
         // Quit without doing anything if required variables are not set.
94 94
         if (empty($this->settings['solrcore'])) {
95 95
             $this->logger->warning('Incomplete plugin configuration');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
         if (isset($listRequestData['searchParameter']) && is_array($listRequestData['searchParameter'])) {
105 105
             $this->searchParams = array_merge($this->searchParams ? : [], $listRequestData['searchParameter']);
106
-            $listViewSearch = true;
106
+            $listViewSearch = TRUE;
107 107
         }
108 108
 
109 109
         // Pagination of Results: Pass the currentPage to the fluid template to calculate current index of search result.
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         // If a targetPid is given, the results will be shown by ListView on the target page.
116 116
         if (!empty($this->settings['targetPid']) && !empty($this->searchParams) && !$listViewSearch) {
117
-            $this->redirect('main', 'ListView', null,
117
+            $this->redirect('main', 'ListView', NULL,
118 118
                 [
119 119
                     'searchParameter' => $this->searchParams,
120 120
                     'widgetPage' => $widgetPage
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
         // If no search has been executed, no variables habe to be prepared. An empty form will be shown.
126 126
         if (is_array($this->searchParams) && !empty($this->searchParams)) {
127 127
             // get all sortable metadata records
128
-            $sortableMetadata = $this->metadataRepository->findByIsSortable(true);
128
+            $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE);
129 129
 
130 130
             // get all metadata records to be shown in results
131
-            $listedMetadata = $this->metadataRepository->findByIsListed(true);
131
+            $listedMetadata = $this->metadataRepository->findByIsListed(TRUE);
132 132
 
133 133
             $solrResults = [];
134 134
             // Do not execute the Solr search if used together with ListView plugin.
135 135
             if (!$listViewSearch) {
136
-                $solrResults = $this->documentRepository->findSolrByCollection(null, $this->settings, $this->searchParams, $listedMetadata);
136
+                $solrResults = $this->documentRepository->findSolrByCollection(NULL, $this->settings, $this->searchParams, $listedMetadata);
137 137
             }
138 138
 
139 139
             $documents = $solrResults['documents'] ? : [];
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
         // Get facets from plugin configuration.
183 183
         $facets = [];
184
-        foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) {
184
+        foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], TRUE) as $facet) {
185 185
             $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
186 186
         }
187 187
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         // Check if facet is already selected.
380 380
         $queryColumn = array_column($search['params']['filterquery'], 'query');
381 381
         $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn);
382
-        if ($index !== false) {
382
+        if ($index !== FALSE) {
383 383
             // Facet is selected, thus remove it from filter.
384 384
             unset($queryColumn[$index]);
385 385
             $queryColumn = array_values($queryColumn);
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             $state = 'ACTIFSUB';
388 388
             // Reset facets
389 389
             if ($this->settings['resetFacets']) {
390
-                $entryArray['resetFacet'] = true;
390
+                $entryArray['resetFacet'] = TRUE;
391 391
                 $entryArray['queryColumn'] = $queryColumn;
392 392
             }
393 393
         } else {
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         }
419 419
 
420 420
         // Get field selector options.
421
-        $searchFields = GeneralUtility::trimExplode(',', $this->settings['extendedFields'], true);
421
+        $searchFields = GeneralUtility::trimExplode(',', $this->settings['extendedFields'], TRUE);
422 422
 
423 423
         $slotCountArray = [];
424 424
         for ($i = 0; $i < $this->settings['extendedSlotCount']; $i++) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         // Add uHash parameter to suggest parameter to make a basic protection of this form.
163 163
         if ($this->settings['suggest']) {
164
-            $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'));
164
+            $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest'));
165 165
         }
166 166
 
167 167
         $this->view->assign('viewData', $this->viewData);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         // Get facets from plugin configuration.
185 185
         $facets = [];
186 186
         foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) {
187
-            $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
187
+            $facets[$facet.'_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
188 188
         }
189 189
 
190 190
         $this->view->assign('facetsMenu', $this->makeFacetsMenuArray($facets));
@@ -226,13 +226,13 @@  discard block
 block discarded – undo
226 226
         $searchParams = $this->searchParams;
227 227
         if (
228 228
             (!empty($searchParams['fulltext']))
229
-            || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($searchParams['query']), $matches)
229
+            || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($searchParams['query']), $matches)
230 230
         ) {
231 231
             // If the query already is a fulltext query e.g using the facets
232 232
             $searchParams['query'] = empty($matches[1]) ? $searchParams['query'] : $matches[1];
233 233
             // Search in fulltext field if applicable. Query must not be empty!
234 234
             if (!empty($this->searchParams['query'])) {
235
-                $search['query'] = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($searchParams['query'])) . ')';
235
+                $search['query'] = $fields['fulltext'].':('.Solr::escapeQuery(trim($searchParams['query'])).')';
236 236
             }
237 237
         } else {
238 238
             // Retain given search field if valid.
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
                         in_array($searchParams['extOperator'][$i], $allowedOperators)
257 257
                     ) {
258 258
                         if (!empty($search['query'])) {
259
-                            $search['query'] .= ' ' . $searchParams['extOperator'][$i] . ' ';
259
+                            $search['query'] .= ' '.$searchParams['extOperator'][$i].' ';
260 260
                         }
261
-                        $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($searchParams['extQuery'][$i]) . ')';
261
+                        $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($searchParams['extQuery'][$i]).')';
262 262
                     }
263 263
                 }
264 264
             }
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         $entryArray['doNotLinkIt'] = 0;
384 384
         // Check if facet is already selected.
385 385
         $queryColumn = array_column($search['params']['filterquery'], 'query');
386
-        $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn);
386
+        $index = array_search($field.':("'.Solr::escapeQuery($value).'")', $queryColumn);
387 387
         if ($index !== false) {
388 388
             // Facet is selected, thus remove it from filter.
389 389
             unset($queryColumn[$index]);
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             }
398 398
         } else {
399 399
             // Facet is not selected, thus add it to filter.
400
-            $queryColumn[] = $field . ':("' . Solr::escapeQuery($value) . '")';
400
+            $queryColumn[] = $field.':("'.Solr::escapeQuery($value).'")';
401 401
             $entryArray['ITEM_STATE'] = 'NO';
402 402
         }
403 403
         $entryArray['queryColumn'] = $queryColumn;
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
  * @subpackage dlf
33 33
  * @access public
34 34
  */
35
-class SearchController extends AbstractController
36
-{
35
+class SearchController extends AbstractController {
37 36
     /**
38 37
      * @var CollectionRepository
39 38
      */
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
     /**
43 42
      * @param CollectionRepository $collectionRepository
44 43
      */
45
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
46
-    {
44
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
47 45
         $this->collectionRepository = $collectionRepository;
48 46
     }
49 47
 
@@ -55,8 +53,7 @@  discard block
 block discarded – undo
55 53
     /**
56 54
      * @param MetadataRepository $metadataRepository
57 55
      */
58
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
59
-    {
56
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
60 57
         $this->metadataRepository = $metadataRepository;
61 58
     }
62 59
 
@@ -71,8 +68,7 @@  discard block
 block discarded – undo
71 68
      *
72 69
      * @return void
73 70
      */
74
-    public function searchAction()
75
-    {
71
+    public function searchAction() {
76 72
         // if search was triggered, get search parameters from POST variables
77 73
         $this->searchParams = $this->getParametersSafely('searchParameter');
78 74
 
@@ -87,8 +83,7 @@  discard block
 block discarded – undo
87 83
      *
88 84
      * @return void
89 85
      */
90
-    public function mainAction()
91
-    {
86
+    public function mainAction() {
92 87
         $listViewSearch = false;
93 88
         // Quit without doing anything if required variables are not set.
94 89
         if (empty($this->settings['solrcore'])) {
@@ -174,8 +169,7 @@  discard block
 block discarded – undo
174 169
      *
175 170
      * @return string HTML output of facets menu
176 171
      */
177
-    protected function addFacetsMenu()
178
-    {
172
+    protected function addFacetsMenu() {
179 173
         // Quit without doing anything if no facets are configured.
180 174
         if (empty($this->settings['facets']) && empty($this->settings['facetCollections'])) {
181 175
             return '';
@@ -200,8 +194,7 @@  discard block
 block discarded – undo
200 194
      *
201 195
      * @return array HMENU array
202 196
      */
203
-    public function makeFacetsMenuArray($facets)
204
-    {
197
+    public function makeFacetsMenuArray($facets) {
205 198
         $menuArray = [];
206 199
         // Set default value for facet search.
207 200
         $search = [
@@ -360,8 +353,7 @@  discard block
 block discarded – undo
360 353
      *
361 354
      * @return array The array for the facet's menu entry
362 355
      */
363
-    protected function getFacetsMenuEntry($field, $value, $count, $search, &$state)
364
-    {
356
+    protected function getFacetsMenuEntry($field, $value, $count, $search, &$state) {
365 357
         $entryArray = [];
366 358
         // Translate value.
367 359
         if ($field == 'owner_faceting') {
@@ -412,8 +404,7 @@  discard block
 block discarded – undo
412 404
      *
413 405
      * @return string The extended search form or an empty string
414 406
      */
415
-    protected function addExtendedSearch()
416
-    {
407
+    protected function addExtendedSearch() {
417 408
         // Quit without doing anything if no fields for extended search are selected.
418 409
         if (
419 410
             empty($this->settings['extendedSlotCount'])
Please login to merge, or discard this patch.
Classes/Controller/CollectionController.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,14 +96,14 @@
 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
-            $params['query'] = $solr_query . ' AND partof:0 AND toplevel:true';
103
+            $params['query'] = $solr_query.' AND partof:0 AND toplevel:true';
104 104
             $partOfNothing = $solr->search_raw($params);
105 105
 
106
-            $params['query'] = $solr_query . ' AND NOT partof:0 AND toplevel:true';
106
+            $params['query'] = $solr_query.' AND NOT partof:0 AND toplevel:true';
107 107
             $partOfSomething = $solr->search_raw($params);
108 108
             // Titles are all documents that are "root" elements i.e. partof == 0
109 109
             $collectionInfo['titles'] = [];
Please login to merge, or discard this patch.
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
         $documents = $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.