Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (585b6c)
by Sebastian
06:27
created
Classes/Hooks/ExtensionManagementUtility.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,15 +40,15 @@
 block discarded – undo
40 40
      */
41 41
     public static function addPItoST43($key, $class, $suffix = '', $type = 'list_type', $cached = FALSE)
42 42
     {
43
-        $internalName = 'tx_' . $key . '_' . strtolower(Helper::getUnqualifiedClassName($class));
43
+        $internalName = 'tx_'.$key.'_'.strtolower(Helper::getUnqualifiedClassName($class));
44 44
         // General plugin
45
-        $typoscript = 'plugin.' . $internalName . ' = USER' . ($cached ? '' : '_INT') . "\n";
46
-        $typoscript .= 'plugin.' . $internalName . '.userFunc = ' . $class . '->main' . "\n";
45
+        $typoscript = 'plugin.'.$internalName.' = USER'.($cached ? '' : '_INT')."\n";
46
+        $typoscript .= 'plugin.'.$internalName.'.userFunc = '.$class.'->main'."\n";
47 47
         parent::addTypoScript($key, 'setup', $typoscript);
48 48
         // Add after defaultContentRendering
49 49
         switch ($type) {
50 50
             case 'list_type':
51
-                $addLine = 'tt_content.list.20.' . $key . $suffix . ' = < plugin.' . $internalName;
51
+                $addLine = 'tt_content.list.20.'.$key.$suffix.' = < plugin.'.$internalName;
52 52
                 break;
53 53
             default:
54 54
                 $addLine = '';
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
  * @subpackage dlf
23 23
  * @access public
24 24
  */
25
-class ExtensionManagementUtility extends \TYPO3\CMS\Core\Utility\ExtensionManagementUtility
26
-{
25
+class ExtensionManagementUtility extends \TYPO3\CMS\Core\Utility\ExtensionManagementUtility {
27 26
     /**
28 27
      * Add plugin to static template for css_styled_content
29 28
      * @see \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43()
@@ -38,8 +37,7 @@  discard block
 block discarded – undo
38 37
      *
39 38
      * @return void
40 39
      */
41
-    public static function addPItoST43($key, $class, $suffix = '', $type = 'list_type', $cached = FALSE)
42
-    {
40
+    public static function addPItoST43($key, $class, $suffix = '', $type = 'list_type', $cached = FALSE) {
43 41
         $internalName = 'tx_' . $key . '_' . strtolower(Helper::getUnqualifiedClassName($class));
44 42
         // General plugin
45 43
         $typoscript = 'plugin.' . $internalName . ' = USER' . ($cached ? '' : '_INT') . "\n";
Please login to merge, or discard this patch.
Classes/Hooks/ConfigurationForm.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@
 block discarded – undo
54 54
             !empty($solrInfo['username'])
55 55
             && !empty($solrInfo['password'])
56 56
         ) {
57
-            $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host'];
57
+            $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host'];
58 58
         } else {
59 59
             $host = $solrInfo['host'];
60 60
         }
61 61
         // Build request URI.
62
-        $url = $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/admin/cores?wt=xml';
62
+        $url = $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/admin/cores?wt=xml';
63 63
         $context = stream_context_create([
64 64
             'http' => [
65 65
                 'method' => 'GET',
Please login to merge, or discard this patch.
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 ConfigurationForm
30
-{
29
+class ConfigurationForm {
31 30
     /**
32 31
      * This holds the current configuration
33 32
      *
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      *
47 46
      * @return string Message informing the user of success or failure
48 47
      */
49
-    public function checkSolrConnection(&$params, &$pObj)
50
-    {
48
+    public function checkSolrConnection(&$params, &$pObj) {
51 49
         $solrInfo = Solr::getSolrConnectionInfo();
52 50
         // Prepend username and password to hostname.
53 51
         if (
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
      *
99 97
      * @return string Message informing the user of success or failure
100 98
      */
101
-    public function checkMetadataFormats(&$params, &$pObj)
102
-    {
99
+    public function checkMetadataFormats(&$params, &$pObj) {
103 100
         $nsDefined = [
104 101
             'MODS' => FALSE,
105 102
             'TEIHDR' => FALSE,
@@ -221,8 +218,7 @@  discard block
 block discarded – undo
221 218
      *
222 219
      * @return void
223 220
      */
224
-    public function __construct()
225
-    {
221
+    public function __construct() {
226 222
         // Load localization file.
227 223
         $GLOBALS['LANG']->includeLLFile('EXT:dlf/Resources/Private/Language/FlashMessages.xml');
228 224
         // Get current configuration.
Please login to merge, or discard this patch.
Classes/Hooks/DataHandler.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                         $solrInfo['username']
113 113
                         && $solrInfo['password']
114 114
                     ) {
115
-                        $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host'];
115
+                        $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host'];
116 116
                     } else {
117 117
                         $host = $solrInfo['host'];
118 118
                     }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                     ]);
125 125
                     // Build request for adding new Solr core.
126 126
                     // @see http://wiki.apache.org/solr/CoreAdmin
127
-                    $url = $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/admin/cores?wt=xml&action=CREATE&name=dlfCore' . $coreNumber . '&instanceDir=dlfCore' . $coreNumber . '&dataDir=data&configSet=dlf';
127
+                    $url = $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/admin/cores?wt=xml&action=CREATE&name=dlfCore'.$coreNumber.'&instanceDir=dlfCore'.$coreNumber.'&dataDir=data&configSet=dlf';
128 128
                     $response = @simplexml_load_string(file_get_contents($url, FALSE, $context));
129 129
                     // Process response.
130 130
                     if ($response) {
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
                             $status
134 134
                             && $status[0] == 0
135 135
                         ) {
136
-                            $fieldArray['index_name'] = 'dlfCore' . $coreNumber;
136
+                            $fieldArray['index_name'] = 'dlfCore'.$coreNumber;
137 137
                             return;
138 138
                         }
139 139
                     }
140
-                    Helper::devLog('Could not create new Apache Solr core "dlfCore' . $coreNumber . '"', DEVLOG_SEVERITY_ERROR);
140
+                    Helper::devLog('Could not create new Apache Solr core "dlfCore'.$coreNumber.'"', DEVLOG_SEVERITY_ERROR);
141 141
                     // Solr core could not be created, thus unset field array.
142 142
                     $fieldArray = [];
143 143
                     break;
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
                     ) {
162 162
                         // Get current configuration.
163 163
                         $result = $queryBuilder
164
-                            ->select($table . '.is_listed AS is_listed')
164
+                            ->select($table.'.is_listed AS is_listed')
165 165
                             ->from($table)
166 166
                             ->where(
167
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
167
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
168 168
                                 Helper::whereExpression($table)
169 169
                             )
170 170
                             ->setMaxResults(1)
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
                     ) {
187 187
                         // Get current configuration.
188 188
                         $result = $queryBuilder
189
-                            ->select($table . '.index_autocomplete AS index_autocomplete')
189
+                            ->select($table.'.index_autocomplete AS index_autocomplete')
190 190
                             ->from($table)
191 191
                             ->where(
192
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
192
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
193 193
                                 Helper::whereExpression($table)
194 194
                             )
195 195
                             ->setMaxResults(1)
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
                         } else {
211 211
                             // Get current index name.
212 212
                             $result = $queryBuilder
213
-                                ->select($table . '.index_autocomplete AS index_autocomplete')
213
+                                ->select($table.'.index_autocomplete AS index_autocomplete')
214 214
                                 ->from($table)
215 215
                                 ->where(
216
-                                    $queryBuilder->expr()->eq($table . '.uid', intval($id)),
216
+                                    $queryBuilder->expr()->eq($table.'.uid', intval($id)),
217 217
                                     Helper::whereExpression($table)
218 218
                                 )
219 219
                                 ->setMaxResults(1)
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                                 $fieldArray['index_indexed'] = $resArray['index_autocomplete'];
225 225
                             }
226 226
                         }
227
-                        Helper::devLog('Prevented change of index_name for UID ' . $id . ' in table "' . $table . '"', DEVLOG_SEVERITY_NOTICE);
227
+                        Helper::devLog('Prevented change of index_name for UID '.$id.' in table "'.$table.'"', DEVLOG_SEVERITY_NOTICE);
228 228
                     }
229 229
                     break;
230 230
             }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                             'tx_dlf_solrcores.uid,tx_dlf_documents.hidden',
261 261
                             'tx_dlf_solrcores,tx_dlf_documents',
262 262
                             'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore'
263
-                                . ' AND tx_dlf_documents.uid=' . intval($id)
263
+                                . ' AND tx_dlf_documents.uid='.intval($id)
264 264
                                 . Helper::whereClause('tx_dlf_solrcores'),
265 265
                             '',
266 266
                             '',
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                                 if ($solr = Solr::getInstance($core)) {
274 274
                                     // Delete Solr document.
275 275
                                     $updateQuery = $solr->service->createUpdate();
276
-                                    $updateQuery->addDeleteQuery('uid:' . $id);
276
+                                    $updateQuery->addDeleteQuery('uid:'.$id);
277 277
                                     $updateQuery->addCommit();
278 278
                                     $solr->service->update($updateQuery);
279 279
                                 }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                                 if ($doc->ready) {
284 284
                                     Indexer::add($doc, $core);
285 285
                                 } else {
286
-                                    Helper::devLog('Failed to re-index document with UID ' . $id, DEVLOG_SEVERITY_ERROR);
286
+                                    Helper::devLog('Failed to re-index document with UID '.$id, DEVLOG_SEVERITY_ERROR);
287 287
                                 }
288 288
                             }
289 289
                         }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                 'tx_dlf_solrcores.uid',
318 318
                 'tx_dlf_solrcores,tx_dlf_documents',
319 319
                 'tx_dlf_solrcores.uid=tx_dlf_documents.solrcore'
320
-                    . ' AND tx_dlf_documents.uid=' . intval($id)
320
+                    . ' AND tx_dlf_documents.uid='.intval($id)
321 321
                     . Helper::whereClause('tx_dlf_solrcores'),
322 322
                 '',
323 323
                 '',
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
                         if ($solr = Solr::getInstance($core)) {
333 333
                             // Delete Solr document.
334 334
                             $updateQuery = $solr->service->createUpdate();
335
-                            $updateQuery->addDeleteQuery('uid:' . $id);
335
+                            $updateQuery->addDeleteQuery('uid:'.$id);
336 336
                             $updateQuery->addCommit();
337 337
                             $solr->service->update($updateQuery);
338 338
                             if ($command == 'delete') {
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
                         if ($doc->ready) {
346 346
                             Indexer::add($doc, $core);
347 347
                         } else {
348
-                            Helper::devLog('Failed to re-index document with UID ' . $id, DEVLOG_SEVERITY_ERROR);
348
+                            Helper::devLog('Failed to re-index document with UID '.$id, DEVLOG_SEVERITY_ERROR);
349 349
                         }
350 350
                         break;
351 351
                 }
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class DataHandler
32
-{
31
+class DataHandler {
33 32
     /**
34 33
      * Field post-processing hook for the process_datamap() method.
35 34
      *
@@ -43,8 +42,7 @@  discard block
 block discarded – undo
43 42
      *
44 43
      * @return void
45 44
      */
46
-    public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray, $pObj)
47
-    {
45
+    public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray, $pObj) {
48 46
         if ($status == 'new') {
49 47
             switch ($table) {
50 48
                     // Field post-processing for table "tx_dlf_documents".
@@ -244,8 +242,7 @@  discard block
 block discarded – undo
244 242
      *
245 243
      * @return void
246 244
      */
247
-    public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, $pObj)
248
-    {
245
+    public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, $pObj) {
249 246
         if ($status == 'update') {
250 247
             switch ($table) {
251 248
                     // After database operations for table "tx_dlf_documents".
@@ -306,8 +303,7 @@  discard block
 block discarded – undo
306 303
      *
307 304
      * @return void
308 305
      */
309
-    public function processCmdmap_postProcess($command, $table, $id, $value, $pObj)
310
-    {
306
+    public function processCmdmap_postProcess($command, $table, $id, $value, $pObj) {
311 307
         if (
312 308
             in_array($command, ['move', 'delete', 'undelete'])
313 309
             && $table == 'tx_dlf_documents'
Please login to merge, or discard this patch.
Classes/Plugin/OaiPmh.php 2 patches
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         // Delete expired resumption tokens.
84 84
         $GLOBALS['TYPO3_DB']->exec_DELETEquery(
85 85
             'tx_dlf_tokens',
86
-            'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<' . intval($GLOBALS['EXEC_TIME'] - $this->conf['expired'])
86
+            'tx_dlf_tokens.ident="oai" AND tx_dlf_tokens.tstamp<'.intval($GLOBALS['EXEC_TIME'] - $this->conf['expired'])
87 87
         );
88 88
         if ($GLOBALS['TYPO3_DB']->sql_affected_rows() === -1) {
89 89
             // Deletion failed.
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
         $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc');
152 152
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
153 153
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
154
-        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'] . ' ' . $this->formats['oai_dc']['schema']);
154
+        $oai_dc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['oai_dc']['namespace'].' '.$this->formats['oai_dc']['schema']);
155 155
         $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['record_id'], ENT_NOQUOTES, 'UTF-8')));
156 156
         if (!empty($metadata['purl'])) {
157 157
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['purl'], ENT_NOQUOTES, 'UTF-8')));
158 158
         }
159 159
         if (!empty($metadata['prod_id'])) {
160
-            $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:' . htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8')));
160
+            $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', 'kitodo:production:'.htmlspecialchars($metadata['prod_id'], ENT_NOQUOTES, 'UTF-8')));
161 161
         }
162 162
         if (!empty($metadata['urn'])) {
163 163
             $oai_dc->appendChild($this->oai->createElementNS('http://purl.org/dc/elements/1.1/', 'dc:identifier', htmlspecialchars($metadata['urn'], ENT_NOQUOTES, 'UTF-8')));
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         }
256 256
         // Add attributes and build XML tree.
257 257
         $epicur->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
258
-        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'] . ' ' . $this->formats['epicur']['schema']);
258
+        $epicur->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', $this->formats['epicur']['namespace'].' '.$this->formats['epicur']['schema']);
259 259
         // Do we update an URN or register a new one?
260 260
         if ($metadata['tstamp'] == $metadata['crdate']) {
261 261
             $update->setAttribute('type', 'urn_new');
@@ -302,10 +302,10 @@  discard block
 block discarded – undo
302 302
                 // Import node into \DOMDocument.
303 303
                 $mets = $this->oai->importNode($root->item(0), TRUE);
304 304
             } else {
305
-                Helper::devLog('No METS part found in document with location "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR);
305
+                Helper::devLog('No METS part found in document with location "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR);
306 306
             }
307 307
         } else {
308
-            Helper::devLog('Could not load XML file from "' . $metadata['location'] . '"', DEVLOG_SEVERITY_ERROR);
308
+            Helper::devLog('Could not load XML file from "'.$metadata['location'].'"', DEVLOG_SEVERITY_ERROR);
309 309
         }
310 310
         if ($mets === NULL) {
311 311
             $mets = $this->oai->createElementNS('http://kitodo.org/', 'kitodo:error', htmlspecialchars($this->pi_getLL('error', 'Error!', FALSE), ENT_NOQUOTES, 'UTF-8'));
@@ -341,15 +341,15 @@  discard block
 block discarded – undo
341 341
             if (substr($this->conf['stylesheet'], 0, 4) == 'EXT:') {
342 342
                 list($extKey, $filePath) = explode('/', substr($this->conf['stylesheet'], 4), 2);
343 343
                 if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) {
344
-                    $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) . $filePath;
344
+                    $this->conf['stylesheet'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey).$filePath;
345 345
                 }
346 346
             }
347 347
             $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($this->conf['stylesheet']);
348 348
         } else {
349 349
             // Use default stylesheet if no custom stylesheet is given.
350
-            $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Stylesheets/OaiPmh.xsl');
350
+            $stylesheet = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Stylesheets/OaiPmh.xsl');
351 351
         }
352
-        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8') . '"'));
352
+        $this->oai->appendChild($this->oai->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="'.htmlspecialchars($stylesheet, ENT_NOQUOTES, 'UTF-8').'"'));
353 353
         // Create root element.
354 354
         $root = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'OAI-PMH');
355 355
         $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
@@ -399,10 +399,10 @@  discard block
 block discarded – undo
399 399
         // Send headers.
400 400
         header('HTTP/1.1 200 OK');
401 401
         header('Cache-Control: no-cache');
402
-        header('Content-Length: ' . strlen($content));
402
+        header('Content-Length: '.strlen($content));
403 403
         header('Content-Type: text/xml; charset=utf-8');
404
-        header('Date: ' . date('r', $GLOBALS['EXEC_TIME']));
405
-        header('Expires: ' . date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
404
+        header('Date: '.date('r', $GLOBALS['EXEC_TIME']));
405
+        header('Expires: '.date('r', $GLOBALS['EXEC_TIME'] + $this->conf['expired']));
406 406
         echo $content;
407 407
         exit;
408 408
     }
@@ -467,10 +467,10 @@  discard block
 block discarded – undo
467 467
             'tx_dlf_documents',
468 468
             'tx_dlf_relations',
469 469
             'tx_dlf_collections',
470
-            'AND tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents')
471
-                . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
472
-                . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
473
-                . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
470
+            'AND tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['identifier'], 'tx_dlf_documents')
471
+                . ' AND tx_dlf_documents.pid='.intval($this->conf['pages'])
472
+                . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
473
+                . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
474 474
                 . $where
475 475
                 . Helper::whereClause('tx_dlf_collections'),
476 476
             '',
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
             $timestamp = $resArray['tstamp'];
591 591
             $earliestDatestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp);
592 592
         } else {
593
-            Helper::devLog('No records found with PID ' . $this->conf['pages'], DEVLOG_SEVERITY_NOTICE);
593
+            Helper::devLog('No records found with PID '.$this->conf['pages'], DEVLOG_SEVERITY_NOTICE);
594 594
         }
595 595
         $linkConf = [
596 596
             'parameter' => $GLOBALS['TSFE']->id,
@@ -853,9 +853,9 @@  discard block
 block discarded – undo
853 853
             }
854 854
             $resArray = $allResults[0];
855 855
             if ($resArray['index_query'] != "") {
856
-                $solr_query .= '(' . $resArray['index_query'] . ')';
856
+                $solr_query .= '('.$resArray['index_query'].')';
857 857
             } else {
858
-                $solr_query .= 'collection:' . '"' . $resArray['index_name'] . '"';
858
+                $solr_query .= 'collection:'.'"'.$resArray['index_name'].'"';
859 859
             }
860 860
         } else {
861 861
             // If no set is specified we have to query for all collections
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
         }
864 864
         // Check for required fields.
865 865
         foreach ($this->formats[$this->piVars['metadataPrefix']]['requiredFields'] as $required) {
866
-            $solr_query .= ' NOT ' . $required . ':""';
866
+            $solr_query .= ' NOT '.$required.':""';
867 867
         }
868 868
         // toplevel="true" is always required
869 869
         $solr_query .= ' AND toplevel:true';
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
                 || is_array($date_array = strptime($this->piVars['from'], '%Y-%m-%d'))
877 877
             ) {
878 878
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
879
-                $from = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.000Z';
879
+                $from = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.000Z';
880 880
             } else {
881 881
                 throw new \Exception('badArgument');
882 882
             }
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
                 || is_array($date_array = strptime($this->piVars['until'], '%Y-%m-%d'))
891 891
             ) {
892 892
                 $timestamp = gmmktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon'] + 1, $date_array['tm_mday'], $date_array['tm_year'] + 1900);
893
-                $until = date("Y-m-d", $timestamp) . 'T' . date("H:i:s", $timestamp) . '.999Z';
893
+                $until = date("Y-m-d", $timestamp).'T'.date("H:i:s", $timestamp).'.999Z';
894 894
                 if ($from != "*" && $from > $until) {
895 895
                     throw new \Exception('badArgument');
896 896
                 }
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
                 throw new \Exception('badArgument');
908 908
             }
909 909
         }
910
-        $solr_query .= ' AND timestamp:[' . $from . ' TO ' . $until . ']';
910
+        $solr_query .= ' AND timestamp:['.$from.' TO '.$until.']';
911 911
         $documentSet = [];
912 912
         $solr = Solr::getInstance($this->conf['solrcore']);
913 913
         if (intval($this->conf['solr_limit']) > 0) {
@@ -947,10 +947,10 @@  discard block
 block discarded – undo
947 947
             'tx_dlf_documents',
948 948
             'tx_dlf_relations',
949 949
             'tx_dlf_collections',
950
-            'AND tx_dlf_documents.uid IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)) . ')'
951
-                . ' AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
952
-                . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
953
-                . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
950
+            'AND tx_dlf_documents.uid IN ('.implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($documentsToProcess)).')'
951
+                . ' AND tx_dlf_documents.pid='.intval($this->conf['pages'])
952
+                . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
953
+                . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
954 954
                 . Helper::whereClause('tx_dlf_collections'),
