Passed
Pull Request — master (#97)
by Alexander
03:30
created
Classes/Plugin/Collection.php 3 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class Collection extends \Kitodo\Dlf\Common\AbstractPlugin
30
-{
29
+class Collection extends \Kitodo\Dlf\Common\AbstractPlugin {
31 30
     public $scriptRelPath = 'Classes/Plugin/Collection.php';
32 31
 
33 32
     /**
@@ -48,8 +47,7 @@  discard block
 block discarded – undo
48 47
      *
49 48
      * @return string The content that is displayed on the website
50 49
      */
51
-    public function main($content, $conf)
52
-    {
50
+    public function main($content, $conf) {
53 51
         $this->init($conf);
54 52
         // Turn cache on.
55 53
         $this->setCache(true);
@@ -77,8 +75,7 @@  discard block
 block discarded – undo
77 75
      *
78 76
      * @return string The list of collections ready to output
79 77
      */
80
-    protected function showCollectionList()
81
-    {
78
+    protected function showCollectionList() {
82 79
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
83 80
             ->getQueryBuilderForTable('tx_dlf_collections');
84 81
 
@@ -257,8 +254,7 @@  discard block
 block discarded – undo
257 254
      *
258 255
      * @return void
259 256
      */
260
-    protected function showSingleCollection($id)
261
-    {
257
+    protected function showSingleCollection($id) {
262 258
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
263 259
         $queryBuilder = $connectionPool->getQueryBuilderForTable('tx_dlf_collections');
264 260
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
         foreach ($collections as $collection) {
177 177
             $solr_query = '';
178 178
             if ($collection['index_query'] != '') {
179
-                $solr_query .= '(' . $collection['index_query'] . ')';
179
+                $solr_query .= '('.$collection['index_query'].')';
180 180
             } else {
181
-                $solr_query .= 'collection:("' . $collection['index_name'] . '")';
181
+                $solr_query .= 'collection:("'.$collection['index_name'].'")';
182 182
             }
183
-            $partOfNothing = $solr->search_raw($solr_query . ' AND partof:0 AND toplevel:true', $params);
184
-            $partOfSomething = $solr->search_raw($solr_query . ' AND NOT partof:0 AND toplevel:true', $params);
183
+            $partOfNothing = $solr->search_raw($solr_query.' AND partof:0 AND toplevel:true', $params);
184
+            $partOfSomething = $solr->search_raw($solr_query.' AND NOT partof:0 AND toplevel:true', $params);
185 185
             // Titles are all documents that are "root" elements i.e. partof == 0
186 186
             $collection['titles'] = [];
187 187
             foreach ($partOfNothing as $doc) {
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
             $markerArray[$_key]['###TITLE###'] = $this->cObj->typoLink(htmlspecialchars($collection['label']), $conf);
220 220
             // Add feed link if applicable.
221 221
             if (!empty($this->conf['targetFeed'])) {
222
-                $img = '<img src="' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Icons/txdlffeeds.png" alt="' . htmlspecialchars($this->pi_getLL('feedAlt', '')) . '" title="' . htmlspecialchars($this->pi_getLL('feedTitle', '')) . '" />';
222
+                $img = '<img src="'.\TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Icons/txdlffeeds.png" alt="'.htmlspecialchars($this->pi_getLL('feedAlt', '')).'" title="'.htmlspecialchars($this->pi_getLL('feedTitle', '')).'" />';
223 223
                 $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], false, $this->conf['targetFeed']);
224 224
             } else {
225 225
                 $markerArray[$_key]['###FEED###'] = '';
226 226
             }
227 227
             // Add thumbnail.
228 228
             if (!empty($collection['thumbnail'])) {
229
-                $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="' . htmlspecialchars($collection['label']) . '" src="' . $collection['thumbnail'] . '" />';
229
+                $markerArray[$_key]['###THUMBNAIL###'] = '<img alt="" title="'.htmlspecialchars($collection['label']).'" src="'.$collection['thumbnail'].'" />';
230 230
             } else {
231 231
                 $markerArray[$_key]['###THUMBNAIL###'] = '';
232 232
             }
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
             $markerArray[$_key]['###DESCRIPTION###'] = $this->pi_RTEcssText($collection['description']);
235 235
             // Build statistic's output.
236 236
             $labelTitles = $this->pi_getLL((count($collection['titles']) > 1 ? 'titles' : 'title'), '');
237
-            $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']) . $labelTitles);
237
+            $markerArray[$_key]['###COUNT_TITLES###'] = htmlspecialchars(count($collection['titles']).$labelTitles);
238 238
             $labelVolumes = $this->pi_getLL((count($collection['volumes']) > 1 ? 'volumes' : 'volume'), '');
239
-            $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']) . $labelVolumes);
239
+            $markerArray[$_key]['###COUNT_VOLUMES###'] = htmlspecialchars(count($collection['volumes']).$labelVolumes);
240 240
         }
241 241
         // Randomize sorting?
242 242
         if (!empty($this->conf['randomize'])) {
@@ -320,14 +320,14 @@  discard block
 block discarded – undo
320 320
                 $collectionData = $resArray;
321 321
             }
322 322
         } else {
323
-            $this->logger->warning('No collection with UID ' . $id . ' found.');
323
+            $this->logger->warning('No collection with UID '.$id.' found.');
324 324
             return;
325 325
         }
326 326
         // Fetch corresponding document UIDs from Solr.
327 327
         if ($collectionData['index_search'] != '') {
328
-            $solr_query = '(' . $collectionData['index_search'] . ')';
328
+            $solr_query = '('.$collectionData['index_search'].')';
329 329
         } else {
330
-            $solr_query = 'collection:("' . $collectionData['index_name'] . '") AND toplevel:true';
330
+            $solr_query = 'collection:("'.$collectionData['index_name'].'") AND toplevel:true';
331 331
         }
332 332
         $solr = Solr::getInstance($this->conf['solrcore']);
333 333
         if (!$solr->ready) {
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                         'source' => 'collection',
377 377
                         'select' => $id,
378 378
                         'userid' => $collectionData['userid'],
379
-                        'params' => ['filterquery' => [['query' => 'collection_faceting:("' . $collectionData['index_name'] . '")']]],
379
+                        'params' => ['filterquery' => [['query' => 'collection_faceting:("'.$collectionData['index_name'].'")']]],
380 380
                         'core' => '',
381 381
                         'pid' => $this->conf['pages'],
382 382
                         'order' => 'title',
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
                 ];
406 406
             } else {
407 407
                 // volume_sorting should be always set - but it's not a required field. We append the uid to the array key to make it always unique.
408
-                $subparts[$resArray['partof']][$resArray['volume_sorting'] . str_pad($resArray['uid'], 9, '0', STR_PAD_LEFT)] = [
408
+                $subparts[$resArray['partof']][$resArray['volume_sorting'].str_pad($resArray['uid'], 9, '0', STR_PAD_LEFT)] = [
409 409
                     'u' => $resArray['uid'],
410 410
                     'h' => '',
411 411
                     's' => $sorting,
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
441 441
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http']
442 442
         ];
443
-        header('Location: ' . GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
443
+        header('Location: '.GeneralUtility::locationHeaderUrl($this->cObj->typoLink_URL($linkConf)));
444 444
         exit;
445 445
     }
446 446
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $this->init($conf);
55 55
         // Turn cache on.
56
-        $this->setCache(true);
56
+        $this->setCache(TRUE);
57 57
         // Quit without doing anything if required configuration variables are not set.
58 58
         if (empty($this->conf['pages'])) {
59 59
             $this->logger->warning('Incomplete plugin configuration');
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
                 'parameter' => $GLOBALS['TSFE']->id,
214 214
                 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
215 215
                 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
216
-                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
216
+                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
217 217
             ];
218 218
             // Link collection's title to list view.
219 219
             $markerArray[$_key]['###TITLE###'] = $this->cObj->typoLink(htmlspecialchars($collection['label']), $conf);
220 220
             // Add feed link if applicable.
221 221
             if (!empty($this->conf['targetFeed'])) {
222 222
                 $img = '<img src="' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Icons/txdlffeeds.png" alt="' . htmlspecialchars($this->pi_getLL('feedAlt', '')) . '" title="' . htmlspecialchars($this->pi_getLL('feedTitle', '')) . '" />';
223
-                $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], false, $this->conf['targetFeed']);
223
+                $markerArray[$_key]['###FEED###'] = $this->pi_linkTP($img, [$this->prefixId => ['collection' => $collection['uid']]], FALSE, $this->conf['targetFeed']);
224 224
             } else {
225 225
                 $markerArray[$_key]['###FEED###'] = '';
226 226
             }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         if (!empty($this->conf['randomize'])) {
243 243
             ksort($markerArray, SORT_NUMERIC);
244 244
             // Don't cache the output.
245
-            $this->setCache(false);
245
+            $this->setCache(FALSE);
246 246
         }
247 247
         $entry = $this->templateService->getSubpart($this->template, '###ENTRY###');
248 248
         foreach ($markerArray as $marker) {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                 $hookObj->showCollectionList_getCustomCollectionList($this, $this->conf['templateFile'], $content, $markerArray);
255 255
             }
256 256
         }
257
-        return $this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, true);
257
+        return $this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, TRUE);
258 258
     }
259 259
 
260 260
     /**
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
                         'core' => '',
381 381
                         'pid' => $this->conf['pages'],
382 382
                         'order' => 'title',
383
-                        'order.asc' => true
383
+                        'order.asc' => TRUE
384 384
                     ]
385 385
                 ];
386 386
             }
Please login to merge, or discard this patch.
Classes/Plugin/Statistics.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  * @subpackage dlf
26 26
  * @access public
27 27
  */
28
-class Statistics extends \Kitodo\Dlf\Common\AbstractPlugin
29
-{
28
+class Statistics extends \Kitodo\Dlf\Common\AbstractPlugin {
30 29
     public $scriptRelPath = 'Classes/Plugin/Statistics.php';
31 30
 
32 31
     /**
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      *
40 39
      * @return string The content that is displayed on the website
41 40
      */
42
-    public function main($content, $conf)
43
-    {
41
+    public function main($content, $conf) {
44 42
         $this->init($conf);
45 43
         // Turn cache on.
46 44
         $this->setCache(true);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,8 +180,8 @@
 block discarded – undo
180 180
                 '###VOLUMES###'
181 181
             ],
182 182
             'value' => [
183
-                $countTitles . ($countTitles > 1 ? htmlspecialchars($this->pi_getLL('titles', '')) : htmlspecialchars($this->pi_getLL('title', ''))),
184
-                $countVolumes . ($countVolumes > 1 ? htmlspecialchars($this->pi_getLL('volumes', '')) : htmlspecialchars($this->pi_getLL('volume', '')))
183
+                $countTitles.($countTitles > 1 ? htmlspecialchars($this->pi_getLL('titles', '')) : htmlspecialchars($this->pi_getLL('title', ''))),
184
+                $countVolumes.($countVolumes > 1 ? htmlspecialchars($this->pi_getLL('volumes', '')) : htmlspecialchars($this->pi_getLL('volume', '')))
185 185
             ]
186 186
         ];
187 187
         // Apply replacements.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $this->init($conf);
45 45
         // Turn cache on.
46
-        $this->setCache(true);
46
+        $this->setCache(TRUE);
47 47
         // Quit without doing anything if required configuration variables are not set.
48 48
         if (empty($this->conf['pages'])) {
49 49
             $this->logger->warning('Incomplete plugin configuration');
Please login to merge, or discard this patch.
Classes/Plugin/AudioPlayer.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         // Load current document.
81 81
         $this->loadDocument();
82 82
         if (
83
-            $this->doc === null
83
+            $this->doc === NULL
84 84
             || $this->doc->numPages < 1
85 85
         ) {
86 86
             // Quit without doing anything if required variables are not set.
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@
 block discarded – undo
55 55
             $(document).ready(function() {
56 56
                 AudioPlayer = new dlfAudioPlayer({
57 57
                     audio: {
58
-                        mimeType: "' . $this->audio['mimetype'] . '",
59
-                        title: "' . $this->audio['label'] . '",
60
-                        url:  "' . $this->audio['url'] . '"
58
+                        mimeType: "' . $this->audio['mimetype'].'",
59
+                        title: "' . $this->audio['label'].'",
60
+                        url:  "' . $this->audio['url'].'"
61 61
                     },
62 62
                     parentElId: "tx-dlf-audio",
63
-                    swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf"
63
+                    swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf"
64 64
                 });
65 65
             });
66 66
         ';
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin
30
-{
29
+class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin {
31 30
     public $scriptRelPath = 'Classes/Plugin/AudioPlayer.php';
32 31
 
33 32
     /**
@@ -45,8 +44,7 @@  discard block
 block discarded – undo
45 44
      *
46 45
      * @return void
47 46
      */
48
-    protected function addPlayerJS()
49
-    {
47
+    protected function addPlayerJS() {
50 48
         // Inline CSS.
51 49
         $inlineCSS = '#tx-dlf-audio { width: 100px; height: 100px; }';
52 50
 
@@ -80,8 +78,7 @@  discard block
 block discarded – undo
80 78
      *
81 79
      * @return string The content that is displayed on the website
82 80
      */
83
-    public function main($content, $conf)
84
-    {
81
+    public function main($content, $conf) {
85 82
         $this->init($conf);
86 83
         // Load current document.
87 84
         $this->loadDocument();
Please login to merge, or discard this patch.
Classes/Plugin/ListView.php 3 patches
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class ListView extends \Kitodo\Dlf\Common\AbstractPlugin
33
-{
32
+class ListView extends \Kitodo\Dlf\Common\AbstractPlugin {
34 33
     public $scriptRelPath = 'Classes/Plugin/ListView.php';
35 34
 
36 35
     /**
@@ -72,8 +71,7 @@  discard block
 block discarded – undo
72 71
      *
73 72
      * @return string The rendered page browser ready for output
74 73
      */
75
-    protected function getPageBrowser()
76
-    {
74
+    protected function getPageBrowser() {
77 75
         // Get overall number of pages.
78 76
         $maxPages = intval(ceil($this->list->metadata['options']['numberOfToplevelHits'] / $this->conf['limit']));
79 77
         // Return empty pagebrowser if there is just one page.
@@ -124,8 +122,7 @@  discard block
 block discarded – undo
124 122
      *
125 123
      * @return string The rendered entry ready for output
126 124
      */
127
-    protected function getEntry($number, $template)
128
-    {
125
+    protected function getEntry($number, $template) {
129 126
         $markerArray['###NUMBER###'] = ($this->piVars['pointer'] * $this->conf['limit']) + $number + 1;
130 127
         $markerArray['###METADATA###'] = '';
131 128
         $markerArray['###THUMBNAIL###'] = '';
@@ -227,8 +224,7 @@  discard block
 block discarded – undo
227 224
      *
228 225
      * @return array The parsed fieldwrap
229 226
      */
230
-    private function getFieldWrap($index_name, $wrap)
231
-    {
227
+    private function getFieldWrap($index_name, $wrap) {
232 228
         if (isset($this->fieldwrap[$index_name])) {
233 229
             return $this->fieldwrap[$index_name];
234 230
         } else {
@@ -243,8 +239,7 @@  discard block
 block discarded – undo
243 239
      *
244 240
      * @return string The rendered sorting dialog ready for output
245 241
      */
246
-    protected function getSortingForm()
247
-    {
242
+    protected function getSortingForm() {
248 243
         // Return nothing if there are no sortable metadata fields.
249 244
         if (!count($this->sortables)) {
250 245
             return '';
@@ -295,8 +290,7 @@  discard block
 block discarded – undo
295 290
      *
296 291
      * @return string The rendered entries ready for output
297 292
      */
298
-    protected function getSubEntries($number, $template)
299
-    {
293
+    protected function getSubEntries($number, $template) {
300 294
         $content = '';
301 295
         $noTitle = $this->pi_getLL('noTitle');
302 296
         $highlight_word = preg_replace('/\s\s+/', ';', $this->list->metadata['searchString']);
@@ -399,8 +393,7 @@  discard block
 block discarded – undo
399 393
      *
400 394
      * @return void
401 395
      */
402
-    protected function loadConfig()
403
-    {
396
+    protected function loadConfig() {
404 397
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
405 398
             ->getQueryBuilderForTable('tx_dlf_metadata');
406 399
 
@@ -446,8 +439,7 @@  discard block
 block discarded – undo
446 439
      *
447 440
      * @return string The content that is displayed on the website
448 441
      */
449
-    public function main($content, $conf)
450
-    {
442
+    public function main($content, $conf) {
451 443
         $this->init($conf);
452 444
         // Don't cache the output.
453 445
         $this->setCache(false);
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
             return '';
82 82
         }
83 83
         // Get separator.
84
-        $separator = '<span class="separator">' . htmlspecialchars($this->pi_getLL('separator', ' - ')) . '</span>';
84
+        $separator = '<span class="separator">'.htmlspecialchars($this->pi_getLL('separator', ' - ')).'</span>';
85 85
         // Add link to previous page.
86 86
         if ($this->piVars['pointer'] > 0) {
87
-            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], true) . $separator;
87
+            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], true).$separator;
88 88
         } else {
89
-            $output = '<span>' . htmlspecialchars($this->pi_getLL('prevPage', '<')) . '</span>' . $separator;
89
+            $output = '<span>'.htmlspecialchars($this->pi_getLL('prevPage', '<')).'</span>'.$separator;
90 90
         }
91 91
         $i = 0;
92 92
         $skip = null;
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
         while ($i < $maxPages) {
95 95
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
96 96
                 if ($this->piVars['pointer'] != $i) {
97
-                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], true) . $separator;
97
+                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], true).$separator;
98 98
                 } else {
99
-                    $output .= '<span class="active">' . htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)) . '</span>' . $separator;
99
+                    $output .= '<span class="active">'.htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)).'</span>'.$separator;
100 100
                 }
101 101
                 $skip = true;
102 102
             } elseif ($skip === true) {
103
-                $output .= '<span class="skip">' . htmlspecialchars($this->pi_getLL('skip', '...')) . '</span>' . $separator;
103
+                $output .= '<span class="skip">'.htmlspecialchars($this->pi_getLL('skip', '...')).'</span>'.$separator;
104 104
                 $skip = false;
105 105
             }
106 106
             $i++;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         if ($this->piVars['pointer'] < $maxPages - 1) {
110 110
             $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '>')), ['pointer' => $this->piVars['pointer'] + 1], true);
111 111
         } else {
112
-            $output .= '<span>' . htmlspecialchars($this->pi_getLL('nextPage', '>')) . '</span>';
112
+            $output .= '<span>'.htmlspecialchars($this->pi_getLL('nextPage', '>')).'</span>';
113 113
         }
114 114
         return $output;
115 115
     }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                         if (empty($value) && $this->conf['getTitle']) {
147 147
                             $superiorTitle = Document::getTitle($this->list[$number]['uid'], true);
148 148
                             if (!empty($superiorTitle)) {
149
-                                $value = '[' . $superiorTitle . ']';
149
+                                $value = '['.$superiorTitle.']';
150 150
                             }
151 151
                         }
152 152
                         // Set fake title if still not present.
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         }
196 196
         // Add thumbnail.
197 197
         if (!empty($this->list[$number]['thumbnail'])) {
198
-            $markerArray['###THUMBNAIL###'] = '<img alt="' . $imgAlt . '" src="' . $this->list[$number]['thumbnail'] . '" />';
198
+            $markerArray['###THUMBNAIL###'] = '<img alt="'.$imgAlt.'" src="'.$this->list[$number]['thumbnail'].'" />';
199 199
         }
200 200
         // Add preview.
201 201
         if (!empty($this->list[$number]['preview'])) {
@@ -265,28 +265,28 @@  discard block
 block discarded – undo
265 265
             $linkConf['additionalParams'] = GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', true, false);
266 266
         }
267 267
         // Build HTML form.
268
-        $sorting = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />';
268
+        $sorting = '<form action="'.$this->cObj->typoLink_URL($linkConf).'" method="get"><div><input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />';
269 269
         foreach ($this->piVars as $piVar => $value) {
270 270
             if ($piVar != 'order' && $piVar != 'DATA' && !empty($value)) {
271
-                $sorting .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($value) . '" />';
271
+                $sorting .= '<input type="hidden" name="'.$this->prefixId.'['.preg_replace('/[^A-Za-z0-9_-]/', '', $piVar).']" value="'.htmlspecialchars($value).'" />';
272 272
             }
273 273
         }
274 274
         // Select sort field.
275
-        $uniqId = uniqid($prefix . '-');
276
-        $sorting .= '<label for="' . $uniqId . '">' . htmlspecialchars($this->pi_getLL('orderBy', '')) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[order]" onchange="javascript:this.form.submit();">';
275
+        $uniqId = uniqid($prefix.'-');
276
+        $sorting .= '<label for="'.$uniqId.'">'.htmlspecialchars($this->pi_getLL('orderBy', '')).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[order]" onchange="javascript:this.form.submit();">';
277 277
         // Add relevance sorting if this is a search result list.
278 278
         if ($this->list->metadata['options']['source'] == 'search') {
279
-            $sorting .= '<option value="score"' . (($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '') . '>' . htmlspecialchars($this->pi_getLL('relevance', '')) . '</option>';
279
+            $sorting .= '<option value="score"'.(($this->list->metadata['options']['order'] == 'score') ? ' selected="selected"' : '').'>'.htmlspecialchars($this->pi_getLL('relevance', '')).'</option>';
280 280
         }
281 281
         foreach ($this->sortables as $index_name => $label) {
282
-            $sorting .= '<option value="' . htmlspecialchars($index_name) . '"' . (($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
282
+            $sorting .= '<option value="'.htmlspecialchars($index_name).'"'.(($this->list->metadata['options']['order'] == $index_name) ? ' selected="selected"' : '').'>'.htmlspecialchars($label).'</option>';
283 283
         }
284 284
         $sorting .= '</select>';
285 285
         // Select sort direction.
286
-        $uniqId = uniqid($prefix . '-');
287
-        $sorting .= '<label for="' . $uniqId . '">' . htmlspecialchars($this->pi_getLL('direction', '')) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[asc]" onchange="javascript:this.form.submit();">';
288
-        $sorting .= '<option value="1" ' . ($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($this->pi_getLL('direction.asc', '')) . '</option>';
289
-        $sorting .= '<option value="0" ' . (!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($this->pi_getLL('direction.desc', '')) . '</option>';
286
+        $uniqId = uniqid($prefix.'-');
287
+        $sorting .= '<label for="'.$uniqId.'">'.htmlspecialchars($this->pi_getLL('direction', '')).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[asc]" onchange="javascript:this.form.submit();">';
288
+        $sorting .= '<option value="1" '.($this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.htmlspecialchars($this->pi_getLL('direction.asc', '')).'</option>';
289
+        $sorting .= '<option value="0" '.(!$this->list->metadata['options']['order.asc'] ? ' selected="selected"' : '').'>'.htmlspecialchars($this->pi_getLL('direction.desc', '')).'</option>';
290 290
         $sorting .= '</select></div></form>';
291 291
         return $sorting;
292 292
     }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                         if (empty($value) && $this->conf['getTitle']) {
323 323
                             $superiorTitle = Document::getTitle($subpart['uid'], true);
324 324
                             if (!empty($superiorTitle)) {
325
-                                $value = '[' . $superiorTitle . ']';
325
+                                $value = '['.$superiorTitle.']';
326 326
                             }
327 327
                         }
328 328
                         // Set fake title if still not present.
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
                         $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages']));
357 357
                         // Add page number for single pages.
358 358
                         if ($_value == 'page') {
359
-                            $value .= ' ' . intval($subpart['page']);
359
+                            $value .= ' '.intval($subpart['page']);
360 360
                         }
361 361
                     } elseif ($index_name == 'language' && !empty($value)) {
362 362
                         // Translate ISO 639 language code.
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
             }
378 378
             // Add thumbnail.
379 379
             if (!empty($subpart['thumbnail'])) {
380
-                $markerArray['###SUBTHUMBNAIL###'] = '<img alt="' . $imgAlt . '" src="' . $subpart['thumbnail'] . '" />';
380
+                $markerArray['###SUBTHUMBNAIL###'] = '<img alt="'.$imgAlt.'" src="'.$subpart['thumbnail'].'" />';
381 381
             }
382 382
             // Add preview.
383 383
             if (!empty($subpart['preview'])) {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
                 || (isset($this->piVars['asc']) && $this->piVars['asc'] != $listMetadata['options']['order.asc'])
492 492
             ) {
493 493
                 // Update list's metadata.
494
-                $listMetadata['options']['params']['sort'] = [$this->piVars['order'] . "_sorting" => (bool) $this->piVars['asc'] ? 'asc' : 'desc'];
494
+                $listMetadata['options']['params']['sort'] = [$this->piVars['order']."_sorting" => (bool) $this->piVars['asc'] ? 'asc' : 'desc'];
495 495
                 $listMetadata['options']['order'] = $this->piVars['order'];
496 496
                 $listMetadata['options']['order.asc'] = (bool) $this->piVars['asc'];
497 497
                 // Reset pointer.
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
                 $this->list = $solr->search();
516 516
             }
517 517
             // Add list description
518
-            $listMetadata['description'] = '<p class="tx-dlf-search-numHits">' . htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $this->list->metadata['options']['numberOfHits'], $this->list->metadata['options']['numberOfToplevelHits'])) . '</p>';
518
+            $listMetadata['description'] = '<p class="tx-dlf-search-numHits">'.htmlspecialchars(sprintf($this->pi_getLL('hits', ''), $this->list->metadata['options']['numberOfHits'], $this->list->metadata['options']['numberOfToplevelHits'])).'</p>';
519 519
             $this->list->metadata = $listMetadata;
520 520
             // Save updated list.
521 521
             $this->list->save();
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
         $markerArray['###LISTTITLE###'] = $this->list->metadata['label'];
545 545
         $markerArray['###LISTDESCRIPTION###'] = $this->list->metadata['description'];
546 546
         if (!empty($this->list->metadata['thumbnail'])) {
547
-            $markerArray['###LISTTHUMBNAIL###'] = '<img alt="" src="' . $this->list->metadata['thumbnail'] . '" />';
547
+            $markerArray['###LISTTHUMBNAIL###'] = '<img alt="" src="'.$this->list->metadata['thumbnail'].'" />';
548 548
         } else {
549 549
             $markerArray['###LISTTHUMBNAIL###'] = '';
550 550
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -84,30 +84,30 @@  discard block
 block discarded – undo
84 84
         $separator = '<span class="separator">' . htmlspecialchars($this->pi_getLL('separator', ' - ')) . '</span>';
85 85
         // Add link to previous page.
86 86
         if ($this->piVars['pointer'] > 0) {
87
-            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], true) . $separator;
87
+            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1], TRUE) . $separator;
88 88
         } else {
89 89
             $output = '<span>' . htmlspecialchars($this->pi_getLL('prevPage', '<')) . '</span>' . $separator;
90 90
         }
91 91
         $i = 0;
92
-        $skip = null;
92
+        $skip = NULL;
93 93
         // Add links to pages.
94 94
         while ($i < $maxPages) {
95 95
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
96 96
                 if ($this->piVars['pointer'] != $i) {
97
-                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], true) . $separator;
97
+                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i], TRUE) . $separator;
98 98
                 } else {
99 99
                     $output .= '<span class="active">' . htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)) . '</span>' . $separator;
100 100
                 }
101
-                $skip = true;
102
-            } elseif ($skip === true) {
101
+                $skip = TRUE;
102
+            } elseif ($skip === TRUE) {
103 103
                 $output .= '<span class="skip">' . htmlspecialchars($this->pi_getLL('skip', '...')) . '</span>' . $separator;
104
-                $skip = false;
104
+                $skip = FALSE;
105 105
             }
106 106
             $i++;
107 107
         }
108 108
         // Add link to next page.
109 109
         if ($this->piVars['pointer'] < $maxPages - 1) {
110
-            $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '>')), ['pointer' => $this->piVars['pointer'] + 1], true);
110
+            $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '>')), ['pointer' => $this->piVars['pointer'] + 1], TRUE);
111 111
         } else {
112 112
             $output .= '<span>' . htmlspecialchars($this->pi_getLL('nextPage', '>')) . '</span>';
113 113
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     if ($index_name == 'title') {
145 145
                         // Get title of parent document if needed.
146 146
                         if (empty($value) && $this->conf['getTitle']) {
147
-                            $superiorTitle = Document::getTitle($this->list[$number]['uid'], true);
147
+                            $superiorTitle = Document::getTitle($this->list[$number]['uid'], TRUE);
148 148
                             if (!empty($superiorTitle)) {
149 149
                                 $value = '[' . $superiorTitle . ']';
150 150
                             }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                             'parameter' => $this->conf['targetPid'],
167 167
                             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
168 168
                             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
169
-                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
169
+                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
170 170
                         ];
171 171
                         $value = $this->cObj->typoLink(htmlspecialchars($value), $conf);
172 172
                     } elseif ($index_name == 'owner' && !empty($value)) {
@@ -213,12 +213,12 @@  discard block
 block discarded – undo
213 213
                 'parameter' => $this->conf['targetBasket'],
214 214
                 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
215 215
                 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
216
-                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
216
+                'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
217 217
             ];
218 218
             $link = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('addBasket', '')), $conf);
