Passed
Pull Request — master (#123)
by
unknown
04:50
created
Classes/Controller/StatisticsController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
21 21
  *
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
      *
Please login to merge, or discard this patch.
Classes/Controller/ListViewController.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         // extract collection(s) from collection parameter
83 83
         $collections = [];
84 84
         if ($this->searchParams['collection']) {
85
-            foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) {
85
+            foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) {
86 86
                 $collections[] = $this->collectionRepository->findByUid((int) $collectionEntry);
87 87
             }
88 88
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $simplePagination = new SimplePagination($solrPaginator);
114 114
 
115 115
             $pagination = $this->buildSimplePagination($simplePagination, $solrPaginator);
116
-            $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $solrPaginator ]);
116
+            $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $solrPaginator]);
117 117
         }
118 118
 
119 119
         $this->view->assign('viewData', $this->viewData);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class ListViewController extends AbstractController
28
-{
27
+class ListViewController extends AbstractController {
29 28
     /**
30 29
      * @access protected
31 30
      * @var CollectionRepository
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,12 +91,12 @@
 block discarded – undo
91 91
         $currentPage = $this->requestData['page'] ?? 1;
92 92
 
93 93
         // get all sortable metadata records
94
-        $sortableMetadata = $this->metadataRepository->findByIsSortable(true);
94
+        $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE);
95 95
 
96 96
         // get all metadata records to be shown in results
97
-        $listedMetadata = $this->metadataRepository->findByIsListed(true);
97
+        $listedMetadata = $this->metadataRepository->findByIsListed(TRUE);
98 98
 
99
-        $solrResults = null;
99
+        $solrResults = NULL;
100 100
         $numResults = 0;
101 101
         if (is_array($this->searchParams) && !empty($this->searchParams)) {
102 102
             $solrResults = $this->documentRepository->findSolrByCollections($collections, $this->settings, $this->searchParams, $listedMetadata);
Please login to merge, or discard this patch.
Classes/Controller/PageGridController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         $pageGridPagination = new PageGridPagination($pageGridPaginator);
69 69
 
70 70
         $pagination = $this->buildSimplePagination($pageGridPagination, $pageGridPaginator);
71
-        $this->view->assignMultiple([ 'pagination' => $pagination, 'paginator' => $pageGridPaginator ]);
71
+        $this->view->assignMultiple(['pagination' => $pagination, 'paginator' => $pageGridPaginator]);
72 72
 
73 73
         $this->view->assign('docUid', $this->requestData['id']);
74 74
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
  *
24 24
  * @access public
25 25
  */
26
-class PageGridController extends AbstractController
27
-{
26
+class PageGridController extends AbstractController {
28 27
     /**
29 28
      * The main method of the plugin
30 29
      *
Please login to merge, or discard this patch.
Classes/Controller/MetadataController.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         }
136 136
         // @phpstan-ignore-next-line
137 137
         if (!$metadata) {
138
-            $this->logger->warning('No metadata found for document with UID ' . $this->document->getUid());
138
+            $this->logger->warning('No metadata found for document with UID '.$this->document->getUid());
139 139
             return;
140 140
         }
141 141
         ksort($metadata);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     $this->parseMetadata($i, $name, $value, $metadata);
174 174
 
175 175
                     if (is_array($metadata[$i][$name])) {
176
-                        $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function ($metadataValue) {
176
+                        $metadata[$i][$name] = array_values(array_filter($metadata[$i][$name], function($metadataValue) {
177 177
                             return !empty($metadataValue);
178 178
                         }));
179 179
                     }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         if (empty(implode('', $value)) && $this->settings['getTitle'] && $this->document->getPartof()) {
391 391
             $superiorTitle = AbstractDocument::getTitle($this->document->getPartof(), true);
392 392
             if (!empty($superiorTitle)) {
393
-                $metadata[$i]['title'] = ['[' . $superiorTitle . ']'];
393
+                $metadata[$i]['title'] = ['['.$superiorTitle.']'];
394 394
             }
395 395
         }
396 396
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
  *
28 28
  * @access public
29 29
  */
30
-class MetadataController extends AbstractController
31
-{
30
+class MetadataController extends AbstractController {
32 31
     /**
33 32
      * @access private
34 33
      * @var AbstractDocument
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     protected function printMetadata(array $metadata): void
156 156
     {
157 157
         if ($this->useOriginalIiifManifestMetadata) {
158
-            $this->view->assign('useIiif', true);
158
+            $this->view->assign('useIiif', TRUE);
159 159
             $this->view->assign('iiifData', $this->buildIiifData($metadata));
160 160
         } else {
161 161
             // findBySettings also sorts entries by the `sorting` field
@@ -245,9 +245,9 @@  discard block
 block discarded – undo
245 245
         if (IRI::isAbsoluteIri($value) && ($scheme == 'http' || $scheme == 'https')) {
246 246
             //TODO: should really label be converted to empty string if equal to value?
247 247
             $label = $value == $label ? '' : $label;
248
-            $buildUrl = true;
248
+            $buildUrl = TRUE;
249 249
         } else {
250
-            $buildUrl = false;
250
+            $buildUrl = FALSE;
251 251
         }
252 252
 
253 253
         return [
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
     private function parseParentTitle(int $i, $value, array &$metadata) : void
389 389
     {
390 390
         if (empty(implode('', $value)) && $this->settings['getTitle'] && $this->document->getPartof()) {
391
-            $superiorTitle = AbstractDocument::getTitle($this->document->getPartof(), true);
391
+            $superiorTitle = AbstractDocument::getTitle($this->document->getPartof(), TRUE);
392 392
             if (!empty($superiorTitle)) {
393 393
                 $metadata[$i]['title'] = ['[' . $superiorTitle . ']'];
394 394
             }
Please login to merge, or discard this patch.
Classes/Controller/TableOfContentsController.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 }
198 198
             }
199 199
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
200
-            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB');
200
+            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB');
201 201
         }
202 202
         return $entryArray;
203 203
     }
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
                     $title = '';
310 310
                     foreach ($fields as $field) {
311 311
                         if ($field == 'type') {
312
-                            $title .= $this->getTranslatedType($entry['type']) . ' ';
312
+                            $title .= $this->getTranslatedType($entry['type']).' ';
313 313
                         } else {
314
-                            $title .= $entry[$field] . ' ';
314
+                            $title .= $entry[$field].' ';
315 315
                         }
316 316
                     }
317 317
         
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
                 }
320 320
             }
321 321
         }
322
-        return $entry['label'] ?: $entry['orderlabel'];
322
+        return $entry['label'] ? : $entry['orderlabel'];
323 323
     }
324 324
 
325 325
     /**
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
      */
353 353
     private function sortSubMenu(array &$menu): void
354 354
     {
355
-        usort($menu[0]['_SUB_MENU'], function ($firstElement, $secondElement) {
355
+        usort($menu[0]['_SUB_MENU'], function($firstElement, $secondElement) {
356 356
             if (!empty($firstElement['orderlabel'])) {
357 357
                 return $firstElement['orderlabel'] <=> $secondElement['orderlabel'];
358 358
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
  *
24 24
  * @access public
25 25
  */
26
-class TableOfContentsController extends AbstractController
27
-{
26
+class TableOfContentsController extends AbstractController {
28 27
     /**
29 28
      * This holds the active entries according to the currently selected page
30 29
      *
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
             $this->getAllLogicalUnits();
73 73
             // Go through table of contents and create all menu entries.
74 74
             foreach ($this->document->getCurrentDocument()->tableOfContents as $entry) {
75
-                $menuArray[] = $this->getMenuEntry($entry, true);
75
+                $menuArray[] = $this->getMenuEntry($entry, TRUE);
76 76
             }
77 77
         } else {
78 78
             // Go through table of contents and create top-level menu entries.
79 79
             foreach ($this->document->getCurrentDocument()->tableOfContents as $entry) {
80
-                $menuArray[] = $this->getMenuEntry($entry, false);
80
+                $menuArray[] = $this->getMenuEntry($entry, FALSE);
81 81
             }
82 82
             // Build table of contents from database.
83 83
             $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                         'pagination' => '',
98 98
                         'targetUid' => $resArray['uid']
99 99
                     ];
100
-                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false);
100
+                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE);
101 101
                 }
102 102
             }
103 103
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      *
116 116
      * @return array HMENU array for menu entry
117 117
      */
118
-    private function getMenuEntry(array $entry, bool $recursive = false): array
118
+    private function getMenuEntry(array $entry, bool $recursive = FALSE): array
119 119
     {
120 120
         $entry = $this->resolveMenuEntry($entry);
121 121
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         }
176 176
         // Build sub-menu if available and called recursively.
177 177
         if (
178
-            $recursive === true
178
+            $recursive === TRUE
179 179
             && !empty($entry['children'])
180 180
         ) {
181 181
             // Build sub-menu only if one of the following conditions apply:
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                     if (in_array($child['id'], $this->activeEntries)) {
194 194
                         $entryArray['ITEM_STATE'] = 'ACT';
195 195
                     }
196
-                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true);
196
+                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE);
197 197
                 }
198 198
             }
199 199
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
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
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if ($library) {
76 76
             $feedMeta['copyright'] = $library->getLabel();
77 77
         } else {
78
-            $this->logger->error('Failed to fetch label of selected library with "' . $this->settings['library'] . '"');
78
+            $this->logger->error('Failed to fetch label of selected library with "'.$this->settings['library'].'"');
79 79
         }
80 80
 
81 81
         if (
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
                 ) {
96 96
                     $superiorTitle = AbstractDocument::getTitle($document->getPartof(), true);
97 97
                     if (!empty($superiorTitle)) {
98
-                        $title .= '[' . $superiorTitle . ']';
98
+                        $title .= '['.$superiorTitle.']';
99 99
                     }
100 100
                 }
101 101
                 // Get title of document.
102 102
                 if (!empty($document->getTitle())) {
103
-                    $title .= ' ' . $document->getTitle();
103
+                    $title .= ' '.$document->getTitle();
104 104
                 }
105 105
                 // Set default title if empty.
106 106
                 if (empty($title)) {
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
                 }
109 109
                 // Append volume information.
110 110
                 if (!empty($document->getVolume())) {
111
-                    $title .= ', ' . LocalizationUtility::translate('volume', 'dlf') . ' ' . $document->getVolume();
111
+                    $title .= ', '.LocalizationUtility::translate('volume', 'dlf').' '.$document->getVolume();
112 112
                 }
113 113
                 // Is this document new or updated?
114 114
                 if ($document->getCrdate() == $document->getTstamp()) {
115
-                    $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf') . ' ' . trim($title);
115
+                    $title = LocalizationUtility::translate('plugins.feeds.new', 'dlf').' '.trim($title);
116 116
                 } else {
117
-                    $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf') . ' ' . trim($title);
117
+                    $title = LocalizationUtility::translate('plugins.feeds.update', 'dlf').' '.trim($title);
118 118
                 }
119 119
 
120 120
                 $document->setTitle($title);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class FeedsController extends AbstractController
28
-{
27
+class FeedsController extends AbstractController {
29 28
 
30 29
     /**
31 30
      * @access protected
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             || GeneralUtility::inList($this->settings['collections'], $requestData['collection'])
85 85
         ) {
86 86
 
87
-            $documents = $this->documentRepository->findAllByCollectionsLimited(GeneralUtility::intExplode(',', $requestData['collection'], true), $this->settings['limit']);
87
+            $documents = $this->documentRepository->findAllByCollectionsLimited(GeneralUtility::intExplode(',', $requestData['collection'], TRUE), $this->settings['limit']);
88 88
 
89 89
             foreach ($documents as $document) {
90 90
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 if ((empty($document->getTitle()) || !empty($this->settings['prependSuperiorTitle']))
94 94
                     && !empty($document->getPartof())
95 95
                 ) {
96
-                    $superiorTitle = AbstractDocument::getTitle($document->getPartof(), true);
96
+                    $superiorTitle = AbstractDocument::getTitle($document->getPartof(), TRUE);
97 97
                     if (!empty($superiorTitle)) {
98 98
                         $title .= '[' . $superiorTitle . ']';
99 99
                     }
Please login to merge, or discard this patch.
Classes/Controller/ToolboxController.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class ToolboxController extends AbstractController
28
-{
27
+class ToolboxController extends AbstractController {
29 28
 
30 29
     /**
31 30
      * @access private
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     private function renderToolByName(string $tool): void
118 118
     {
119 119
         $this->$tool();
120
-        $this->view->assign($tool, true);
120
+        $this->view->assign($tool, TRUE);
121 121
     }
122 122
 
123 123
     /**
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
 
140 140
         $annotationContainers = $this->currentDocument->physicalStructureInfo[$this->currentDocument->physicalStructure[$this->requestData['page']]]['annotationContainers'];
141 141
         if (
142
-            $annotationContainers != null
142
+            $annotationContainers != NULL
143 143
             && count($annotationContainers) > 0
144 144
         ) {
145
-            $this->view->assign('annotationTool', true);
145
+            $this->view->assign('annotationTool', TRUE);
146 146
         } else {
147
-            $this->view->assign('annotationTool', false);
147
+            $this->view->assign('annotationTool', FALSE);
148 148
         }
149 149
     }
150 150
 
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
         $this->setPage();
194 194
 
195 195
         if (!$this->isFullTextEmpty()) {
196
-            $this->view->assign('fulltext', true);
196
+            $this->view->assign('fulltext', TRUE);
197 197
             $this->view->assign('activateFullTextInitially', MathUtility::forceIntegerInRange($this->settings['activateFullTextInitially'], 0, 1, 0));
198 198
         } else {
199
-            $this->view->assign('fulltext', false);
199
+            $this->view->assign('fulltext', FALSE);
200 200
         }
201 201
     }
202 202
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         // Set parent element for initialization.
282 282
         $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool';
283 283
 
284
-        $this->view->assign('imageManipulation', true);
284
+        $this->view->assign('imageManipulation', TRUE);
285 285
         $this->view->assign('parentContainer', $parentContainer);
286 286
     }
287 287
 
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
     {
445 445
         $id = $this->document->getUid();
446 446
 
447
-        if ($id !== null && $id > 0) {
447
+        if ($id !== NULL && $id > 0) {
448 448
             // we found the document uid
449 449
             return (string) $id;
450 450
         } else {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                         $this->renderToolByName('renderSearchInDocumentTool');
100 100
                         break;
101 101
                     default:
102
-                        $this->logger->warning('Incorrect tool configuration: "' . $this->settings['tools'] . '". Tool "' . $tool . '" does not exist.');
102
+                        $this->logger->warning('Incorrect tool configuration: "'.$this->settings['tools'].'". Tool "'.$tool.'" does not exist.');
103 103
                 }
104 104
             }
105 105
         }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                 }
263 263
                 break;
264 264
             } else {
265
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
265
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
266 266
             }
267 267
         }
268 268
         return $image;
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             empty($firstPageLink)
347 347
             && empty($secondPageLink)
348 348
         ) {
349
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
349
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
350 350
         }
351 351
 
352 352
         if (!empty($firstPageLink)) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             }
385 385
         }
386 386
         if (empty($workLink)) {
387
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
387
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['files']['fileGrpDownload'].'"');
388 388
         }
389 389
         return $workLink;
390 390
     }
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
25 25
  *
26 26
  * @access public
27 27
  */
28
-class PageViewController extends AbstractController
29
-{
28
+class PageViewController extends AbstractController {
30 29
     /**
31 30
      * @access protected
32 31
      * @var array Holds the controls to add to the map
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             if ($iiif instanceof ManifestInterface) {
171 171
                 $canvas = $iiif->getContainedResourceById($canvasId);
172 172
                 /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */
173
-                if ($canvas != null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
173
+                if ($canvas != NULL && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
174 174
                     $annotationContainers = [];
175 175
                     /*
176 176
                      *  TODO Analyzing the annotations on the server side requires loading the annotation lists / pages
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
                      *  On the other hand, server connections are potentially better than client connections. Downloading annotation lists
181 181
                      */
182 182
                     foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) {
183
-                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) {
183
+                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) {
184 184
                             foreach ($textAnnotations as $annotation) {
185 185
                                 if (
186 186
                                     $annotation->getBody()->getFormat() == 'text/plain'
187
-                                    && $annotation->getBody()->getChars() != null
187
+                                    && $annotation->getBody()->getChars() != NULL
188 188
                                 ) {
189 189
                                     $annotationListData = [];
190 190
                                     $annotationListData['uri'] = $annotationContainer->getId();
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
                 $fulltext['mimetype'] = $file['mimeType'];
120 120
                 break;
121 121
             } else {
122
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
122
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
123 123
             }
124 124
         }
125 125
         if (empty($fulltext)) {
126
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpFulltext'] . '"');
126
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpFulltext'].'"');
127 127
         }
128 128
         return $fulltext;
129 129
     }
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
         $viewerConfiguration = '$(document).ready(function() {
142 142
                 if (dlfUtils.exists(dlfViewer)) {
143 143
                     tx_dlf_viewer = new dlfViewer({
144
-                        controls: ["' . implode('", "', $this->controls) . '"],
145
-                        div: "' . $this->settings['elementId'] . '",
146
-                        progressElementId: "' . $this->settings['progressElementId'] . '",
147
-                        images: ' . json_encode($this->images) . ',
148
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
149
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
150
-                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . '
144
+                        controls: ["' . implode('", "', $this->controls).'"],
145
+                        div: "' . $this->settings['elementId'].'",
146
+                        progressElementId: "' . $this->settings['progressElementId'].'",
147
+                        images: ' . json_encode($this->images).',
148
+                        fulltexts: ' . json_encode($this->fulltexts).',
149
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
150
+                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).'
151 151
                     });
152 152
                 }
153 153
             });';
@@ -240,11 +240,11 @@  discard block
 block discarded – undo
240 240
                 }
241 241
                 break;
242 242
             } else {
243
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
243
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
244 244
             }
245 245
         }
246 246
         if (empty($image)) {
247
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpImages'] . '"');
247
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->extConf['files']['fileGrpImages'].'"');
248 248
         }
249 249
         return $image;
250 250
     }
Please login to merge, or discard this patch.
Classes/Controller/CalendarController.php 3 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
         $this->view->assign('calendarData', $calendarData);
135 135
         $this->view->assign('documentId', $this->document->getUid());
136 136
         $this->view->assign('yearLinkTitle', $yearLinkTitle);
137
-        $this->view->assign('parentDocumentId', $this->document->getPartof() ?: $this->document->getCurrentDocument()->tableOfContents[0]['points']);
138
-        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']);
137
+        $this->view->assign('parentDocumentId', $this->document->getPartof() ? : $this->document->getCurrentDocument()->tableOfContents[0]['points']);
138
+        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle($this->document->getPartof()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']);
139 139
     }
140 140
 
141 141
     /**
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         }
221 221
 
222 222
         $this->view->assign('documentId', $this->document->getUid());
223
-        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ?: $this->document->getCurrentDocument()->tableOfContents[0]['label']);
223
+        $this->view->assign('allYearDocTitle', $this->document->getCurrentDocument()->getTitle((int) $this->document->getUid()) ? : $this->document->getCurrentDocument()->tableOfContents[0]['label']);
224 224
     }
225 225
 
226 226
     /**
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     protected function getCalendarYear(array &$calendarData, array $calendarIssuesByMonth, int $year, int $firstMonth = 1, int $lastMonth = 12): void
240 240
     {
241 241
         for ($i = $firstMonth; $i <= $lastMonth; $i++) {
242
-            $key = $year . '-' . $i;
242
+            $key = $year.'-'.$i;
243 243
 
244 244
             $calendarData[$key] = [
245 245
                 'DAYMON_NAME' => strftime('%a', strtotime('last Monday')),
@@ -249,16 +249,16 @@  discard block
 block discarded – undo
249 249
                 'DAYFRI_NAME' => strftime('%a', strtotime('last Friday')),
250 250
                 'DAYSAT_NAME' => strftime('%a', strtotime('last Saturday')),
251 251
                 'DAYSUN_NAME' => strftime('%a', strtotime('last Sunday')),
252
-                'MONTHNAME'  => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year,
252
+                'MONTHNAME'  => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year,
253 253
                 'CALYEAR' => ($i == $firstMonth) ? $year : ''
254 254
             ];
255 255
 
256
-            $firstOfMonth = strtotime($year . '-' . $i . '-1');
256
+            $firstOfMonth = strtotime($year.'-'.$i.'-1');
257 257
             $lastOfMonth = strtotime('last day of', ($firstOfMonth));
258 258
             $firstOfMonthStart = strtotime('last Monday', $firstOfMonth);
259 259
             // There are never more than 6 weeks in a month.
260 260
             for ($j = 0; $j <= 5; $j++) {
261
-                $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart);
261
+                $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart);
262 262
 
263 263
                 $calendarData[$key]['week'][$j] = [
264 264
                     'DAYMON' => ['dayValue' => '&nbsp;'],
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 ];
272 272
                 // Every week has seven days. ;-)
273 273
                 for ($k = 0; $k <= 6; $k++) {
274
-                    $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek);
274
+                    $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek);
275 275
                     if (
276 276
                         $currentDayTime >= $firstOfMonth
277 277
                         && $currentDayTime <= $lastOfMonth
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     private function fillCalendar(array &$calendarData, int $currentDayTime, string $dayLinks, array $dayLinkDiv, int $firstDayOfWeek, int $k): void
344 344
     {
345
-        switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) {
345
+        switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) {
346 346
             case '0':
347 347
                 $this->fillDay($calendarData, $currentDayTime, 'DAYSUN', $dayLinks, $dayLinkDiv);
348 348
                 break;
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
                 $_day = date('j', $dateTimestamp);
447 447
                 $issuesByYear[$_year][$_month][$_day][] = $issue;
448 448
             } else {
449
-                $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication');
449
+                $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication');
450 450
             }
451 451
         }
452 452
         // Sort by years.
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
             foreach ($year['children'] as $month) {
490 490
                 foreach ($month['children'] as $day) {
491 491
                     foreach ($day['children'] as $issue) {
492
-                        $title = $issue['label'] ?: $issue['orderlabel'];
492
+                        $title = $issue['label'] ? : $issue['orderlabel'];
493 493
                         if (strtotime($title) !== false) {
494 494
                             $title = strftime('%x', strtotime($title));
495 495
                         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
25 25
  *
26 26
  * @access public
27 27
  */
28
-class CalendarController extends AbstractController
29
-{
28
+class CalendarController extends AbstractController {
30 29
     /**
31 30
      * @access protected
32 31
      * @var StructureRepository
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
         switch ($type) {
83 83
             case 'newspaper':
84 84
             case 'ephemera':
85
-                $this->forward('years', null, null, $this->requestData);
85
+                $this->forward('years', NULL, NULL, $this->requestData);
86 86
             case 'year':
87
-                $this->forward('calendar', null, null, $this->requestData);
87
+                $this->forward('calendar', NULL, NULL, $this->requestData);
88 88
             case 'issue':
89 89
             default:
90 90
                 break;
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 
441 441
         foreach ($this->getIssues() as $issue) {
442 442
             $dateTimestamp = strtotime($issue['year']);
443
-            if ($dateTimestamp !== false) {
443
+            if ($dateTimestamp !== FALSE) {
444 444
                 $_year = date('Y', $dateTimestamp);
445 445
                 $_month = date('n', $dateTimestamp);
446 446
                 $_day = date('j', $dateTimestamp);
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
                 foreach ($month['children'] as $day) {
491 491
                     foreach ($day['children'] as $issue) {
492 492
                         $title = $issue['label'] ?: $issue['orderlabel'];
493
-                        if (strtotime($title) !== false) {
493
+                        if (strtotime($title) !== FALSE) {
494 494
                             $title = strftime('%x', strtotime($title));
495 495
                         }
496 496
 
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
                 $title = $document->getTitle();
524 524
             } else {
525 525
                 $title = !empty($document->getMetsLabel()) ? $document->getMetsLabel() : $document->getMetsOrderlabel();
526
-                if (strtotime($title) !== false) {
526
+                if (strtotime($title) !== FALSE) {
527 527
                     $title = strftime('%x', strtotime($title));
528 528
                 }
529 529
             }
Please login to merge, or discard this patch.