Passed
Pull Request — master (#70)
by Alexander
03:07
created
Classes/Plugin/Eid/SearchInDocument.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         if ($solr->ready) {
56 56
             $query = $solr->service->createSelect();
57 57
             $query->setFields(['id', 'uid', 'page']);
58
-            $query->setQuery('fulltext:(' . Solr::escapeQuery((string) $parameters['q']) . ') AND uid:' . intval($parameters['uid']));
58
+            $query->setQuery('fulltext:('.Solr::escapeQuery((string) $parameters['q']).') AND uid:'.intval($parameters['uid']));
59 59
             $query->setStart($count)->setRows(20);
60 60
             $hl = $query->getHighlighting();
61 61
             $hl->setFields(['fulltext']);
Please login to merge, or discard this patch.
class.ext_update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
         foreach ($rows as $row) {
118 118
             if ($row['format'] === 0 && $row['xpath']) {
119
-                $uids[] = (int)$row['uid'];
119
+                $uids[] = (int) $row['uid'];
120 120
             }
121 121
         }
122 122
         return $uids;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $result = $queryBuilder
225 225
             ->select('COLUMN_NAME')
226 226
             ->from('INFORMATION_SCHEMA.COLUMNS')
227
-            ->where('TABLE_NAME="tx_dlf_documents" AND TABLE_SCHEMA="' . $database . '" AND COLUMN_NAME="document_format"')
227
+            ->where('TABLE_NAME="tx_dlf_documents" AND TABLE_SCHEMA="'.$database.'" AND COLUMN_NAME="document_format"')
228 228
             ->execute();
229 229
         while ($resArray = $result->fetch()) {
230 230
             if ($resArray['COLUMN_NAME'] === 'document_format') {
Please login to merge, or discard this patch.
Classes/Hooks/Form/FieldInformation/SolrCoreStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                     $uptimeInSeconds = floor($response->getUptime() / 1000);
56 56
                     $dateTimeFrom = new \DateTime('@0');
57 57
                     $dateTimeTo = new \DateTime("@$uptimeInSeconds");
58
-                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a ' . $GLOBALS['LANG']->getLL('flash.days') . ', %H:%I:%S');
58
+                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a '.$GLOBALS['LANG']->getLL('flash.days').', %H:%I:%S');
59 59
                     $numDocuments = $response->getNumberOfDocuments();
60 60
                     $startTime = $response->getStartTime() ? strftime('%c', $response->getStartTime()->getTimestamp()) : 'N/A';
61 61
                     $lastModified = $response->getLastModified() ? strftime('%c', $response->getLastModified()->getTimestamp()) : 'N/A';
Please login to merge, or discard this patch.
Classes/Plugin/PageGrid.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $markerArray['###PAGINATION###'] = htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['orderlabel']);
56 56
         // Get thumbnail or placeholder.
57 57
         $fileGrpsThumb = GeneralUtility::trimExplode(',', $this->conf['fileGrpThumbs']);
58
-        if (array_intersect($fileGrpsThumb, array_keys($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'])) !== [] ) {
58
+        if (array_intersect($fileGrpsThumb, array_keys($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'])) !== []) {
59 59
             while ($fileGrpThumb = array_shift($fileGrpsThumb)) {
60 60
                 if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'][$fileGrpThumb])) {
61 61
                     $thumbnailFile = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$number]]['files'][$fileGrpThumb]);
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
         } elseif (!empty($this->conf['placeholder'])) {
66 66
             $thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']);
67 67
         } else {
68
-            $thumbnailFile = PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Images/PageGridPlaceholder.jpg';
68
+            $thumbnailFile = PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)).'Resources/Public/Images/PageGridPlaceholder.jpg';
69 69
         }
70
-        $thumbnail = '<img alt="' . $markerArray['###PAGINATION###'] . '" src="' . $thumbnailFile . '" />';
70
+        $thumbnail = '<img alt="'.$markerArray['###PAGINATION###'].'" src="'.$thumbnailFile.'" />';
71 71
         // Get new plugin variables for typolink.
72 72
         $piVars = $this->piVars;
73 73
         // Unset no longer needed plugin variables.
@@ -105,22 +105,22 @@  discard block
 block discarded – undo
105 105
         $separator = htmlspecialchars($this->pi_getLL('separator', ' - '));
106 106
         // Add link to previous page.
107 107
         if ($this->piVars['pointer'] > 0) {
108
-            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], true) . $separator;
108
+            $output = $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('prevPage', '<')), ['pointer' => $this->piVars['pointer'] - 1, 'page' => (($this->piVars['pointer'] - 1) * $this->conf['limit']) + 1], true).$separator;
109 109
         } else {
110
-            $output = '<span class="prev-page not-active">' . htmlspecialchars($this->pi_getLL('prevPage', '<')) . '</span>' . $separator;
110
+            $output = '<span class="prev-page not-active">'.htmlspecialchars($this->pi_getLL('prevPage', '<')).'</span>'.$separator;
111 111
         }