219 219
             $markerArray['###BASKETBUTTON###'] = $link;
220 220
         }
221
-        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###SUBTEMPLATE###', $subpart, true), $markerArray);
221
+        return $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($template['entry'], '###SUBTEMPLATE###', $subpart, TRUE), $markerArray);
222 222
     }
223 223
 
224 224
     /**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http']
263 263
         ];
264 264
         if (!empty($this->piVars['logicalPage'])) {
265
-            $linkConf['additionalParams'] = GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', true, false);
265
+            $linkConf['additionalParams'] = GeneralUtility::implodeArrayForUrl($this->prefixId, ['logicalPage' => $this->piVars['logicalPage']], '', TRUE, FALSE);
266 266
         }
267 267
         // Build HTML form.
268 268
         $sorting = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />';
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
                     if ($index_name == 'title') {
321 321
                         // Get title of parent document if needed.
322 322
                         if (empty($value) && $this->conf['getTitle']) {
323
-                            $superiorTitle = Document::getTitle($subpart['uid'], true);
323
+                            $superiorTitle = Document::getTitle($subpart['uid'], TRUE);
324 324
                             if (!empty($superiorTitle)) {
325 325
                                 $value = '[' . $superiorTitle . ']';
326 326
                             }
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                             'parameter' => $this->conf['targetPid'],
345 345
                             'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
346 346
                             'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
347
-                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
347
+                            'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
348 348
                         ];
349 349
                         $value = $this->cObj->typoLink(htmlspecialchars($value), $conf);
350 350
                     } elseif ($index_name == 'owner' && !empty($value)) {
@@ -392,14 +392,14 @@  discard block
 block discarded – undo
392 392
                     'parameter' => $this->conf['targetBasket'],
393 393
                     'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
394 394
                     'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
395
-                    'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', true, false)
395
+                    'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
396 396
                 ];
397 397
                 $link = $this->cObj->typoLink(htmlspecialchars($this->pi_getLL('addBasket', '')), $conf);
398 398
                 $markerArray['###SUBBASKETBUTTON###'] = $link;
399 399
             }
400 400
             $content .= $this->templateService->substituteMarkerArray($template['subentry'], $markerArray);
401 401
         }
402
-        return $this->templateService->substituteSubpart($this->templateService->getSubpart($this->template, '###SUBTEMPLATE###'), '###SUBENTRY###', $content, true);
402
+        return $this->templateService->substituteSubpart($this->templateService->getSubpart($this->template, '###SUBTEMPLATE###'), '###SUBENTRY###', $content, TRUE);
403 403
     }
404 404
 
405 405
     /**
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
     {
461 461
         $this->init($conf);
462 462
         // Don't cache the output.
463
-        $this->setCache(false);
463
+        $this->setCache(FALSE);
464 464
         // Load the list.
465 465
         $this->list = GeneralUtility::makeInstance(DocumentList::class);
466 466
         $currentEntry = $this->piVars['pointer'] * $this->conf['limit'];
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
         }
558 558
         $markerArray['###PAGEBROWSER###'] = $this->getPageBrowser();
559 559
         $markerArray['###SORTING###'] = $this->getSortingForm();
560
-        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, true), $markerArray);
560
+        $content = $this->templateService->substituteMarkerArray($this->templateService->substituteSubpart($this->template, '###ENTRY###', $content, TRUE), $markerArray);
561 561
         return $this->pi_wrapInBaseClass($content);
562 562
     }
563 563
 }
Please login to merge, or discard this patch.
Classes/Hooks/ItemsProcFunc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
                         ->select(...explode(',', $fields))
116 116
                         ->from($table)
117 117
                         ->where(
118
-                            $queryBuilder->expr()->eq($table . '.pid', intval($page['uid'])),
118
+                            $queryBuilder->expr()->eq($table.'.pid', intval($page['uid'])),
119 119
                             $andWhere
120 120
                         )
121 121
                         ->orderBy($sorting)
Please login to merge, or discard this patch.
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  * @subpackage dlf
25 25
  * @access public
26 26
  */