955 955
             'tx_dlf_documents.uid',
956 956
             'tx_dlf_documents.tstamp',
Please login to merge, or discard this patch.
Braces   +18 added lines, -36 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 OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin
31
-{
30
+class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin {
32 31
     public $scriptRelPath = 'Classes/Plugin/OaiPmh.php';
33 32
 
34 33
     /**
@@ -78,8 +77,7 @@  discard block
 block discarded – undo
78 77
      *
79 78
      * @return void
80 79
      */
81
-    protected function deleteExpiredTokens()
82
-    {
80
+    protected function deleteExpiredTokens() {
83 81
         // Delete expired resumption tokens.
84 82
         $GLOBALS['TYPO3_DB']->exec_DELETEquery(
85 83
             'tx_dlf_tokens',
@@ -100,8 +98,7 @@  discard block
 block discarded – undo
100 98
      *
101 99
      * @return \DOMElement XML node to add to the OAI response
102 100
      */
103
-    protected function error($type)
104
-    {
101
+    protected function error($type) {
105 102
         $this->error = TRUE;
106 103
         $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type, FALSE), ENT_NOQUOTES, 'UTF-8'));
107 104
         $error->setAttribute('code', $type);
@@ -115,8 +112,7 @@  discard block
 block discarded – undo
115 112
      *
116 113
      * @return void
117 114
      */
118
-    protected function getUrlParams()
119
-    {
115
+    protected function getUrlParams() {
120 116
         $allowedParams = [
121 117
             'verb',
122 118
             'identifier',
@@ -146,8 +142,7 @@  discard block
 block discarded – undo
146 142
      *
147 143
      * @return \DOMElement XML node to add to the OAI response
148 144
      */
149
-    protected function getDcData(array $metadata)
150
-    {
145
+    protected function getDcData(array $metadata) {
151 146
         $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc');
152 147
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
153 148
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
@@ -226,8 +221,7 @@  discard block
 block discarded – undo
226 221
      *
227 222
      * @return \DOMElement XML node to add to the OAI response
228 223
      */
229
-    protected function getEpicurData(array $metadata)
230
-    {
224
+    protected function getEpicurData(array $metadata) {
231 225
         // Define all XML elements with or without qualified namespace.
232 226
         if (empty($this->conf['unqualified_epicur'])) {
233 227
             $epicur = $this->oai->createElementNS($this->formats['epicur']['namespace'], 'epicur:epicur');
@@ -290,8 +284,7 @@  discard block
 block discarded – undo
290 284
      *
291 285
      * @return \DOMElement XML node to add to the OAI response
292 286
      */
293
-    protected function getMetsData(array $metadata)
294
-    {
287
+    protected function getMetsData(array $metadata) {
295 288
         $mets = NULL;
296 289
         // Load METS file.
297 290
         $xml = new \DOMDocument();
@@ -323,8 +316,7 @@  discard block
 block discarded – undo
323 316
      *
324 317
      * @return void
325 318
      */
326
-    public function main($content, $conf)
327
-    {
319
+    public function main($content, $conf) {
328 320
         // Initialize plugin.
329 321
         $this->init($conf);
330 322
         // Turn cache off.
@@ -414,8 +406,7 @@  discard block
 block discarded – undo
414 406
      *
415 407
      * @return string Substitution for subpart "###RESPONSE###"
416 408
      */
417
-    protected function resume()
418
-    {
409
+    protected function resume() {
419 410
         /** @var QueryBuilder $queryBuilder */
420 411
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
421 412
             ->getQueryBuilderForTable('tx_dlf_tokens');
@@ -450,8 +441,7 @@  discard block
 block discarded – undo
450 441
      *
451 442
      * @return string Substitution for subpart "###RESPONSE###"
452 443
      */
453
-    protected function verbGetRecord()
454
-    {
444
+    protected function verbGetRecord() {
455 445
         if (count($this->piVars) != 3 || empty($this->piVars['metadataPrefix']) || empty($this->piVars['identifier'])) {
456 446
             return $this->error('badArgument');
457 447
         }
@@ -530,8 +520,7 @@  discard block
 block discarded – undo
530 520
      *
531 521
      * @return \DOMElement XML node to add to the OAI response
532 522
      */
533
-    protected function verbIdentify()
534
-    {
523
+    protected function verbIdentify() {
535 524
         // Check for invalid arguments.
536 525
         if (count($this->piVars) > 1) {
537 526
             return $this->error('badArgument');
@@ -616,8 +605,7 @@  discard block
 block discarded – undo
616 605
      *
617 606
      * @return string Substitution for subpart "###RESPONSE###"
618 607
      */
619
-    protected function verbListIdentifiers()
620
-    {
608
+    protected function verbListIdentifiers() {
621 609
         // If we have a resumption token we can continue our work
622 610
         if (!empty($this->piVars['resumptionToken'])) {
623 611
             // "resumptionToken" is an exclusive argument.
@@ -656,8 +644,7 @@  discard block
 block discarded – undo
656 644
      *
657 645
      * @return \DOMElement XML node to add to the OAI response
658 646
      */
659
-    protected function verbListMetadataFormats()
660
-    {
647
+    protected function verbListMetadataFormats() {
661 648
         $resArray = [];
662 649
         // Check for invalid arguments.
663 650
         if (count($this->piVars) > 1) {
@@ -716,8 +703,7 @@  discard block
 block discarded – undo
716 703
      *
717 704
      * @return string Substitution for subpart "###RESPONSE###"
718 705
      */
719
-    protected function verbListRecords()
720
-    {
706
+    protected function verbListRecords() {
721 707
         // Check for invalid arguments.
722 708
         if (!empty($this->piVars['resumptionToken'])) {
723 709
             // "resumptionToken" is an exclusive argument.
@@ -757,8 +743,7 @@  discard block
 block discarded – undo
757 743
      *
758 744
      * @return string Substitution for subpart "###RESPONSE###"
759 745
      */
760
-    protected function verbListSets()
761
-    {
746
+    protected function verbListSets() {
762 747
         /** @var QueryBuilder $queryBuilder */
763 748
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
764 749
             ->getQueryBuilderForTable('tx_dlf_collections');
@@ -815,8 +800,7 @@  discard block
 block discarded – undo
815 800
      * @return array Array of matching records
816 801
      * @throws \Exception
817 802
      */
818
-    protected function fetchDocumentUIDs()
819
-    {
803
+    protected function fetchDocumentUIDs() {
820 804
         /** @var QueryBuilder $queryBuilder */
821 805
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
822 806
             ->getQueryBuilderForTable('tx_dlf_collections');
@@ -938,8 +922,7 @@  discard block
 block discarded – undo
938 922
      *
939 923
      * @return \DOMElement XML of enriched records
940 924
      */
941
-    protected function generateOutputForDocumentList(DocumentList $documentListSet)
942
-    {
925
+    protected function generateOutputForDocumentList(DocumentList $documentListSet) {
943 926
         $documentsToProcess = $documentListSet->removeRange(0, intval($this->conf['limit']));
944 927
         $verb = $this->piVars['verb'];
945 928
         $documents = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
@@ -1025,8 +1008,7 @@  discard block
 block discarded – undo
1025 1008
      *
1026 1009
      * @return \DOMElement XML for resumption token
1027 1010
      */
1028
-    protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet)
1029
-    {
1011
+    protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet) {
1030 1012
         if ($documentListSet->count() != 0) {
1031 1013
             $token = uniqid();
1032 1014
             $GLOBALS['TYPO3_DB']->exec_INSERTquery(
Please login to merge, or discard this patch.
Classes/Plugin/PageGrid.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
         } elseif (!empty($this->conf['placeholder'])) {
56 56
             $thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']);
57 57
         } else {
58
-            $thumbnailFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey) . 'Resources/Public/Images/PageGridPlaceholder.jpg';
58
+            $thumbnailFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($this->extKey).'Resources/Public/Images/PageGridPlaceholder.jpg';
59 59
         }
60
-        $thumbnail = '<img alt="' . $markerArray['###PAGINATION###'] . '" src="' . $thumbnailFile . '" />';
60
+        $thumbnail = '<img alt="'.$markerArray['###PAGINATION###'].'" src="'.$thumbnailFile.'" />';
61 61
         // Get new plugin variables for typolink.
62 62
         $piVars = $this->piVars;
63 63
         // Unset no longer needed plugin variables.
@@ -93,22 +93,22 @@  discard block
 block discarded – undo
93 93
         $separator = $this->pi_getLL('separator', ' - ', TRUE);
94 94
         // Add link to previous page.
95 95
         if ($this->piVars['pointer'] > 0) {
96
-            $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '&lt;', TRUE), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], TRUE) . $separator;
96
+            $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '&lt;', TRUE), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], TRUE).$separator;
97 97
         } else {
98
-            $output = '<span class="prev-page not-active">' . $this->pi_getLL('prevPage', '&lt;', TRUE) . '</span>' . $separator;
98
+            $output = '<span class="prev-page not-active">'.$this->pi_getLL('prevPage', '&lt;', TRUE).'</span>'.$separator;
99 99
         }
100 100
         $i = 0;
101 101
         // Add links to pages.
102 102
         while ($i < $maxPages) {
103 103
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
104 104
                 if ($this->piVars['pointer'] != $i) {
105
-                    $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], TRUE) . $separator;
105
+                    $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], TRUE).$separator;
106 106
                 } else {
107
-                    $output .= '<span class="active">' . sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1) . '</span>' . $separator;
107
+                    $output .= '<span class="active">'.sprintf($this->pi_getLL('page', '%d', TRUE), $i + 1).'</span>'.$separator;
108 108
                 }
109 109
                 $skip = TRUE;
110 110
             } elseif ($skip == TRUE) {
111
-                $output .= '<span class="skipped">' . $this->pi_getLL('skip', '...', TRUE) . '</span>' . $separator;
111
+                $output .= '<span class="skipped">'.$this->pi_getLL('skip', '...', TRUE).'</span>'.$separator;
112 112
                 $skip = FALSE;
113 113
             }
114 114
             $i++;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         if ($this->piVars['pointer'] < $maxPages - 1) {
118 118
             $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '&gt;', TRUE), ['pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1], TRUE);
119 119
         } else {
120
-            $output .= '<span class="next-page not-active">' . $this->pi_getLL('nextPage', '&gt;', TRUE) . '</span>';
120
+            $output .= '<span class="next-page not-active">'.$this->pi_getLL('nextPage', '&gt;', TRUE).'</span>';
121 121
         }
122 122
         return $output;
123 123
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin
27
-{
26
+class PageGrid extends \Kitodo\Dlf\Common\AbstractPlugin {
28 27
     public $scriptRelPath = 'Classes/Plugin/PageGrid.php';
29 28
 
30 29
     /**
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
      *
38 37
      * @return string The rendered entry ready for output
39 38
      */
40
-    protected function getEntry($number, $template)
41
-    {
39
+    protected function getEntry($number, $template) {
42 40
         // Set current page if applicable.
43 41
         if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) {
44 42
             $markerArray['###STATE###'] = 'cur';
@@ -81,8 +79,7 @@  discard block
 block discarded – undo
81 79
      *
82 80
      * @return string The rendered page browser ready for output
83 81
      */
84
-    protected function getPageBrowser()
85
-    {
82
+    protected function getPageBrowser() {
86 83
         // Get overall number of pages.
87 84
         $maxPages = intval(ceil($this->doc->numPages / $this->conf['limit']));
88 85
         // Return empty pagebrowser if there is just one page.
@@ -132,8 +129,7 @@  discard block
 block discarded – undo
132 129
      *
133 130
      * @return string The content that is displayed on the website
134 131
      */
135
-    public function main($content, $conf)
136
-    {
132
+    public function main($content, $conf) {
137 133
         $this->init($conf);
138 134
         $this->loadDocument();
139 135
         if (
Please login to merge, or discard this patch.
Classes/Plugin/Basket.php 2 patches
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             $query = $GLOBALS['TYPO3_DB']->SELECTquery(
57 57
                 '*',
58 58
                 'tx_dlf_basket',
59
-                'tx_dlf_basket.fe_user_id=' . intval($insertArray['fe_user_id'])
59
+                'tx_dlf_basket.fe_user_id='.intval($insertArray['fe_user_id'])
60 60
                     . Helper::whereClause('tx_dlf_basket'),
61 61
                 '',
62 62
                 '',
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             $query = $GLOBALS['TYPO3_DB']->SELECTquery(
70 70
                 '*',
71 71
                 'tx_dlf_basket',
72
-                'tx_dlf_basket.session_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket')
72
+                'tx_dlf_basket.session_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($sessionId, 'tx_dlf_basket')
73 73
                     . Helper::whereClause('tx_dlf_basket'),
74 74
                 '',
75 75
                 '',
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
 
160 160
         if ($resultMail->countRow() > 0) {
161 161
             $mailForm = '<select name="tx_dlf[mail_action]">';
162
-            $mailForm .= '<option value="">' . $this->pi_getLL('chooseMail', '', TRUE) . '</option>';
162
+            $mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>';
163 163
             while ($row = $resultMail->fetch()) {
164
-                $mailForm .= '<option value="' . $row['uid'] . '">' . $row['name'] . ' (' . $row['mail'] . ')</option>';
164
+                $mailForm .= '<option value="'.$row['uid'].'">'.$row['name'].' ('.$row['mail'].')</option>';
165 165
             }
166 166
             $mailForm .= '</select><input type="submit">';
167 167
         }
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
         // remove action form
171 171
         $markerArray['###REMOVEACTION###'] = '
172 172
    <select name="tx_dlf[basket_action]">
173
-    <option value="">' . $this->pi_getLL('chooseAction', '', TRUE) . '</option>
174
-    <option value="open">' . $this->pi_getLL('download', '', TRUE) . '</option>
175
-    <option value="remove">' . $this->pi_getLL('remove', '', TRUE) . '</option>
173
+    <option value="">' . $this->pi_getLL('chooseAction', '', TRUE).'</option>
174
+    <option value="open">' . $this->pi_getLL('download', '', TRUE).'</option>
175
+    <option value="remove">' . $this->pi_getLL('remove', '', TRUE).'</option>
176 176
    </select>
177 177
    <input type="submit">
178 178
   ';
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
         $printForm = '';
194 194
         if ($resultPrinter->countRow() > 0) {
195 195
             $printForm = '<select name="tx_dlf[print_action]">';
196
-            $printForm .= '<option value="">' . $this->pi_getLL('choosePrinter', '', TRUE) . '</option>';
196
+            $printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>';
197 197
             while ($row = $resultPrinter->fetch()) {
198
-                $printForm .= '<option value="' . $row['uid'] . '">' . $row['label'] . '</option>';
198
+                $printForm .= '<option value="'.$row['uid'].'">'.$row['label'].'</option>';
199 199
             }
200 200
             $printForm .= '</select><input type="submit" />';
201 201
         }
@@ -250,23 +250,23 @@  discard block
 block discarded – undo
250 250
         $rotation = $data['rotation'];
251 251
         $docData = $this->getDocumentData($id, $data);
252 252
         $markerArray['###BASKETDATA###'] = $docData['downloadLink'];
253
-        $arrayKey = $id . '_' . $startpage;
253
+        $arrayKey = $id.'_'.$startpage;
254 254
         if (isset($startX)) {
255
-            $arrayKey .= '_' . $startX;
255
+            $arrayKey .= '_'.$startX;
256 256
         }
257 257
         if (isset($endX)) {
258
-            $arrayKey .= '_' . $endX;
258
+            $arrayKey .= '_'.$endX;
259 259
         }
260
-        $controlMark = '<input value="' . $id . '" name="tx_dlf[selected][' . $arrayKey . '][id]" type="checkbox">';
261
-        $controlMark .= '<input value="' . $startpage . '" name="tx_dlf[selected][' . $arrayKey . '][startpage]" type="hidden">';
262
-        $controlMark .= '<input value="' . $endpage . '" name="tx_dlf[selected][' . $arrayKey . '][endpage]" type="hidden">';
260
+        $controlMark = '<input value="'.$id.'" name="tx_dlf[selected]['.$arrayKey.'][id]" type="checkbox">';
261
+        $controlMark .= '<input value="'.$startpage.'" name="tx_dlf[selected]['.$arrayKey.'][startpage]" type="hidden">';
262
+        $controlMark .= '<input value="'.$endpage.'" name="tx_dlf[selected]['.$arrayKey.'][endpage]" type="hidden">';
263 263
         // add hidden fields for detail information
264 264
         if ($startX) {
265
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startX]" value="' . $startX . '">';
266
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][startY]"  value="' . $startY . '">';
267
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endX]"  value="' . $endX . '">';
268
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][endY]"  value="' . $endY . '">';
269
-            $controlMark .= '<input type="hidden" name="tx_dlf[selected][' . $arrayKey . '][rotation]"  value="' . $rotation . '">';
265
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startX]" value="'.$startX.'">';
266
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][startY]"  value="'.$startY.'">';
267
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endX]"  value="'.$endX.'">';
268
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][endY]"  value="'.$endY.'">';
269
+            $controlMark .= '<input type="hidden" name="tx_dlf[selected]['.$arrayKey.'][rotation]"  value="'.$rotation.'">';
270 270
         }
271 271
         // return one entry
272 272
         $markerArray['###CONTROLS###'] = $controlMark;
@@ -322,12 +322,12 @@  discard block
 block discarded – undo
322 322
             if ($_piVars['addToBasket'] == 'list') {
323 323
                 $documentItem['endpage'] = $document->numPages;
324 324
             }
325
-            $arrayKey = $documentItem['id'] . '_' . $page;
325
+            $arrayKey = $documentItem['id'].'_'.$page;
326 326
             if (!empty($documentItem['startX'])) {
327
-                $arrayKey .= '_' . $documentItem['startX'];
327
+                $arrayKey .= '_'.$documentItem['startX'];
328 328
             }
329 329
             if (!empty($documentItem['endX'])) {
330
-                $arrayKey .= '_' . $documentItem['endX'];
330
+                $arrayKey .= '_'.$documentItem['endX'];
331 331
             }
332 332
             // do not add more than one identical object
333 333
             if (!in_array($arrayKey, $items)) {
@@ -346,14 +346,14 @@  discard block
 block discarded – undo
346 346
                     // remove parameter endpage
347 347
                     $pdfParams = str_replace(",##endpage##", '', $pdfParams);
348 348
                 }
349
-                $pdfGenerateUrl = $this->conf['pdfgenerate'] . $pdfParams;
349
+                $pdfGenerateUrl = $this->conf['pdfgenerate'].$pdfParams;
350 350
                 if ($this->conf['pregeneration']) {
351 351
                     // send ajax request to webapp
352 352
                     $output .= '
353 353
      <script>
354 354
       $(document).ready(function(){
355 355
        $.ajax({
356
-         url: "' . $pdfGenerateUrl . '",
356
+         url: "' . $pdfGenerateUrl.'",
357 357
        }).done(function() {
358 358
        });
359 359
       });
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
                 }
362 362
             }
363 363
             $update = ['doc_ids' => json_encode($items)];
364
-            $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update);
364
+            $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
365 365
             $basketData['doc_ids'] = $items;
366 366
         }
367 367
         return ['basketData' => $basketData, 'jsOutput' => $output];
@@ -385,12 +385,12 @@  discard block
 block discarded – undo
385 385
         }
386 386
         foreach ($_piVars['selected'] as $value) {
387 387
             if (isset($value['id'])) {
388
-                $arrayKey = $value['id'] . '_' . $value['startpage'];
388
+                $arrayKey = $value['id'].'_'.$value['startpage'];
389 389
                 if (isset($value['startX'])) {
390
-                    $arrayKey .= '_' . $value['startX'];
390
+                    $arrayKey .= '_'.$value['startX'];
391 391
                 }
392 392
                 if (isset($value['endX'])) {
393
-                    $arrayKey .= '_' . $value['endX'];
393
+                    $arrayKey .= '_'.$value['endX'];
394 394
                 }
395 395
                 if (isset($items[$arrayKey])) {
396 396
                     unset($items[$arrayKey]);
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         } else {
403 403
             $update = ['doc_ids' => json_encode($items)];
404 404
         }
405
-        $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid=' . intval($basketData['uid']), $update);
405
+        $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_dlf_basket', 'uid='.intval($basketData['uid']), $update);
406 406
         $basketData['doc_ids'] = $items;
407 407
         return $basketData;
408 408
     }
@@ -423,10 +423,10 @@  discard block
 block discarded – undo
423 423
         foreach ($this->piVars['selected'] as $docValue) {
424 424
             if ($docValue['id']) {
425 425
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
426
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
426
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
427 427
             }
428 428
         }
429
-        header('Location: ' . $pdfUrl);
429
+        header('Location: '.$pdfUrl);
430 430
         ob_end_flush();
431 431
         exit;
432 432
     }
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
             $urlParams = str_replace("##endx##", $data['endX'] === "" ? "" : intval($data['endX']), $urlParams);
461 461
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : intval($data['endY']), $urlParams);
462 462
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : intval($data['rotation']), $urlParams);
463
-            $downloadUrl = $this->conf['pdfgenerate'] . $urlParams;
463
+            $downloadUrl = $this->conf['pdfgenerate'].$urlParams;
464 464
             $title = $document->getTitle($id, TRUE);
465 465
             if (empty($title)) {
466 466
                 $title = $this->pi_getLL('noTitle', '', TRUE);
@@ -469,15 +469,15 @@  discard block
 block discarded – undo
469 469
             $info = '';
470 470
             if ($data['startX'] != '' && $data['endX'] != '') {
471 471
                 // cutout
472
-                $info .= $this->pi_getLL('cutout', '', TRUE) . ' ';
472
+                $info .= $this->pi_getLL('cutout', '', TRUE).' ';
473 473
             }
474 474
             if ($data['startpage'] == $data['endpage']) {
475 475
                 // One page
476
-                $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage'];
476
+                $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'];
477 477
             } else {
478
-                $info .= $this->pi_getLL('page', '', TRUE) . ' ' . $data['startpage'] . '-' . $data['endpage'];
478
+                $info .= $this->pi_getLL('page', '', TRUE).' '.$data['startpage'].'-'.$data['endpage'];
479 479
             }
480
-            $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . $title . '</a> (' . $info . ')';
480
+            $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.$title.'</a> ('.$info.')';
481 481
             if ($data['startpage'] == $data['endpage']) {
482 482
                 $pageNums = 1;
483 483
             } else {
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 
524 524
         $allResults = $resultMail->fetchAll();
525 525
         $mailData = $allResults[0];
526
-        $mailText = $this->pi_getLL('mailBody', '', TRUE) . "\n";
526
+        $mailText = $this->pi_getLL('mailBody', '', TRUE)."\n";
527 527
         $numberOfPages = 0;
528 528
         $pdfUrl = $this->conf['pdfdownload'];
529 529
         // prepare links
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
             if ($docValue['id']) {
532 532
                 $explodeId = explode("_", $docValue['id']);
533 533
                 $docData = $this->getDocumentData($explodeId[0], $docValue);
534
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
534
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
535 535
                 $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
536 536
                 if ($pages === 0) {
537 537
                     $numberOfPages = $numberOfPages + 1;
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
         }
543 543
         // Remove leading/tailing pdfparamseperator
544 544
         $pdfUrl = trim($pdfUrl, $this->conf['pdfparamseparator']);
545
-        $mailBody = $mailText . $pdfUrl;
545
+        $mailBody = $mailText.$pdfUrl;
546 546
         // Get hook objects.
547 547
         $hookObjects = Helper::getHookObjects($this->scriptRelPath);
548 548
         // Hook for getting a customized mail body.
@@ -575,12 +575,12 @@  discard block
 block discarded – undo
575 575
             // internal user
576 576
             $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
577 577
             $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
578
-            $insertArray['label'] = 'Mail: ' . $mailData['mail'];
578
+            $insertArray['label'] = 'Mail: '.$mailData['mail'];
579 579
         } else {
580 580
             // external user
581 581
             $insertArray['user_id'] = 0;
582 582
             $insertArray['name'] = 'n/a';
583
-            $insertArray['label'] = 'Mail: ' . $mailData['mail'];
583
+            $insertArray['label'] = 'Mail: '.$mailData['mail'];
584 584
         }
585 585
         // add action to protocol
586 586
         $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
         foreach ($this->piVars['selected'] as $docId => $docValue) {
601 601
             if ($docValue['id']) {
602 602
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
603
-                $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
603
+                $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
604 604
                 $numberOfPages += $docData['pageNums'];
605 605
             }
606 606
         }
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
                 if ($docValue['id']) {
633 633
                     $explodeId = explode("_", $docId);
634 634
                     $docData = $this->getDocumentData($explodeId[0], $docValue);
635
-                    $pdfUrl .= $docData['urlParams'] . $this->conf['pdfparamseparator'];
635
+                    $pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
636 636
                     $numberOfPages += $docData['pageNums'];
637 637
                 }
638 638
             }
@@ -649,16 +649,16 @@  discard block
 block discarded – undo
649 649
             // internal user
650 650
             $insertArray['user_id'] = $GLOBALS["TSFE"]->fe_user->user['uid'];
651 651
             $insertArray['name'] = $GLOBALS["TSFE"]->fe_user->user['username'];
652
-            $insertArray['label'] = 'Print: ' . $printerData['label'];
652
+            $insertArray['label'] = 'Print: '.$printerData['label'];
653 653
         } else {
654 654
             // external user
655 655
             $insertArray['user_id'] = 0;
656 656
             $insertArray['name'] = 'n/a';
657
-            $insertArray['label'] = 'Print: ' . $printerData['label'];
657
+            $insertArray['label'] = 'Print: '.$printerData['label'];
658 658
         }
659 659
         // add action to protocol
660 660
         $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dlf_actionlog', $insertArray);
661
-        header('Location: ' . $pdfUrl);
661
+        header('Location: '.$pdfUrl);
662 662
         ob_end_flush();
663 663
         exit;
664 664
     }
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 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 Basket extends \Kitodo\Dlf\Common\AbstractPlugin
30
-{
29
+class Basket extends \Kitodo\Dlf\Common\AbstractPlugin {
31 30
     public $scriptRelPath = 'Classes/Plugin/Basket.php';
32 31
 
33 32
     /**
@@ -40,8 +39,7 @@  discard block
 block discarded – undo
40 39
      *
41 40
      * @return string The content that is displayed on the website
42 41
      */
43
-    public function main($content, $conf)
44
-    {
42
+    public function main($content, $conf) {
45 43
         $this->init($conf);
46 44
         // Don't cache the output.
47 45
         $this->setCache(FALSE);
@@ -235,8 +233,7 @@  discard block
 block discarded – undo
235 233
      *
236 234
      * @return string One basket entry
237 235
      */
238
-    protected function getEntry($data, $template)
239
-    {
236
+    protected function getEntry($data, $template) {
240 237
         if (is_object($data)) {
241 238
             $data = get_object_vars($data);
242 239
         }
@@ -284,8 +281,7 @@  discard block
 block discarded – undo
284 281
      *
285 282
      * @return array Basket data and Javascript output
286 283
      */
287
-    protected function addToBasket($_piVars, $basketData)
288
-    {
284
+    protected function addToBasket($_piVars, $basketData) {
289 285
         $output = '';
290 286
         if (!$_piVars['startpage']) {
291 287
             $page = 0;
@@ -377,8 +373,7 @@  discard block
 block discarded – undo
377 373
      *
378 374
      * @return array basket data
379 375
      */
380
-    protected function removeFromBasket($_piVars, $basketData)
381
-    {
376
+    protected function removeFromBasket($_piVars, $basketData) {
382 377
         if (!empty($basketData['doc_ids'])) {
383 378
             $items = $basketData['doc_ids'];
384 379
             $items = get_object_vars($items);
@@ -417,8 +412,7 @@  discard block
 block discarded – undo
417 412
      *
418 413
      * @return array basket data
419 414
      */
420
-    protected function openFromBasket($_piVars, $basketData)
421
-    {
415
+    protected function openFromBasket($_piVars, $basketData) {
422 416
         $pdfUrl = $this->conf['pdfgenerate'];
423 417
         foreach ($this->piVars['selected'] as $docValue) {
424 418
             if ($docValue['id']) {
@@ -440,8 +434,7 @@  discard block
 block discarded – undo
440 434
      *
441 435
      * @return mixed download url or FALSE
442 436
      */
443
-    protected function getDocumentData($id, $data)
444
-    {
437
+    protected function getDocumentData($id, $data) {
445 438
         // get document instance to load further information
446 439
         $document = Document::getInstance($id, 0);
447 440
         if ($document) {
@@ -501,8 +494,7 @@  discard block
 block discarded – undo
501 494
      *
502 495
      * @return void
503 496
      */
504
-    protected function sendMail()
505
-    {
497
+    protected function sendMail() {
506 498
         // send mail
507 499
         $mailId = $this->piVars['mail_action'];
508 500
 
@@ -593,8 +585,7 @@  discard block
 block discarded – undo
593 585
      *
594 586
      * @return void
595 587
      */
596
-    protected function printDocument()
597
-    {
588
+    protected function printDocument() {
598 589
         $pdfUrl = $this->conf['pdfprint'];
599 590
         $numberOfPages = 0;
600 591
         foreach ($this->piVars['selected'] as $docId => $docValue) {
Please login to merge, or discard this patch.
Classes/Plugin/Calendar.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -120,16 +120,16 @@  discard block
 block discarded – undo
120 120
                 '###DAYFRI_NAME###' => strftime('%a', strtotime('last Friday')),
121 121
                 '###DAYSAT_NAME###' => strftime('%a', strtotime('last Saturday')),
122 122
                 '###DAYSUN_NAME###' => strftime('%a', strtotime('last Sunday')),
123
-                '###MONTHNAME###'  => strftime('%B', strtotime($year . '-' . ($i + 1) . '-1'))
123
+                '###MONTHNAME###'  => strftime('%B', strtotime($year.'-'.($i + 1).'-1'))
124 124
             ];
125 125
             // Reset week content of new month.
126 126
             $subWeekPartContent = '';
127
-            $firstOfMonth = strtotime($year . '-' . ($i + 1) . '-1');
127
+            $firstOfMonth = strtotime($year.'-'.($i + 1).'-1');
128 128
             $lastOfMonth = strtotime('last day of', ($firstOfMonth));
129 129
             $firstOfMonthStart = strtotime('last Monday', $firstOfMonth);
130 130
             // There are never more than 6 weeks in a month.
131 131
             for ($j = 0; $j <= 5; $j++) {
132
-                $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart);
132
+                $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart);
133 133
                 $weekArray = [
134 134
                     '###DAYMON###' => '&nbsp;',
135 135
                     '###DAYTUE###' => '&nbsp;',
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                 ];
142 142
                 // Every week has seven days. ;-)
143 143
                 for ($k = 0; $k <= 6; $k++) {
144
-                    $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek);
144
+                    $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek);
145 145
                     if (
146 146
                         $currentDayTime >= $firstOfMonth
147 147
                         && $currentDayTime <= $lastOfMonth
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                                         $linkConf = [
160 160
                                             'useCacheHash' => 1,
161 161
                                             'parameter' => $this->conf['targetPid'],
162
-                                            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($issue['uid']),
162
+                                            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($issue['uid']),
163 163
                                             'ATagParams' => ' class="title"',
164 164
                                         ];
165 165
                                         $dayLinksText[] = $this->cObj->typoLink($dayLinkLabel, $linkConf);
@@ -171,13 +171,13 @@  discard block
 block discarded – undo
171 171
                             if (!empty($dayLinksText)) {
172 172
                                 $dayLinksList = '<ul>';
173 173
                                 foreach ($dayLinksText as $link) {
174
-                                    $dayLinksList .= '<li>' . $link . '</li>';
174
+                                    $dayLinksList .= '<li>'.$link.'</li>';
175 175
                                 }
176 176
                                 $dayLinksList .= '</ul>';
177 177
                             }
178
-                            $dayLinkDiv = '<div class="issues"><h4>' . strftime('%d', $currentDayTime) . '</h4><div>' . $dayLinksList . '</div></div>';
178
+                            $dayLinkDiv = '<div class="issues"><h4>'.strftime('%d', $currentDayTime).'</h4><div>'.$dayLinksList.'</div></div>';
179 179
                         }
180
-                        switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) {
180
+                        switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) {
181 181
                             case '0':
182 182
                                 $weekArray['###DAYSUN###'] = ((int) $dayLinks === (int) date('j', $currentDayTime)) ? $dayLinkDiv : strftime('%d', $currentDayTime);
183 183
                                 break;
@@ -214,14 +214,14 @@  discard block
 block discarded – undo
214 214
         $linkConf = [
215 215
             'useCacheHash' => 1,
216 216
             'parameter' => $this->conf['targetPid'],
217
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->parentId),
217
+            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->parentId),
218 218
         ];
219
-        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->parentId), $linkConf);
219
+        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->parentId), $linkConf);
220 220
         // Link to current year.
221 221
         $linkConf = [
222 222
             'useCacheHash' => 1,
223 223
             'parameter' => $this->conf['targetPid'],
224
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($this->doc->uid),
224
+            'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($this->doc->uid),
225 225
         ];
226 226
         $yearLink = $this->cObj->typoLink($year, $linkConf);
227 227
         $subPartContentList = '';
@@ -310,8 +310,8 @@  discard block
 block discarded – undo
310 310
                 $linkConf = [
311 311
                     'useCacheHash' => 1,
312 312
                     'parameter' => $this->conf['targetPid'],
313
-                    'additionalParams' => '&' . $this->prefixId . '[id]=' . urlencode($year['uid']),
314
-                    'title' => $titleAnchor . ': ' . $year['title']
313
+                    'additionalParams' => '&'.$this->prefixId.'[id]='.urlencode($year['uid']),
314
+                    'title' => $titleAnchor.': '.$year['title']
315 315
                 ];
316 316
                 $yearArray = [
317 317
                     '###YEARNAME###' => $this->cObj->typoLink($year['title'], $linkConf),
@@ -323,9 +323,9 @@  discard block
 block discarded – undo
323 323
         $linkConf = [
324 324
             'useCacheHash' => 1,
325 325
             'parameter' => $this->conf['targetPid'],
326
-            'additionalParams' => '&' . $this->prefixId . '[id]=' . $this->doc->uid,
326
+            'additionalParams' => '&'.$this->prefixId.'[id]='.$this->doc->uid,
327 327
         ];
328
-        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE) . ' ' . $this->doc->getTitle($this->doc->uid), $linkConf);
328
+        $allYearsLink = $this->cObj->typoLink($this->pi_getLL('allYears', '', TRUE).' '.$this->doc->getTitle($this->doc->uid), $linkConf);
329 329
         // Fill markers.
330 330
         $markerArray = [
331 331
             '###LABEL_CHOOSE_YEAR###' => $this->pi_getLL('label.please_choose_year'),
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  * @subpackage dlf
26 26
  * @access public
27 27
  */
28
-class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin
29
-{
28
+class Calendar extends \Kitodo\Dlf\Common\AbstractPlugin {
30 29
     public $scriptRelPath = 'Classes/Plugin/Calendar.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
         // Nothing to do here.
45 43
         return $content;
46 44
     }
@@ -55,8 +53,7 @@  discard block
 block discarded – undo
55 53
      *
56 54
      * @return string The content that is displayed on the website
57 55
      */
58
-    public function calendar($content, $conf)
59
-    {
56
+    public function calendar($content, $conf) {
60 57
         $this->init($conf);
61 58
         // Load current document.
62 59
         $this->loadDocument();
@@ -262,8 +259,7 @@  discard block
 block discarded – undo
262 259
      *
263 260
      * @return string The content that is displayed on the website
264 261
      */
265
-    public function years($content, $conf)
266
-    {
262
+    public function years($content, $conf) {
267 263
         $this->init($conf);
268 264
         // Load current document.
269 265
         $this->loadDocument();
Please login to merge, or discard this patch.
Classes/Plugin/Statistics.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
                 'tx_dlf_documents',
60 60
                 'tx_dlf_relations',
61 61
                 'tx_dlf_collections',
62
-                'AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
63
-                    . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
62
+                'AND tx_dlf_documents.pid='.intval($this->conf['pages'])
63
+                    . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
64 64
                     . ' AND tx_dlf_documents.partof=0'
65
-                    . ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')'
66
-                    . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
65
+                    . ' AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')'
66
+                    . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
67 67
                     . Helper::whereClause('tx_dlf_documents')
68 68
                     . Helper::whereClause('tx_dlf_collections'),
69 69
                 'tx_dlf_documents.uid'
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
                 'tx_dlf_documents',
74 74
                 'tx_dlf_relations',
75 75
                 'tx_dlf_collections',
76
-                'AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
77
-                    . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
78
-                    . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . Helper::whereClause('tx_dlf_documents') . ')'
79
-                    . ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')'
80
-                    . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
76
+                'AND tx_dlf_documents.pid='.intval($this->conf['pages'])
77
+                    . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
78
+                    . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.Helper::whereClause('tx_dlf_documents').')'
79
+                    . ' AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')'
80
+                    . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
81 81
                     . Helper::whereClause('tx_dlf_documents')
82 82
                     . Helper::whereClause('tx_dlf_collections'),
83 83
                 'tx_dlf_documents.uid'
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
             $resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
102 102
                 'tx_dlf_documents.uid AS uid',
103 103
                 'tx_dlf_documents',
104
-                'tx_dlf_documents.pid=' . intval($this->conf['pages'])
105
-                    . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . Helper::whereClause('tx_dlf_documents') . ')'
104
+                'tx_dlf_documents.pid='.intval($this->conf['pages'])
105
+                    . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0'.Helper::whereClause('tx_dlf_documents').')'
106 106
                     . Helper::whereClause('tx_dlf_documents')
107 107
             );
108 108
         }
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
                 '###VOLUMES###'
116 116
             ],
117 117
             'value' => [
118
-                $countTitles . ($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)),
119
-                $countVolumes . ($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE))
118
+                $countTitles.($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)),
119
+                $countVolumes.($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE))
120 120
             ]
121 121
         ];
122 122
         // Apply replacements.
Please login to merge, or discard this patch.
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.
Classes/Plugin/Feeds.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -90,18 +90,18 @@  discard block
 block discarded – undo
90 90
             $additionalWhere = '';
91 91
             // Check for pre-selected collections.
92 92
             if (!empty($this->piVars['collection'])) {
93
-                $additionalWhere = ' AND tx_dlf_collections.uid=' . intval($this->piVars['collection']);
93
+                $additionalWhere = ' AND tx_dlf_collections.uid='.intval($this->piVars['collection']);
94 94
             } elseif (!empty($this->conf['collections'])) {
95
-                $additionalWhere = ' AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ')';
95
+                $additionalWhere = ' AND tx_dlf_collections.uid IN ('.$GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']).')';
96 96
             }
97 97
             $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
98 98
                 'tx_dlf_documents.uid AS uid,tx_dlf_documents.partof AS partof,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_documents.author AS author,tx_dlf_documents.record_id AS guid,tx_dlf_documents.tstamp AS tstamp,tx_dlf_documents.crdate AS crdate',
99 99
                 'tx_dlf_documents',
100 100
                 'tx_dlf_relations',
101 101
                 'tx_dlf_collections',
102
-                'AND tx_dlf_documents.pid=' . intval($this->conf['pages'])
103
-                    . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
104
-                    . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages'])
102
+                'AND tx_dlf_documents.pid='.intval($this->conf['pages'])
103
+                    . ' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations')
104
+                    . ' AND tx_dlf_collections.pid='.intval($this->conf['pages'])
105 105
                     . $additionalWhere
106 106
                     . Helper::whereClause('tx_dlf_documents')
107 107
                     . Helper::whereClause('tx_dlf_collections'),
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
                     ) {
121 121
                         $superiorTitle = Document::getTitle($resArray['partof'], TRUE);
122 122
                         if (!empty($superiorTitle)) {
123
-                            $title .= '[' . $superiorTitle . ']';
123
+                            $title .= '['.$superiorTitle.']';
124 124
                         }
125 125
                     }
126 126
                     // Get title of document.
127 127
                     if (!empty($resArray['title'])) {
128
-                        $title .= ' ' . $resArray['title'];
128
+                        $title .= ' '.$resArray['title'];
129 129
                     }
130 130
                     // Set default title if empty.
131 131
                     if (empty($title)) {
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
                     }
134 134
                     // Append volume information.
135 135
                     if (!empty($resArray['volume'])) {
136
-                        $title .= ', ' . $this->pi_getLL('volume') . ' ' . $resArray['volume'];
136
+                        $title .= ', '.$this->pi_getLL('volume').' '.$resArray['volume'];
137 137
                     }
138 138
                     // Is this document new or updated?
139 139
                     if ($resArray['crdate'] == $resArray['tstamp']) {
140
-                        $title = $this->pi_getLL('new') . ' ' . trim($title);
140
+                        $title = $this->pi_getLL('new').' '.trim($title);
141 141
                     } else {
142
-                        $title = $this->pi_getLL('update') . ' ' . trim($title);
142
+                        $title = $this->pi_getLL('update').' '.trim($title);
143 143
                     }
144 144
                     $item->appendChild($rss->createElement('title', htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8')));
145 145
                     // Add link.
@@ -170,10 +170,10 @@  discard block
 block discarded – undo
170 170
         // Send headers.
171 171
         header('HTTP/1.1 200 OK');
172 172
         header('Cache-Control: no-cache');
173
-        header('Content-Length: ' . strlen($content));
173
+        header('Content-Length: '.strlen($content));
174 174
         header('Content-Type: application/rss+xml; charset=utf-8');
175
-        header('Date: ' . date('r', $GLOBALS['EXEC_TIME']));
176
-        header('Expires: ' . date('r', $GLOBALS['EXEC_TIME']));
175
+        header('Date: '.date('r', $GLOBALS['EXEC_TIME']));
176
+        header('Expires: '.date('r', $GLOBALS['EXEC_TIME']));
177 177
         echo $content;
178 178
         exit;
179 179
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 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 Feeds extends \Kitodo\Dlf\Common\AbstractPlugin
30
-{
29
+class Feeds extends \Kitodo\Dlf\Common\AbstractPlugin {
31 30
     public $scriptRelPath = 'Classes/Plugin/Feeds.php';
32 31
 
33 32
     /**
@@ -40,8 +39,7 @@  discard block
 block discarded – undo
40 39
      *
41 40
      * @return void
42 41
      */
43
-    public function main($content, $conf)
44
-    {
42
+    public function main($content, $conf) {
45 43
         $this->init($conf);
46 44
         // Don't cache the output.
47 45
         $this->setCache(FALSE);
Please login to merge, or discard this patch.