112 112
         $i = 0;
113 113
         // Add links to pages.
114 114
         while ($i < $maxPages) {
115 115
             if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
116 116
                 if ($this->piVars['pointer'] != $i) {
117
-                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], true) . $separator;
117
+                    $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)), ['pointer' => $i, 'page' => ($i * $this->conf['limit']) + 1], true).$separator;
118 118
                 } else {
119
-                    $output .= '<span class="active">' . htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)) . '</span>' . $separator;
119
+                    $output .= '<span class="active">'.htmlspecialchars(sprintf($this->pi_getLL('page', '%d'), $i + 1)).'</span>'.$separator;
120 120
                 }
121 121
                 $skip = true;
122 122
             } elseif ($skip == true) {
123
-                $output .= '<span class="skipped">' . htmlspecialchars($this->pi_getLL('skip', '...')) . '</span>' . $separator;
123
+                $output .= '<span class="skipped">'.htmlspecialchars($this->pi_getLL('skip', '...')).'</span>'.$separator;
124 124
                 $skip = false;
125 125
             }
126 126
             $i++;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         if ($this->piVars['pointer'] < $maxPages - 1) {
130 130
             $output .= $this->pi_linkTP_keepPIvars(htmlspecialchars($this->pi_getLL('nextPage', '>')), ['pointer' => $this->piVars['pointer'] + 1, 'page' => ($this->piVars['pointer'] + 1) * $this->conf['limit'] + 1], true);
131 131
         } else {
132
-            $output .= '<span class="next-page not-active">' . htmlspecialchars($this->pi_getLL('nextPage', '>')) . '</span>';
132
+            $output .= '<span class="next-page not-active">'.htmlspecialchars($this->pi_getLL('nextPage', '>')).'</span>';
133 133
         }
134 134
         return $output;
135 135
     }
Please login to merge, or discard this patch.
Classes/Plugin/Tools/FulltextDownloadTool.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@
 block discarded – undo
83 83
             }
84 84
         }
85 85
         if (!empty($fullTextFile)) {
86
-            $markerArray['###FULLTEXT_DOWNLOAD###'] = '<a href="#" id="tx-dlf-tools-fulltextdownload" title="' . htmlspecialchars($this->pi_getLL('download-current-page', '')) . '">' . htmlspecialchars($this->pi_getLL('download-current-page', '')) . '</a>';
86
+            $markerArray['###FULLTEXT_DOWNLOAD###'] = '<a href="#" id="tx-dlf-tools-fulltextdownload" title="'.htmlspecialchars($this->pi_getLL('download-current-page', '')).'">'.htmlspecialchars($this->pi_getLL('download-current-page', '')).'</a>';
87 87
         } else {
88
-            $markerArray['###FULLTEXT_DOWNLOAD###'] = '<span class="no-fulltext">' . htmlspecialchars($this->pi_getLL('fulltext-not-available', '')) . '</span>';
88
+            $markerArray['###FULLTEXT_DOWNLOAD###'] = '<span class="no-fulltext">'.htmlspecialchars($this->pi_getLL('fulltext-not-available', '')).'</span>';
89 89
         }