27
-class ItemsProcFunc
28
-{
27
+class ItemsProcFunc {
29 28
     /**
30 29
      * Helper to get flexform's items array for plugin "Collection"
31 30
      *
@@ -35,8 +34,7 @@  discard block
 block discarded – undo
35 34
      *
36 35
      * @return void
37 36
      */
38
-    public function collectionList(&$params)
39
-    {
37
+    public function collectionList(&$params) {
40 38
         $this->generateList(
41 39
             $params,
42 40
             'label,uid',
@@ -54,8 +52,7 @@  discard block
 block discarded – undo
54 52
      *
55 53
      * @return void
56 54
      */
57
-    public function extendedSearchList(&$params)
58
-    {
55
+    public function extendedSearchList(&$params) {
59 56
         $this->generateList(
60 57
             $params,
61 58
             'label,index_name',
@@ -74,8 +71,7 @@  discard block
 block discarded – undo
74 71
      *
75 72
      * @return void
76 73
      */
77
-    public function facetsList(&$params)
78
-    {
74
+    public function facetsList(&$params) {
79 75
         $this->generateList(
80 76
             $params,
81 77
             'label,index_name',
@@ -98,8 +94,7 @@  discard block
 block discarded – undo
98 94
      *
99 95
      * @return void
100 96
      */
101
-    protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '')
102
-    {
97
+    protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') {
103 98
         $pages = $params['row']['pages'];
104 99
         if (!empty($pages)) {
105 100
             if (!is_array($pages)) {
@@ -140,8 +135,7 @@  discard block
 block discarded – undo
140 135
      *
141 136
      * @return void
142 137
      */
143
-    public function libraryList(&$params)
144
-    {
138
+    public function libraryList(&$params) {
145 139
         $this->generateList(
146 140
             $params,
147 141
             'label,uid',
@@ -159,8 +153,7 @@  discard block
 block discarded – undo
159 153
      *
160 154
      * @return void
161 155
      */
162
-    public function solrList(&$params)
163
-    {
156
+    public function solrList(&$params) {
164 157
         $this->generateList(
165 158
             $params,
166 159
             'label,uid',
@@ -178,8 +171,7 @@  discard block
 block discarded – undo
178 171
      *
179 172
      * @return void
180 173
      */
181
-    public function toolList(&$params)
182
-    {
174
+    public function toolList(&$params) {
183 175
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] as $class => $label) {
184 176
             $params['items'][] = [$GLOBALS['LANG']->sL($label), $class];
185 177
         }
Please login to merge, or discard this patch.
Classes/Hooks/KitodoProductionHacks.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 }
58 58
                 $dmdIds = explode(' ', $id);
59 59
                 foreach ($dmdIds as $dmdId) {
60
-                    $recordIds = $xml->xpath('//mets:dmdSec[@ID="' . $dmdId . '"]//mods:mods/mods:recordInfo/mods:recordIdentifier');
60
+                    $recordIds = $xml->xpath('//mets:dmdSec[@ID="'.$dmdId.'"]//mods:mods/mods:recordInfo/mods:recordIdentifier');
61 61
                     if (!empty($recordIds)) {
62 62
                         $record_id = (string) $recordIds[0];
63 63
                         break;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  * @subpackage dlf
21 21
  * @access public
22 22
  */
23
-class KitodoProductionHacks
24
-{
23
+class KitodoProductionHacks {
25 24
     /**
26 25
      * Hook for \Kitodo\Dlf\Common\MetsDocument::establishRecordId()
27 26
      * When using Kitodo.Production the record identifier is saved only in MODS, but not
@@ -34,8 +33,7 @@  discard block
 block discarded – undo
34 33
      *
35 34
      * @return void
36 35
      */
37
-    public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$record_id)
38
-    {
36
+    public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$record_id) {
39 37
         if (!$record_id) {
40 38
             $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3');
41 39
             // Get all logical structure nodes with metadata, but without associated METS-Pointers.
Please login to merge, or discard this patch.
Classes/Module/NewTenant.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     protected function cmdAddMetadata()
46 46
     {
47 47
         // Include metadata definition file.
48
-        $metadataDefaults = include (ExtensionManagementUtility::extPath($this->extKey) . 'Resources/Private/Data/MetadataDefaults.php');
48
+        $metadataDefaults = include (ExtensionManagementUtility::extPath($this->extKey).'Resources/Private/Data/MetadataDefaults.php');
49 49
         $i = 0;
50 50
         // Build data array.
51 51
         foreach ($metadataDefaults as $index_name => $values) {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             }
59 59
             $data['tx_dlf_metadata'][uniqid('NEW')] = [
60 60
                 'pid' => intval($this->id),
61
-                'label' => $GLOBALS['LANG']->getLL('metadata.' . $index_name),
61
+                'label' => $GLOBALS['LANG']->getLL('metadata.'.$index_name),
62 62
                 'index_name' => $index_name,
63 63
                 'format' => implode(',', $formatIds),
64 64
                 'default_value' => $values['default_value'],
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         // Build data array.
106 106
         $data['tx_dlf_solrcores'][uniqid('NEW')] = [
107 107
             'pid' => intval($this->id),
108
-            'label' => $GLOBALS['LANG']->getLL('solrcore') . ' (PID ' . $this->id . ')',
108
+            'label' => $GLOBALS['LANG']->getLL('solrcore').' (PID '.$this->id.')',
109 109
             'index_name' => '',
110 110
         ];
111 111
         $_ids = Helper::processDBasAdmin($data);
@@ -137,13 +137,13 @@  discard block
 block discarded – undo
137 137
     protected function cmdAddStructure()
138 138
     {
139 139
         // Include structure definition file.
140
-        $structureDefaults = include (ExtensionManagementUtility::extPath($this->extKey) . 'Resources/Private/Data/StructureDefaults.php');
140
+        $structureDefaults = include (ExtensionManagementUtility::extPath($this->extKey).'Resources/Private/Data/StructureDefaults.php');
141 141
         // Build data array.
142 142
         foreach ($structureDefaults as $index_name => $values) {
143 143
             $data['tx_dlf_structures'][uniqid('NEW')] = [
144 144
                 'pid' => intval($this->id),
145 145
                 'toplevel' => $values['toplevel'],
146
-                'label' => $GLOBALS['LANG']->getLL('structure.' . $index_name),
146
+                'label' => $GLOBALS['LANG']->getLL('structure.'.$index_name),
147 147
                 'index_name' => $index_name,
148 148
                 'oai_name' => $values['oai_name'],
149 149
                 'thumbnail' => 0,
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             // Should we do something?
208 208
             if (!empty($this->CMD)) {
209 209
                 // Sanitize input...
210
-                $_method = 'cmd' . ucfirst($this->CMD);
210
+                $_method = 'cmd'.ucfirst($this->CMD);
211 211
                 // ...and unset to prevent infinite looping.
212 212
                 unset($this->CMD);
213 213
                 if (method_exists($this, $_method)) {
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
  * @subpackage dlf
28 28
  * @access public
29 29
  */
30
-class NewTenant extends \Kitodo\Dlf\Common\AbstractModule
31
-{
30
+class NewTenant extends \Kitodo\Dlf\Common\AbstractModule {
32 31
     protected $markerArray = [
33 32
         'CSH' => '',
34 33
         'MOD_MENU' => '',
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
      *
43 42
      * @return void
44 43
      */
45
-    protected function cmdAddMetadata()
46
-    {
44
+    protected function cmdAddMetadata() {
47 45
         // Include metadata definition file.
48 46
         $metadataDefaults = include (ExtensionManagementUtility::extPath($this->extKey) . 'Resources/Private/Data/MetadataDefaults.php');
49 47
         $i = 0;
@@ -100,8 +98,7 @@  discard block
 block discarded – undo
100 98
      *
101 99
      * @return void
102 100
      */
103
-    protected function cmdAddSolrCore()
104
-    {
101
+    protected function cmdAddSolrCore() {
105 102
         // Build data array.
106 103
         $data['tx_dlf_solrcores'][uniqid('NEW')] = [
107 104
             'pid' => intval($this->id),
@@ -134,8 +131,7 @@  discard block
 block discarded – undo
134 131
      *
135 132
      * @return void
136 133
      */
137
-    protected function cmdAddStructure()
138
-    {
134
+    protected function cmdAddStructure() {
139 135
         // Include structure definition file.
140 136
         $structureDefaults = include (ExtensionManagementUtility::extPath($this->extKey) . 'Resources/Private/Data/StructureDefaults.php');
141 137
         // Build data array.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -74,20 +74,20 @@  discard block
 block discarded – undo
74 74
             ];
75 75
             $i++;
76 76
         }
77
-        $_ids = Helper::processDBasAdmin($data, [], true);
77
+        $_ids = Helper::processDBasAdmin($data, [], TRUE);
78 78
         // Check for failed inserts.
79 79
         if (count($_ids) == $i) {
80 80
             // Fine.
81 81
             Helper::addMessage(
82 82
                 Helper::getMessage('flash.metadataAddedMsg'),
83
-                Helper::getMessage('flash.metadataAdded', true),
83
+                Helper::getMessage('flash.metadataAdded', TRUE),
84 84
                 \TYPO3\CMS\Core\Messaging\FlashMessage::OK
85 85
             );
86 86
         } else {
87 87
             // Something went wrong.
88 88
             Helper::addMessage(
89 89
                 Helper::getMessage('flash.metadataNotAddedMsg'),
90
-                Helper::getMessage('flash.metadataNotAdded', true),
90
+                Helper::getMessage('flash.metadataNotAdded', TRUE),
91 91
                 \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
92 92
             );
93 93
         }
@@ -114,14 +114,14 @@  discard block
 block discarded – undo
114 114
             // Fine.
115 115
             Helper::addMessage(
116 116
                 Helper::getMessage('flash.solrcoreAddedMsg'),
117
-                Helper::getMessage('flash.solrcoreAdded', true),
117
+                Helper::getMessage('flash.solrcoreAdded', TRUE),
118 118
                 \TYPO3\CMS\Core\Messaging\FlashMessage::OK
119 119
             );
120 120
         } else {
121 121
             // Something went wrong.
122 122
             Helper::addMessage(
123 123
                 Helper::getMessage('flash.solrcoreNotAddedMsg'),
124
-                Helper::getMessage('flash.solrcoreNotAdded', true),
124
+                Helper::getMessage('flash.solrcoreNotAdded', TRUE),
125 125
                 \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
126 126
             );
127 127
         }
@@ -149,20 +149,20 @@  discard block
 block discarded – undo
149 149
                 'thumbnail' => 0,
150 150
             ];
151 151
         }
152
-        $_ids = Helper::processDBasAdmin($data, [], true);
152
+        $_ids = Helper::processDBasAdmin($data, [], TRUE);
153 153
         // Check for failed inserts.
154 154
         if (count($_ids) == count($structureDefaults)) {
155 155
             // Fine.
156 156
             Helper::addMessage(
157 157
                 Helper::getMessage('flash.structureAddedMsg'),
158
-                Helper::getMessage('flash.structureAdded', true),
158
+                Helper::getMessage('flash.structureAdded', TRUE),
159 159
                 \TYPO3\CMS\Core\Messaging\FlashMessage::OK
160 160
             );
161 161
         } else {
162 162
             // Something went wrong.
163 163
             Helper::addMessage(
164 164
                 Helper::getMessage('flash.structureNotAddedMsg'),
165
-                Helper::getMessage('flash.structureNotAdded', true),
165
+                Helper::getMessage('flash.structureNotAdded', TRUE),
166 166
                 \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
167 167
             );
168 168
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             if ($this->pageInfo['doktype'] != 254) {
198 198
                 Helper::addMessage(
199 199
                     Helper::getMessage('flash.wrongPageTypeMsg'),
200
-                    Helper::getMessage('flash.wrongPageType', true),
200
+                    Helper::getMessage('flash.wrongPageType', TRUE),
201 201
                     \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
202 202
                 );
203 203
                 $this->markerArray['CONTENT'] .= Helper::renderFlashMessages();
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
                 // Fine.
233 233
                 Helper::addMessage(
234 234
                     Helper::getMessage('flash.structureOkayMsg'),
235
-                    Helper::getMessage('flash.structureOkay', true),
235
+                    Helper::getMessage('flash.structureOkay', TRUE),
236 236
                     \TYPO3\CMS\Core\Messaging\FlashMessage::OK
237 237
                 );
238 238
             } else {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 $url = GeneralUtility::locationHeaderUrl(GeneralUtility::linkThisScript(['id' => $this->id, 'CMD' => 'addStructure']));
241 241
                 Helper::addMessage(
242 242
                     sprintf(Helper::getMessage('flash.structureNotOkayMsg'), $url),
243
-                    Helper::getMessage('flash.structureNotOkay', true),
243
+                    Helper::getMessage('flash.structureNotOkay', TRUE),
244 244
                     \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
245 245
                 );
246 246
             }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                 // Fine.
263 263
                 Helper::addMessage(
264 264
                     Helper::getMessage('flash.metadataOkayMsg'),
265
-                    Helper::getMessage('flash.metadataOkay', true),
265
+                    Helper::getMessage('flash.metadataOkay', TRUE),
266 266
                     \TYPO3\CMS\Core\Messaging\FlashMessage::OK
267 267
                 );
268 268
             } else {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 $url = GeneralUtility::locationHeaderUrl(GeneralUtility::linkThisScript(['id' => $this->id, 'CMD' => 'addMetadata']));
271 271
                 Helper::addMessage(
272 272
                     sprintf(Helper::getMessage('flash.metadataNotOkayMsg'), $url),
273
-                    Helper::getMessage('flash.metadataNotOkay', true),
273
+                    Helper::getMessage('flash.metadataNotOkay', TRUE),
274 274
                     \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
275 275
                 );
276 276
             }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                     // Fine.
301 301
                     Helper::addMessage(
302 302
                         Helper::getMessage('flash.solrcoreOkayMsg'),
303
-                        Helper::getMessage('flash.solrcoreOkay', true),
303
+                        Helper::getMessage('flash.solrcoreOkay', TRUE),
304 304
                         \TYPO3\CMS\Core\Messaging\FlashMessage::OK
305 305
                     );
306 306
                 } else {
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
                     $url = GeneralUtility::locationHeaderUrl(GeneralUtility::linkThisScript(['id' => $this->id, 'CMD' => 'addSolrcore']));
309 309
                     Helper::addMessage(
310 310
                         sprintf(Helper::getMessage('flash.solrcoreDeprecatedMsg'), $url),
311
-                        Helper::getMessage('flash.solrcoreDeprecatedOkay', true),
311
+                        Helper::getMessage('flash.solrcoreDeprecatedOkay', TRUE),
312 312
                         \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE
313 313
                     );
314 314
                 }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                 $url = GeneralUtility::locationHeaderUrl(GeneralUtility::linkThisScript(['id' => $this->id, 'CMD' => 'addSolrcore']));
318 318
                 Helper::addMessage(
319 319
                     sprintf(Helper::getMessage('flash.solrcoreMissingMsg'), $url),
320
-                    Helper::getMessage('flash.solrcoreMissing', true),
320
+                    Helper::getMessage('flash.solrcoreMissing', TRUE),
321 321
                     \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
322 322
                 );
323 323
             }
Please login to merge, or discard this patch.
Classes/Format/TeiHeader.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  * @subpackage dlf
21 21
  * @access public
22 22
  */
23
-class TeiHeader implements \Kitodo\Dlf\Common\MetadataInterface
24
-{
23
+class TeiHeader implements \Kitodo\Dlf\Common\MetadataInterface {
25 24
     /**
26 25
      * This extracts the essential TEIHDR metadata from XML
27 26
      *
@@ -32,8 +31,7 @@  discard block
 block discarded – undo
32 31
      *
33 32
      * @return void
34 33
      */
35
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata)
36
-    {
34
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
37 35
         $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0');
38 36
     }
39 37
 }
Please login to merge, or discard this patch.
Classes/Format/Mods.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
                 }
83 83
                 // Append "valueURI" to name using Unicode unit separator.
84 84
                 if (isset($authors[$i]['valueURI'])) {
85
-                    $metadata['author'][$i] .= chr(31) . (string) $authors[$i]['valueURI'];
85
+                    $metadata['author'][$i] .= chr(31).(string) $authors[$i]['valueURI'];
86 86
                 }
87 87
             }
88 88
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  * @subpackage dlf
21 21
  * @access public
22 22
  */
23
-class Mods implements \Kitodo\Dlf\Common\MetadataInterface
24
-{
23
+class Mods implements \Kitodo\Dlf\Common\MetadataInterface {
25 24
     /**
26 25
      * This extracts the essential MODS metadata from XML
27 26
      *
@@ -32,8 +31,7 @@  discard block
 block discarded – undo
32 31
      *
33 32
      * @return void
34 33
      */
35
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata)
36
-    {
34
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
37 35
         $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3');
38 36
         // Get "author" and "author_sorting".
39 37
         $authors = $xml->xpath('./mods:name[./mods:role/mods:roleTerm[@type="code" and @authority="marcrelator"]="aut"]');
Please login to merge, or discard this patch.