Passed
Pull Request — master (#123)
by Sebastian
09:16
created
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('Classes/Controller/BasketController.php');
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.
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 does not exist
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.
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.
Classes/Format/TeiHeader.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
      *
33 33
      * @return void
34 34
      */
35
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata)
36
-    {
35
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
37 36
         $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0');
38 37
     }
39 38
 }
Please login to merge, or discard this patch.
Classes/Controller/Backend/NewTenantController.php 3 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     public function addFormatAction()
159 159
     {
160 160
         // Include formats definition file.
161
-        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php');
161
+        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/FormatDefaults.php');
162 162
 
163 163
         $frameworkConfiguration = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FRAMEWORK);
164 164
         // tx_dlf_formats are stored on PID = 0
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     public function addMetadataAction()
197 197
     {
198 198
         // Include metadata definition file.
199
-        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
199
+        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/MetadataDefaults.php');
200 200
 
201 201
         $doPersist = false;
202 202
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             if ($this->metadataRepository->findOneByIndexName($indexName) === null) {
209 209
 
210 210
                 $newRecord = GeneralUtility::makeInstance(Metadata::class);
211
-                $newRecord->setLabel($this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels));
211
+                $newRecord->setLabel($this->getLLL('metadata.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels));
212 212
                 $newRecord->setIndexName($indexName);
213 213
                 $newRecord->setDefaultValue($values['default_value']);
214 214
                 $newRecord->setWrap($values['wrap'] ? : $GLOBALS['TCA']['tx_dlf_metadata']['columns']['wrap']['config']['default']);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                     $translatedRecord = GeneralUtility::makeInstance(Metadata::class);
244 244
                     $translatedRecord->setL18nParent($newRecord);
245 245
                     $translatedRecord->_setProperty('_languageUid', $siteLanguage->getLanguageId());
246
-                    $translatedRecord->setLabel($this->getLLL('metadata.' . $indexName, $siteLanguage->getTypo3Language(), $metadataLabels));
246
+                    $translatedRecord->setLabel($this->getLLL('metadata.'.$indexName, $siteLanguage->getTypo3Language(), $metadataLabels));
247 247
                     $translatedRecord->setIndexName($indexName);
248 248
                     $translatedRecord->setWrap($newRecord->getWrap());
249 249
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 
278 278
         if ($this->solrCoreRepository->findOneByPid($this->pid) === null) {
279 279
             $newRecord = GeneralUtility::makeInstance(SolrCore::class);
280
-            $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')');
280
+            $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels).' (PID '.$this->pid.')');
281 281
             $indexName = Solr::createCore('');
282 282
             $newRecord->setIndexName($indexName);
283 283
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     public function addStructureAction()
302 302
     {
303 303
         // Include structure definition file.
304
-        $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
304
+        $structureDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/StructureDefaults.php');
305 305
 
306 306
         $doPersist = false;
307 307
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             // if default format record is not found, add it to the repository
313 313
             if ($this->structureRepository->findOneByIndexName($indexName) === null) {
314 314
                 $newRecord = GeneralUtility::makeInstance(Structure::class);
315
-                $newRecord->setLabel($this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels));
315
+                $newRecord->setLabel($this->getLLL('structure.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels));
316 316
                 $newRecord->setIndexName($indexName);
317 317
                 $newRecord->setToplevel($values['toplevel']);
318 318
                 $newRecord->setOaiName($values['oai_name']);
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                     $translatedRecord = GeneralUtility::makeInstance(Structure::class);
327 327
                     $translatedRecord->setL18nParent($newRecord);
328 328
                     $translatedRecord->_setProperty('_languageUid', $siteLanguage->getLanguageId());
329
-                    $translatedRecord->setLabel($this->getLLL('structure.' . $indexName, $siteLanguage->getTypo3Language(), $structLabels));
329
+                    $translatedRecord->setLabel($this->getLLL('structure.'.$indexName, $siteLanguage->getTypo3Language(), $structLabels));
330 330
                     $translatedRecord->setIndexName($indexName);
331 331
 
332 332
                     $this->structureRepository->add($translatedRecord);
@@ -378,15 +378,15 @@  discard block
 block discarded – undo
378 378
             $this->forward('error');
379 379
         }
380 380
 
381
-        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php');
381
+        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/FormatDefaults.php');
382 382
         $recordInfos['formats']['numCurrent'] = $this->formatRepository->countAll();
383 383
         $recordInfos['formats']['numDefault'] = count($formatsDefaults);
384 384
 
385
-        $structuresDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
385
+        $structuresDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/StructureDefaults.php');
386 386
         $recordInfos['structures']['numCurrent'] = $this->structureRepository->countByPid($this->pid);
387 387
         $recordInfos['structures']['numDefault'] = count($structuresDefaults);
388 388
 
389
-        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
389
+        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/MetadataDefaults.php');
390 390
         $recordInfos['metadata']['numCurrent'] = $this->metadataRepository->countByPid($this->pid);
391 391
         $recordInfos['metadata']['numDefault'] = count($metadataDefaults);
392 392
 
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@  discard block
 block discarded – undo
44 44
  * @subpackage dlf
45 45
  * @access public
46 46
  */
47
-class NewTenantController extends AbstractController
48
-{
47
+class NewTenantController extends AbstractController {
49 48
     /**
50 49
      * @var int
51 50
      */
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
     /**
86 85
      * @param FormatRepository $formatRepository
87 86
      */
88
-    public function injectFormatRepository(FormatRepository $formatRepository)
89
-    {
87
+    public function injectFormatRepository(FormatRepository $formatRepository) {
90 88
         $this->formatRepository = $formatRepository;
91 89
     }
92 90
 
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
     /**
99 97
      * @param MetadataRepository $metadataRepository
100 98
      */
101
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
102
-    {
99
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
103 100
         $this->metadataRepository = $metadataRepository;
104 101
     }
105 102
 
@@ -111,8 +108,7 @@  discard block
 block discarded – undo
111 108
     /**
112 109
      * @param StructureRepository $structureRepository
113 110
      */
114
-    public function injectStructureRepository(StructureRepository $structureRepository)
115
-    {
111
+    public function injectStructureRepository(StructureRepository $structureRepository) {
116 112
         $this->structureRepository = $structureRepository;
117 113
     }
118 114
 
@@ -124,8 +120,7 @@  discard block
 block discarded – undo
124 120
     /**
125 121
      * @param SolrCoreRepository $solrCoreRepository
126 122
      */
127
-    public function injectSolrCoreRepository(SolrCoreRepository $solrCoreRepository)
128
-    {
123
+    public function injectSolrCoreRepository(SolrCoreRepository $solrCoreRepository) {
129 124
         $this->solrCoreRepository = $solrCoreRepository;
130 125
     }
131 126
 
@@ -133,8 +128,7 @@  discard block
 block discarded – undo
133 128
      * Initialization for all actions
134 129
      *
135 130
      */
136
-    protected function initializeAction()
137
-    {
131
+    protected function initializeAction() {
138 132
         $this->pid = (int) GeneralUtility::_GP('id');
139 133
 
140 134
         $frameworkConfiguration = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FRAMEWORK);
@@ -155,8 +149,7 @@  discard block
 block discarded – undo
155 149
     /**
156 150
      * Action adding formats records
157 151
      */
158
-    public function addFormatAction()
159
-    {
152
+    public function addFormatAction() {
160 153
         // Include formats definition file.
161 154
         $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php');
162 155
 
@@ -193,8 +186,7 @@  discard block
 block discarded – undo
193 186
     /**
194 187
      * Action adding metadata records
195 188
      */
196
-    public function addMetadataAction()
197
-    {
189
+    public function addMetadataAction() {
198 190
         // Include metadata definition file.
199 191
         $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
200 192
 
@@ -268,8 +260,7 @@  discard block
 block discarded – undo
268 260
     /**
269 261
      * Action adding Solr core records
270 262
      */
271
-    public function addSolrCoreAction()
272
-    {
263
+    public function addSolrCoreAction() {
273 264
         $doPersist = false;
274 265
 
275 266
         // load language file in own array
@@ -298,8 +289,7 @@  discard block
 block discarded – undo
298 289
     /**
299 290
      * Action adding structure records
300 291
      */
301
-    public function addStructureAction()
302
-    {
292
+    public function addStructureAction() {
303 293
         // Include structure definition file.
304 294
         $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
305 295
 
@@ -351,8 +341,7 @@  discard block
 block discarded – undo
351 341
      * @param ViewInterface $view
352 342
      * @return void
353 343
      */
354
-    protected function initializeView(ViewInterface $view)
355
-    {
344
+    protected function initializeView(ViewInterface $view) {
356 345
         /** @var BackendTemplateView $view */
357 346
         parent::initializeView($view);
358 347
         if ($this->actionMethodName == 'indexAction') {
@@ -370,8 +359,7 @@  discard block
 block discarded – undo
370 359
      * @access public
371 360
      *
372 361
      */
373
-    public function indexAction()
374
-    {
362
+    public function indexAction() {
375 363
         $recordInfos = [];
376 364
 
377 365
         if ($this->pageInfo['doktype'] != 254) {
@@ -401,8 +389,7 @@  discard block
 block discarded – undo
401 389
      * @access public
402 390
      *
403 391
      */
404
-    public function errorAction()
405
-    {
392
+    public function errorAction() {
406 393
     }
407 394
 
408 395
     /**
@@ -414,8 +401,7 @@  discard block
 block discarded – undo
414 401
      *
415 402
      * @access public
416 403
      */
417
-    protected function getLLL($index, $lang, $langArray)
418
-    {
404
+    protected function getLLL($index, $lang, $langArray) {
419 405
         if (isset($langArray[$lang][$index][0]['target'])) {
420 406
             return $langArray[$lang][$index][0]['target'];
421 407
         } else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
         $frameworkConfiguration['persistence']['storagePid'] = 0;
166 166
         $this->configurationManager->setConfiguration($frameworkConfiguration);
167 167
 
168
-        $doPersist = false;
168
+        $doPersist = FALSE;
169 169
 
170 170
         foreach ($formatsDefaults as $type => $values) {
171 171
             // if default format record is not found, add it to the repository
172
-            if ($this->formatRepository->findOneByType($type) === null) {
172
+            if ($this->formatRepository->findOneByType($type) === NULL) {
173 173
                 $newRecord = GeneralUtility::makeInstance(Format::class);
174 174
                 $newRecord->setType($type);
175 175
                 $newRecord->setRoot($values['root']);
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
                 $newRecord->setClass($values['class']);
178 178
                 $this->formatRepository->add($newRecord);
179 179
 
180
-                $doPersist = true;
180
+                $doPersist = TRUE;
181 181
             }
182 182
         }
183 183
 
184 184
         // We must persist here, if we changed anything.
185
-        if ($doPersist === true) {
185
+        if ($doPersist === TRUE) {
186 186
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
187 187
             $persistenceManager->persistAll();
188 188
         }
@@ -198,14 +198,14 @@  discard block
 block discarded – undo
198 198
         // Include metadata definition file.
199 199
         $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
200 200
 
201
-        $doPersist = false;
201
+        $doPersist = FALSE;
202 202
 
203 203
         // load language file in own array
204 204
         $metadataLabels = $this->languageFactory->getParsedData('EXT:dlf/Resources/Private/Language/locallang_metadata.xlf', $this->siteLanguages[0]->getTypo3Language());
205 205
 
206 206
         foreach ($metadataDefaults as $indexName => $values) {
207 207
             // if default format record is not found, add it to the repository
208
-            if ($this->metadataRepository->findOneByIndexName($indexName) === null) {
208
+            if ($this->metadataRepository->findOneByIndexName($indexName) === NULL) {
209 209
 
210 210
                 $newRecord = GeneralUtility::makeInstance(Metadata::class);
211 211
                 $newRecord->setLabel($this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels));
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                     foreach ($values['format'] as $format) {
226 226
                         $formatRecord = $this->formatRepository->findOneByRoot($format['format_root']);
227 227
                         // If formatRecord is null, we cannot create a MetadataFormat record.
228
-                        if ($formatRecord !== null) {
228
+                        if ($formatRecord !== NULL) {
229 229
                             $newMetadataFormat = GeneralUtility::makeInstance(MetadataFormat::class);
230 230
                             $newMetadataFormat->setEncoded($formatRecord->getUid());
231 231
                             $newMetadataFormat->setXpath($format['xpath']);
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
 
253 253
                 $this->metadataRepository->add($newRecord);
254 254
 
255
-                $doPersist = true;
255
+                $doPersist = TRUE;
256 256
             }
257 257
         }
258 258
 
259 259
         // We must persist here, if we changed anything.
260
-        if ($doPersist === true) {
260
+        if ($doPersist === TRUE) {
261 261
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
262 262
             $persistenceManager->persistAll();
263 263
         }
@@ -270,12 +270,12 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function addSolrCoreAction()
272 272
     {
273
-        $doPersist = false;
273
+        $doPersist = FALSE;
274 274
 
275 275
         // load language file in own array
276 276
         $beLabels = $this->languageFactory->getParsedData('EXT:dlf/Resources/Private/Language/locallang_be.xlf', $this->siteLanguages[0]->getTypo3Language());
277 277
 
278
-        if ($this->solrCoreRepository->findOneByPid($this->pid) === null) {
278
+        if ($this->solrCoreRepository->findOneByPid($this->pid) === NULL) {
279 279
             $newRecord = GeneralUtility::makeInstance(SolrCore::class);
280 280
             $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')');
281 281
             $indexName = Solr::createCore('');
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 
284 284
             $this->solrCoreRepository->add($newRecord);
285 285
 
286
-            $doPersist = true;
286
+            $doPersist = TRUE;
287 287
         }
288 288
 
289 289
         // We must persist here, if we changed anything.
290
-        if ($doPersist === true) {
290
+        if ($doPersist === TRUE) {
291 291
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
292 292
             $persistenceManager->persistAll();
293 293
         }
@@ -303,14 +303,14 @@  discard block
 block discarded – undo
303 303
         // Include structure definition file.
304 304
         $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
305 305
 
306
-        $doPersist = false;
306
+        $doPersist = FALSE;
307 307
 
308 308
         // load language file in own array
309 309
         $structLabels = $this->languageFactory->getParsedData('EXT:dlf/Resources/Private/Language/locallang_structure.xlf', $this->siteLanguages[0]->getTypo3Language());
310 310
 
311 311
         foreach ($structureDefaults as $indexName => $values) {
312 312
             // if default format record is not found, add it to the repository
313
-            if ($this->structureRepository->findOneByIndexName($indexName) === null) {
313
+            if ($this->structureRepository->findOneByIndexName($indexName) === NULL) {
314 314
                 $newRecord = GeneralUtility::makeInstance(Structure::class);
315 315
                 $newRecord->setLabel($this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels));
316 316
                 $newRecord->setIndexName($indexName);
@@ -332,12 +332,12 @@  discard block
 block discarded – undo
332 332
                     $this->structureRepository->add($translatedRecord);
333 333
                 }
334 334
 
335
-                $doPersist = true;
335
+                $doPersist = TRUE;
336 336
             }
337 337
         }
338 338
 
339 339
         // We must persist here, if we changed anything.
340
-        if ($doPersist === true) {
340
+        if ($doPersist === TRUE) {
341 341
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
342 342
             $persistenceManager->persistAll();
343 343
         }
Please login to merge, or discard this patch.
Classes/Eid/SearchInDocument.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
      */
121 121
     private function getQuery($fields, $parameters)
122 122
     {
123
-        return $fields['fulltext'] . ':(' . Solr::escapeQuery((string) $parameters['q']) . ') AND ' . $fields['uid'] . ':' . $this->getUid($parameters['uid']);
123
+        return $fields['fulltext'].':('.Solr::escapeQuery((string) $parameters['q']).') AND '.$fields['uid'].':'.$this->getUid($parameters['uid']);
124 124
     }
125 125
 
126 126
     /**
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,16 +28,14 @@  discard block
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class SearchInDocument
32
-{
31
+class SearchInDocument {
33 32
     /**
34 33
      * The main method of the eID script
35 34
      *
36 35
      * @param ServerRequestInterface $request
37 36
      * @return ResponseInterface JSON response of search suggestions
38 37
      */
39
-    public function main(ServerRequestInterface $request)
40
-    {
38
+    public function main(ServerRequestInterface $request) {
41 39
         $output = [
42 40
             'documents' => [],
43 41
             'numFound' => 0
@@ -118,8 +116,7 @@  discard block
 block discarded – undo
118 116
      *
119 117
      * @return string SOLR query
120 118
      */
121
-    private function getQuery($fields, $parameters)
122
-    {
119
+    private function getQuery($fields, $parameters) {
123 120
         return $fields['fulltext'] . ':(' . Solr::escapeQuery((string) $parameters['q']) . ') AND ' . $fields['uid'] . ':' . $this->getUid($parameters['uid']);
124 121
     }
125 122
 
@@ -133,8 +130,7 @@  discard block
 block discarded – undo
133 130
      *
134 131
      * @return int|string uid of the document
135 132
      */
136
-    private function getUid($uid)
137
-    {
133
+    private function getUid($uid) {
138 134
         return is_numeric($uid) ? intval($uid) : $uid;
139 135
     }
140 136
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         ];
45 45
         // Get input parameters and decrypt core name.
46 46
         $parameters = $request->getParsedBody();
47
-        if ($parameters === null) {
47
+        if ($parameters === NULL) {
48 48
             throw new \InvalidArgumentException('No parameters passed!', 1632322297);
49 49
         }
50 50
         $encrypted = (string) $parameters['encrypted'];
Please login to merge, or discard this patch.
Classes/Eid/PageViewProxy.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
  * @subpackage dlf
35 35
  * @access public
36 36
  */
37
-class PageViewProxy
38
-{
37
+class PageViewProxy {
39 38
     /**
40 39
      * @var RequestFactory
41 40
      */
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      */
47 46
     protected $extConf;
48 47
 
49
-    public function __construct()
50
-    {
48
+    public function __construct() {
51 49
         $this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
52 50
         $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
53 51
     }
@@ -173,8 +171,7 @@  discard block
 block discarded – undo
173 171
      * @param ServerRequestInterface $request
174 172
      * @return ResponseInterface
175 173
      */
176
-    public function main(ServerRequestInterface $request)
177
-    {
174
+    public function main(ServerRequestInterface $request) {
178 175
         switch ($request->getMethod()) {
179 176
             case 'OPTIONS':
180 177
                 return $this->handleOptions($request);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,11 +140,11 @@
 block discarded – undo
140 140
                 // For performance, don't download content up-front. Rather, we'll
141 141
                 // download and upload simultaneously.
142 142
                 // https://docs.guzzlephp.org/en/6.5/request-options.html#stream
143
-                'stream' => true,
143
+                'stream' => TRUE,
144 144
 
145 145
                 // Don't throw exceptions when a non-success status code is
146 146
                 // received. We handle these manually.
147
-                'http_errors' => false,
147
+                'http_errors' => FALSE,
148 148
             ]);
149 149
         } catch (\Exception $e) {
150 150
             return new JsonResponse(['message' => 'Could not fetch resource of given URL.'], 500);
Please login to merge, or discard this patch.
Classes/Eid/SearchSuggest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $parameters = $request->getParsedBody();
46 46
         $solrCore = (string) $parameters['solrcore'];
47 47
         $uHash = (string) $parameters['uHash'];
48
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
48
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
49 49
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
50 50
         }
51 51
         // Perform Solr query.
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,16 +30,14 @@
 block discarded – undo
30 30
  * @subpackage dlf
31 31
  * @access public
32 32
  */
33
-class SearchSuggest
34
-{
33
+class SearchSuggest {
35 34
     /**
36 35
      * The main method of the eID script
37 36
      *
38 37
      * @param ServerRequestInterface $request
39 38
      * @return ResponseInterface XML response of search suggestions
40 39
      */
41
-    public function main(ServerRequestInterface $request)
42
-    {
40
+    public function main(ServerRequestInterface $request) {
43 41
         $output = [];
44 42
         // Get input parameters and decrypt core name.
45 43
         $parameters = $request->getParsedBody();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $parameters = $request->getParsedBody();
46 46
         $solrCore = (string) $parameters['solrcore'];
47 47
         $uHash = (string) $parameters['uHash'];
48
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
48
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === FALSE) {
49 49
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
50 50
         }
51 51
         // Perform Solr query.
Please login to merge, or discard this patch.
ext_localconf.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,22 +65,22 @@
 block discarded – undo
65 65
 $_EXTKEY = 'dlf';
66 66
 // Register tools for toolbox plugin.
67 67
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = [];
68
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool';
69
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool';
70
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool';
71
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool';
72
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool';
73
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool';
74
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool';
68
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool';
69
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool';
70
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool';
71
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool';
72
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool';
73
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool';
74
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool';
75 75
 // Register hooks.
76 76
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
77 77
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
78 78
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class;
79 79
 // Register AJAX eID handlers.
80
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class . '::main';
81
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class . '::main';
80
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class.'::main';
81
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class.'::main';
82 82
 if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? false) {
83
-    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
83
+    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main';
84 84
 }
85 85
 // Use Caching Framework for Solr queries
86 86
 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'])) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 // Register AJAX eID handlers.
80 80
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class . '::main';
81 81
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class . '::main';
82
-if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? false) {
82
+if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? FALSE) {
83 83
     $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
84 84
 }
85 85
 // Use Caching Framework for Solr queries
Please login to merge, or discard this patch.
Classes/Controller/StatisticsController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
         $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings);
34 34
 
35 35
         // Set replacements.
36
-        $args['###TITLES###'] = $foundNumbers['titles'] . ' ' . htmlspecialchars(
36
+        $args['###TITLES###'] = $foundNumbers['titles'].' '.htmlspecialchars(
37 37
             LocalizationUtility::translate(
38 38
                 ($foundNumbers['titles'] > 1 ? 'titles' : 'title'), 'dlf'
39 39
             )
40 40
         );
41 41
 
42
-        $args['###VOLUMES###'] = $foundNumbers['volumes'] . ' ' . htmlspecialchars(
42
+        $args['###VOLUMES###'] = $foundNumbers['volumes'].' '.htmlspecialchars(
43 43
             LocalizationUtility::translate(
44 44
                 ($foundNumbers['volumes'] > 1 ? 'volumes' : 'volume'), 'dlf'
45 45
             )
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,15 +21,13 @@
 block discarded – undo
21 21
  * @subpackage dlf
22 22
  * @access public
23 23
  */
24
-class StatisticsController extends AbstractController
25
-{
24
+class StatisticsController extends AbstractController {
26 25
     /**
27 26
      * The main method of the plugin
28 27
      *
29 28
      * @return void
30 29
      */
31
-    public function mainAction()
32
-    {
30
+    public function mainAction() {
33 31
         $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings);
34 32
 
35 33
         // Set replacements.
Please login to merge, or discard this patch.
Classes/Domain/Repository/DocumentRepository.php 4 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,6 @@
 block discarded – undo
210 210
      * Volumes are documents that are both
211 211
      *  a) "leaf" elements i.e. partof != 0
212 212
      *  b) "root" elements that are not referenced by other documents ("root" elements that have no descendants)
213
-
214 213
      * @param array $settings
215 214
      *
216 215
      * @return array
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 
357 357
         $excludeOtherWhere = '';
358 358
         if ($settings['excludeOther']) {
359
-            $excludeOtherWhere = 'tx_dlf_documents.pid=' . intval($settings['storagePid']);
359
+            $excludeOtherWhere = 'tx_dlf_documents.pid='.intval($settings['storagePid']);
360 360
         }
361 361
         // Check if there are any metadata to suggest.
362 362
         $result = $queryBuilder
@@ -408,12 +408,12 @@  discard block
 block discarded – undo
408 408
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
409 409
             ->getConnectionForTable('tx_dlf_documents');
410 410
 
411
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
412
-            'FROM `tx_dlf_documents` ' .
413
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
414
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
415
-            'WHERE `tx_dlf_documents`.`record_id` = ? ' .
416
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
411
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
412
+            'FROM `tx_dlf_documents` '.
413
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
414
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
415
+            'WHERE `tx_dlf_documents`.`record_id` = ? '.
416
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
417 417
             $where;
418 418
 
419 419
         $values = [
@@ -443,13 +443,13 @@  discard block
 block discarded – undo
443 443
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
444 444
             ->getConnectionForTable('tx_dlf_documents');
445 445
 
446
-        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` ' .
447
-            'FROM `tx_dlf_documents` ' .
448
-            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` ' .
449
-            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` ' .
450
-            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) ' .
451
-            'AND `tx_dlf_relations`.`ident`="docs_colls" ' .
452
-            'AND ' . Helper::whereExpression('tx_dlf_collections') . ' ' .
446
+        $sql = 'SELECT `tx_dlf_documents`.*, GROUP_CONCAT(DISTINCT `tx_dlf_collections`.`oai_name` ORDER BY `tx_dlf_collections`.`oai_name` SEPARATOR " ") AS `collections` '.
447
+            'FROM `tx_dlf_documents` '.
448
+            'INNER JOIN `tx_dlf_relations` ON `tx_dlf_relations`.`uid_local` = `tx_dlf_documents`.`uid` '.
449
+            'INNER JOIN `tx_dlf_collections` ON `tx_dlf_collections`.`uid` = `tx_dlf_relations`.`uid_foreign` '.
450
+            'WHERE `tx_dlf_documents`.`uid` IN ( ? ) '.
451
+            'AND `tx_dlf_relations`.`ident`="docs_colls" '.
452
+            'AND '.Helper::whereExpression('tx_dlf_collections').' '.
453 453
             'GROUP BY `tx_dlf_documents`.`uid` ';
454 454
 
455 455
         $values = [
Please login to merge, or discard this patch.
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @return \Kitodo\Dlf\Domain\Model\Document|null
50 50
      */
51
-    public function findOneByParameters($parameters)
52
-    {
51
+    public function findOneByParameters($parameters) {
53 52
         $doc = null;
54 53
         $document = null;
55 54
 
@@ -93,8 +92,7 @@  discard block
 block discarded – undo
93 92
      *
94 93
      * @return \Kitodo\Dlf\Domain\Model\Document|null
95 94
      */
96
-    public function findOldestDocument()
97
-    {
95
+    public function findOldestDocument() {
98 96
         $query = $this->createQuery();
99 97
 
100 98
         $query->setOrderings(['tstamp' => QueryInterface::ORDER_ASCENDING]);
@@ -108,8 +106,7 @@  discard block
 block discarded – undo
108 106
      * @param  \Kitodo\Dlf\Domain\Model\Structure $structure
109 107
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
110 108
      */
111
-    public function getChildrenOfYearAnchor($partOf, $structure)
112
-    {
109
+    public function getChildrenOfYearAnchor($partOf, $structure) {
113 110
         $query = $this->createQuery();
114 111
 
115 112
         $query->matching($query->equals('structure', $structure));
@@ -130,8 +127,7 @@  discard block
 block discarded – undo
130 127
      *
131 128
      * @return \Kitodo\Dlf\Domain\Model\Document|null
132 129
      */
133
-    public function findOneByIdAndSettings($uid, $settings = [])
134
-    {
130
+    public function findOneByIdAndSettings($uid, $settings = []) {
135 131
         $settings = ['documentSets' => $uid];
136 132
 
137 133
         return $this->findDocumentsBySettings($settings)->getFirst();
@@ -144,8 +140,7 @@  discard block
 block discarded – undo
144 140
      *
145 141
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
146 142
      */
147
-    public function findDocumentsBySettings($settings = [])
148
-    {
143
+    public function findDocumentsBySettings($settings = []) {
149 144
         $query = $this->createQuery();
150 145
 
151 146
         $constraints = [];
@@ -175,8 +170,7 @@  discard block
 block discarded – undo
175 170
      *
176 171
      * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
177 172
      */
178
-    public function findAllByCollectionsLimited($collections, $limit = 50)
179
-    {
173
+    public function findAllByCollectionsLimited($collections, $limit = 50) {
180 174
         $query = $this->createQuery();
181 175
 
182 176
         // order by start_date -> start_time...
@@ -213,8 +207,7 @@  discard block
 block discarded – undo
213 207
      *
214 208
      * @return array
215 209
      */
216
-    public function getStatisticsForSelectedCollection($settings)
217
-    {
210
+    public function getStatisticsForSelectedCollection($settings) {
218 211
         if ($settings['collections']) {
219 212
             // Include only selected collections.
220 213
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
@@ -348,8 +341,7 @@  discard block
 block discarded – undo
348 341
      *
349 342
      * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
350 343
      */
351
-    public function getTableOfContentsFromDb($uid, $pid, $settings)
352
-    {
344
+    public function getTableOfContentsFromDb($uid, $pid, $settings) {
353 345
         // Build table of contents from database.
354 346
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
355 347
             ->getQueryBuilderForTable('tx_dlf_documents');
@@ -397,8 +389,7 @@  discard block
 block discarded – undo
397 389
      *
398 390
      * @return array The found document object
399 391
      */
400
-    public function getOaiRecord($settings, $parameters)
401
-    {
392
+    public function getOaiRecord($settings, $parameters) {
402 393
         $where = '';
403 394
 
404 395
         if (!$settings['show_userdefined']) {
@@ -438,8 +429,7 @@  discard block
 block discarded – undo
438 429
      *
439 430
      * @return array The found document objects
440 431
      */
441
-    public function getOaiDocumentList($settings, $documentsToProcess)
442
-    {
432
+    public function getOaiDocumentList($settings, $documentsToProcess) {
443 433
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)
444 434
             ->getConnectionForTable('tx_dlf_documents');
445 435
 
@@ -474,8 +464,7 @@  discard block
 block discarded – undo
474 464
      *
475 465
      * @return array
476 466
      */
477
-    public function findAllByUids($uids, $checkPartof = false)
478
-    {
467
+    public function findAllByUids($uids, $checkPartof = false) {
479 468
         // get all documents from db we are talking about
480 469
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
481 470
         $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_dlf_documents');
@@ -524,8 +513,7 @@  discard block
 block discarded – undo
524 513
      *
525 514
      * @return array
526 515
      */
527
-    public function findChildrenOfEach(array $uids)
528
-    {
516
+    public function findChildrenOfEach(array $uids) {
529 517
         $allDocuments = $this->findAllByUids($uids, true);
530 518
 
531 519
         $result = [];
@@ -546,8 +534,7 @@  discard block
 block discarded – undo
546 534
      * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $listedMetadata
547 535
      * @return array
548 536
      */
549
-    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null)
550
-    {
537
+    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null) {
551 538
         // set settings global inside this repository
552 539
         // (may be necessary when SolrSearch calls back)
553 540
         $this->settings = $settings;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function findOneByParameters($parameters)
52 52
     {
53
-        $doc = null;
54
-        $document = null;
53
+        $doc = NULL;
54
+        $document = NULL;
55 55
 
56 56
         if (isset($parameters['id']) && MathUtility::canBeInterpretedAsInteger($parameters['id'])) {
57 57
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
         } else if (isset($parameters['location']) && GeneralUtility::isValidUrl($parameters['location'])) {
65 65
 
66
-            $doc = Doc::getInstance($parameters['location'], [], true);
66
+            $doc = Doc::getInstance($parameters['location'], [], TRUE);
67 67
 
68 68
             if ($doc->recordId) {
69 69
                 $document = $this->findOneByRecordId($doc->recordId);
70 70
             }
71 71
 
72
-            if ($document === null) {
72
+            if ($document === NULL) {
73 73
                 // create new (dummy) Document object
74 74
                 $document = GeneralUtility::makeInstance(Document::class);
75 75
                 $document->setLocation($parameters['location']);
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 
78 78
         }
79 79
 
80
-        if ($document !== null && $doc === null) {
81
-            $doc = Doc::getInstance($document->getLocation(), [], true);
80
+        if ($document !== NULL && $doc === NULL) {
81
+            $doc = Doc::getInstance($document->getLocation(), [], TRUE);
82 82
         }
83 83
 
84
-        if ($doc !== null) {
84
+        if ($doc !== NULL) {
85 85
             $document->setDoc($doc);
86 86
         }
87 87
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         }
156 156
 
157 157
         if (isset($settings['excludeOther']) && (int) $settings['excludeOther'] === 0) {
158
-            $query->getQuerySettings()->setRespectStoragePage(false);
158
+            $query->getQuerySettings()->setRespectStoragePage(FALSE);
159 159
         }
160 160
 
161 161
         if (count($constraints)) {
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      *
475 475
      * @return array
476 476
      */
477
-    public function findAllByUids($uids, $checkPartof = false)
477
+    public function findAllByUids($uids, $checkPartof = FALSE)
478 478
     {
479 479
         // get all documents from db we are talking about
480 480
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
      */
527 527
     public function findChildrenOfEach(array $uids)
528 528
     {
529
-        $allDocuments = $this->findAllByUids($uids, true);
529
+        $allDocuments = $this->findAllByUids($uids, TRUE);
530 530
 
531 531
         $result = [];
532 532
         foreach ($allDocuments as $doc) {
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
      * @param \TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $listedMetadata
547 547
      * @return array
548 548
      */
549
-    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = null)
549
+    public function findSolrByCollection($collection, $settings, $searchParams, $listedMetadata = NULL)
550 550
     {
551 551
         // set settings global inside this repository
552 552
         // (may be necessary when SolrSearch calls back)
Please login to merge, or discard this patch.