90 90
         $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray);
91 91
         return $this->pi_wrapInBaseClass($content);
Please login to merge, or discard this patch.
Classes/Plugin/Tools/FulltextTool.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@
 block discarded – undo
84 84
         }
85 85
         if (!empty($fullTextFile)) {
86 86
             $markerArray['###FULLTEXT_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-fulltext" title="" data-dic="'
87
-            . 'fulltext:' . htmlspecialchars($this->pi_getLL('fulltext', ''))
88
-            . ';fulltext-on:' . htmlspecialchars($this->pi_getLL('fulltext-on', ''))
89
-            . ';fulltext-off:' . htmlspecialchars($this->pi_getLL('fulltext-off', ''))
90
-            . ';activate-full-text-initially:' . MathUtility::forceIntegerInRange($this->conf['activateFullTextInitially'], 0, 1, 0)
91
-            . ';full-text-scroll-element:' . $this->conf['fullTextScrollElement']
92
-            . ';search-hl-parameters:' . $this->conf['searchHlParameters'] . '">&nbsp;</a>';
87
+            . 'fulltext:'.htmlspecialchars($this->pi_getLL('fulltext', ''))
88
+            . ';fulltext-on:'.htmlspecialchars($this->pi_getLL('fulltext-on', ''))
89
+            . ';fulltext-off:'.htmlspecialchars($this->pi_getLL('fulltext-off', ''))
90
+            . ';activate-full-text-initially:'.MathUtility::forceIntegerInRange($this->conf['activateFullTextInitially'], 0, 1, 0)
91
+            . ';full-text-scroll-element:'.$this->conf['fullTextScrollElement']
92
+            . ';search-hl-parameters:'.$this->conf['searchHlParameters'].'">&nbsp;</a>';
93 93
         } else {
94
-            $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">' . htmlspecialchars($this->pi_getLL('fulltext-not-available', '')) . '</span>';
94
+            $markerArray['###FULLTEXT_SELECT###'] = '<span class="no-fulltext">'.htmlspecialchars($this->pi_getLL('fulltext-not-available', '')).'</span>';
95 95
         }
96 96
         $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray);
97 97
         return $this->pi_wrapInBaseClass($content);
Please login to merge, or discard this patch.
Classes/Plugin/Tools/SearchInDocumentTool.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
             '###LABEL_PAGE###' => htmlspecialchars($this->pi_getLL('label.logicalPage')),
115 115
             '###LABEL_NORESULT###' => htmlspecialchars($this->pi_getLL('label.noresult')),
116 116
             '###CURRENT_DOCUMENT###' => $this->doc->uid,
117
-            '###SOLR_ENCRYPTED###' => $encryptedSolr ?: '',
117
+            '###SOLR_ENCRYPTED###' => $encryptedSolr ? : '',
118 118
         ];
119 119
 
120 120
         $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray);
Please login to merge, or discard this patch.
Classes/Plugin/AudioPlayer.php 1 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.
Classes/Plugin/Feeds.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
             $additionalWhere = '';
89 89
             // Check for pre-selected collections.
90 90
             if (!empty($this->piVars['collection'])) {
91
-                $additionalWhere = 'tx_dlf_collections.uid=' . intval($this->piVars['collection']);
91
+                $additionalWhere = 'tx_dlf_collections.uid='.intval($this->piVars['collection']);
92 92
             } elseif (!empty($this->conf['collections'])) {
93
-                $additionalWhere = 'tx_dlf_collections.uid IN (' . implode(',', GeneralUtility::intExplode(',', $this->conf['collections'])) . ')';
93
+                $additionalWhere = 'tx_dlf_collections.uid IN ('.implode(',', GeneralUtility::intExplode(',', $this->conf['collections'])).')';
94 94
             }
95 95
 
96 96
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
                     $queryBuilder->expr()->eq('tx_dlf_collections.uid', $queryBuilder->quoteIdentifier('tx_dlf_documents_collections_mm.uid_foreign'))
122 122
                 )
123 123
                 ->where(
124
-                    $queryBuilder->expr()->eq('tx_dlf_documents.pid', $queryBuilder->createNamedParameter((int)$this->conf['pages'])),
124
+                    $queryBuilder->expr()->eq('tx_dlf_documents.pid', $queryBuilder->createNamedParameter((int) $this->conf['pages'])),
125 125
                     $queryBuilder->expr()->eq('tx_dlf_documents_collections_mm.ident', $queryBuilder->createNamedParameter('docs_colls')),
126
-                    $queryBuilder->expr()->eq('tx_dlf_collections.pid', $queryBuilder->createNamedParameter((int)$this->conf['pages'])),
126
+                    $queryBuilder->expr()->eq('tx_dlf_collections.pid', $queryBuilder->createNamedParameter((int) $this->conf['pages'])),
127 127
                     $additionalWhere,
128 128
                     Helper::whereExpression('tx_dlf_documents'),
129 129
                     Helper::whereExpression('tx_dlf_collections')
130 130
                 )
131 131
                 ->groupBy('tx_dlf_documents.uid')
132 132
                 ->orderBy('tx_dlf_documents.tstamp', 'DESC')
133
-                ->setMaxResults((int)$this->conf['limit'])
133
+                ->setMaxResults((int) $this->conf['limit'])
134 134
                 ->execute();
135 135
             $rows = $result->fetchAll();
136 136
 
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
                     ) {
146 146
                         $superiorTitle = Document::getTitle($resArray['partof'], true);
147 147
                         if (!empty($superiorTitle)) {
148
-                            $title .= '[' . $superiorTitle . ']';
148
+                            $title .= '['.$superiorTitle.']';
149 149
                         }
150 150
                     }
151 151
                     // Get title of document.
152 152
                     if (!empty($resArray['title'])) {
153
-                        $title .= ' ' . $resArray['title'];
153
+                        $title .= ' '.$resArray['title'];
154 154
                     }
155 155
                     // Set default title if empty.
156 156
                     if (empty($title)) {
@@ -158,13 +158,13 @@  discard block
 block discarded – undo
158 158
                     }
159 159
                     // Append volume information.
160 160
                     if (!empty($resArray['volume'])) {
161
-                        $title .= ', ' . $this->pi_getLL('volume') . ' ' . $resArray['volume'];
161
+                        $title .= ', '.$this->pi_getLL('volume').' '.$resArray['volume'];
162 162
                     }
163 163
                     // Is this document new or updated?
164 164
                     if ($resArray['crdate'] == $resArray['tstamp']) {
165
-                        $title = $this->pi_getLL('new') . ' ' . trim($title);
165
+                        $title = $this->pi_getLL('new').' '.trim($title);
166 166
                     } else {
167
-                        $title = $this->pi_getLL('update') . ' ' . trim($title);
167
+                        $title = $this->pi_getLL('update').' '.trim($title);
168 168
                     }
169 169
                     $item->appendChild($rss->createElement('title', htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8')));
170 170
                     // Add link.
@@ -196,10 +196,10 @@  discard block
 block discarded – undo
196 196
         // Send headers.
197 197
         header('HTTP/1.1 200 OK');
198 198
         header('Cache-Control: no-cache');
199
-        header('Content-Length: ' . strlen($content));
199
+        header('Content-Length: '.strlen($content));
200 200
         header('Content-Type: application/rss+xml; charset=utf-8');
201
-        header('Date: ' . date('r', $GLOBALS['EXEC_TIME']));
202
-        header('Expires: ' . date('r', $GLOBALS['EXEC_TIME']));
201
+        header('Date: '.date('r', $GLOBALS['EXEC_TIME']));
202
+        header('Expires: '.date('r', $GLOBALS['EXEC_TIME']));
203 203
         echo $content;
204 204
         exit;
205 205
     }
Please login to merge, or discard this patch.