Passed
Pull Request — master (#70)
by Alexander
03:07
created
Classes/Plugin/PageView.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
             $(document).ready(function() {
79 79
                 if (dlfUtils.exists(dlfViewer)) {
80 80
                     tx_dlf_viewer = new dlfViewer({
81
-                        controls: ["' . implode('", "', $this->controls) . '"],
82
-                        div: "' . $this->conf['elementId'] . '",
83
-                        images: ' . json_encode($this->images) . ',
84
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
85
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
86
-                        useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0) . '
81
+                        controls: ["' . implode('", "', $this->controls).'"],
82
+                        div: "' . $this->conf['elementId'].'",
83
+                        images: ' . json_encode($this->images).',
84
+                        fulltexts: ' . json_encode($this->fulltexts).',
85
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
86
+                        useInternalProxy: ' . ($this->conf['useInternalProxy'] ? 1 : 0).'
87 87
                     });
88 88
                 }
89 89
             });
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
         $markerArray = [];
106 106
         if ($this->piVars['id']) {
107 107
             if ($this->conf['crop']) {
108
-                $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="' . htmlspecialchars($this->pi_getLL('editMode', '')) . '">' . htmlspecialchars($this->pi_getLL('editMode', '')) . '</a>';
109
-                $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="' . htmlspecialchars($this->pi_getLL('editRemove', '')) . '">' . htmlspecialchars($this->pi_getLL('editRemove', '')) . '</a>';
108
+                $markerArray['###EDITBUTTON###'] = '<a href="javascript: tx_dlf_viewer.activateSelection();" title="'.htmlspecialchars($this->pi_getLL('editMode', '')).'">'.htmlspecialchars($this->pi_getLL('editMode', '')).'</a>';
109
+                $markerArray['###EDITREMOVE###'] = '<a href="javascript: tx_dlf_viewer.resetCropSelection();" title="'.htmlspecialchars($this->pi_getLL('editRemove', '')).'">'.htmlspecialchars($this->pi_getLL('editRemove', '')).'</a>';
110 110
             } else {
111 111
                 $markerArray['###EDITBUTTON###'] = '';
112 112
                 $markerArray['###EDITREMOVE###'] = '';
113 113
             }
114 114
             if ($this->conf['magnifier']) {
115
-                $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="' . htmlspecialchars($this->pi_getLL('magnifier', '')) . '">' . htmlspecialchars($this->pi_getLL('magnifier', '')) . '</a>';
115
+                $markerArray['###MAGNIFIER###'] = '<a href="javascript: tx_dlf_viewer.activateMagnifier();" title="'.htmlspecialchars($this->pi_getLL('magnifier', '')).'">'.htmlspecialchars($this->pi_getLL('magnifier', '')).'</a>';
116 116
             } else {
117 117
                 $markerArray['###MAGNIFIER###'] = '';
118 118
             }
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
                 'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $params, '', true, false),
148 148
                 'title' => $label
149 149
             ];
150
-            $output = '<form id="addToBasketForm" action="' . $this->cObj->typoLink_URL($basketConf) . '" method="post">';
151
-            $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="' . htmlspecialchars($this->piVars['page']) . '">';
152
-            $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="' . htmlspecialchars($this->piVars['page']) . '">';
150
+            $output = '<form id="addToBasketForm" action="'.$this->cObj->typoLink_URL($basketConf).'" method="post">';
151
+            $output .= '<input type="hidden" name="tx_dlf[startpage]" id="startpage" value="'.htmlspecialchars($this->piVars['page']).'">';
152
+            $output .= '<input type="hidden" name="tx_dlf[endpage]" id="endpage" value="'.htmlspecialchars($this->piVars['page']).'">';
153 153
             $output .= '<input type="hidden" name="tx_dlf[startX]" id="startX">';
154 154
             $output .= '<input type="hidden" name="tx_dlf[startY]" id="startY">';
155 155
             $output .= '<input type="hidden" name="tx_dlf[endX]" id="endX">';
156 156
             $output .= '<input type="hidden" name="tx_dlf[endY]" id="endY">';
157 157
             $output .= '<input type="hidden" name="tx_dlf[rotation]" id="rotation">';
158
-            $output .= '<button id="submitBasketForm" onclick="this.form.submit()">' . $label . '</button>';
158
+            $output .= '<button id="submitBasketForm" onclick="this.form.submit()">'.$label.'</button>';
159 159
             $output .= '</form>';
160 160
             $output .= '<script>';
161 161
             $output .= '$(document).ready(function() { $("#submitBasketForm").click(function() { $("#addToBasketForm").submit(); }); });';
@@ -191,18 +191,18 @@  discard block
 block discarded – undo
191 191
                         'parameter' => $GLOBALS['TSFE']->id,
192 192
                         'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
193 193
                         'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
194
-                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($image['url']),
194
+                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($image['url']),
195 195
                     ];
196 196
                     $image['url'] = $this->cObj->typoLink_URL($linkConf);
197 197
                 }
198 198
                 $image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpImages]);
199 199
                 break;
200 200
             } else {
201
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
201
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
202 202
             }
203 203
         }
204 204
         if (empty($image)) {
205
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->conf['fileGrpImages'] . '"');
205
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->conf['fileGrpImages'].'"');
206 206
         }
207 207
         return $image;
208 208
     }
@@ -230,18 +230,18 @@  discard block
 block discarded – undo
230 230
                         'parameter' => $GLOBALS['TSFE']->id,
231 231
                         'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0,
232 232
                         'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'],
233
-                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url=' . urlencode($fulltext['url']),
233
+                        'additionalParams' => '&eID=tx_dlf_pageview_proxy&url='.urlencode($fulltext['url']),
234 234
                     ];
235 235
                     $fulltext['url'] = $this->cObj->typoLink_URL($linkConf);
236 236
                 }
237 237
                 $fulltext['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpFulltext]);
238 238
                 break;
239 239
             } else {
240
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
240
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
241 241
             }
242 242
         }
243 243
         if (empty($fulltext)) {
244
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->conf['fileGrpFulltext'] . '"');
244
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->conf['fileGrpFulltext'].'"');
245 245
         }
246 246
         return $fulltext;
247 247
     }
Please login to merge, or discard this patch.
Classes/Hooks/UserFunc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@
 block discarded – undo
56 56
     public function displayThumbnail(&$params)
57 57
     {
58 58
         // Simulate TCA field type "passthrough".
59
-        $output = '<input type="hidden" name="' . $params['itemFormElName'] . '" value="' . $params['itemFormElValue'] . '" />';
59
+        $output = '<input type="hidden" name="'.$params['itemFormElName'].'" value="'.$params['itemFormElValue'].'" />';
60 60
         if (!empty($params['itemFormElValue'])) {
61
-            $output .= '<img alt="Thumbnail" title="' . $params['itemFormElValue'] . '" src="' . $params['itemFormElValue'] . '" />';
61
+            $output .= '<img alt="Thumbnail" title="'.$params['itemFormElValue'].'" src="'.$params['itemFormElValue'].'" />';
62 62
         }
63 63
         return $output;
64 64
     }
Please login to merge, or discard this patch.
Classes/Common/AbstractPlugin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $templateFile = $this->conf['templateFile'];
82 82
         } else {
83 83
             // Load default template from extension.
84
-            $templateFile = 'EXT:' . $this->extKey . '/Resources/Private/Templates/' . Helper::getUnqualifiedClassName(get_class($this)) . '.tmpl';
84
+            $templateFile = 'EXT:'.$this->extKey.'/Resources/Private/Templates/'.Helper::getUnqualifiedClassName(get_class($this)).'.tmpl';
85 85
         }
86 86
         // Substitute strings like "EXT:" in given template file location.
87 87
         $fileResource = $GLOBALS['TSFE']->tmpl->getFileName($templateFile);
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
             $conf = Helper::mergeRecursiveWithOverrule($flexFormConf, $conf);
108 108
         }
109 109
         // Read plugin TS configuration.
110
-        $pluginConf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_dlf_' . strtolower(Helper::getUnqualifiedClassName(get_class($this))) . '.'];
110
+        $pluginConf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_dlf_'.strtolower(Helper::getUnqualifiedClassName(get_class($this))).'.'];
111 111
         if (is_array($pluginConf)) {
112 112
             $conf = Helper::mergeRecursiveWithOverrule($pluginConf, $conf);
113 113
         }
114 114
         // Read general TS configuration.
115
-        $generalConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->prefixId . '.'];
115
+        $generalConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->prefixId.'.'];
116 116
         if (is_array($generalConf)) {
117 117
             $conf = Helper::mergeRecursiveWithOverrule($generalConf, $conf);
118 118
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         // Set default plugin variables.
128 128
         $this->pi_setPiVarDefaults();
129 129
         // Load translation files.
130
-        $this->pi_loadLL('EXT:' . $this->extKey . '/Resources/Private/Language/' . Helper::getUnqualifiedClassName(get_class($this)) . '.xml');
130
+        $this->pi_loadLL('EXT:'.$this->extKey.'/Resources/Private/Language/'.Helper::getUnqualifiedClassName(get_class($this)).'.xml');
131 131
     }
132 132
 
133 133
     /**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             if (!$this->doc->ready) {
152 152
                 // Destroy the incomplete object.
153 153
                 $this->doc = null;
154
-                $this->logger->error('Failed to load document with UID ' . $this->piVars['id']);
154
+                $this->logger->error('Failed to load document with UID '.$this->piVars['id']);
155 155
             } else {
156 156
                 // Set configuration PID.
157 157
                 $this->doc->cPid = $this->conf['pages'];
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
                 // Try to load document.
180 180
                 $this->loadDocument();
181 181
             } else {
182
-                $this->logger->error('Failed to load document with record ID "' . $this->piVars['recordId'] . '"');
182
+                $this->logger->error('Failed to load document with record ID "'.$this->piVars['recordId'].'"');
183 183
             }
184 184
         } else {
185
-            $this->logger->error('Invalid UID ' . $this->piVars['id'] . ' or PID ' . $this->conf['pages'] . ' for document loading');
185
+            $this->logger->error('Invalid UID '.$this->piVars['id'].' or PID '.$this->conf['pages'].' for document loading');
186 186
         }
187 187
     }
188 188
 
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
         if (!$cache) {
236 236
             $conf['no_cache'] = true;
237 237
         }
238
-        $conf['parameter'] = $altPageId ?: ($this->pi_tmpPageId ?: 'current');
239
-        $conf['additionalParams'] = $this->conf['parent.']['addParams'] . HttpUtility::buildQueryString($urlParameters, '&', true) . $this->pi_moreParams;
238
+        $conf['parameter'] = $altPageId ? : ($this->pi_tmpPageId ? : 'current');
239
+        $conf['additionalParams'] = $this->conf['parent.']['addParams'].HttpUtility::buildQueryString($urlParameters, '&', true).$this->pi_moreParams;
240 240
         // Add additional configuration for absolute URLs.
241 241
         $conf['forceAbsoluteUrl'] = !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0;
242 242
         $conf['forceAbsoluteUrl.']['scheme'] = !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http';
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
     {
258 258
         if (!$this->frontendController->config['config']['disableWrapInBaseClass']) {
259 259
             // Use class name instead of $this->prefixId for content wrapping because $this->prefixId is the same for all plugins.
260
-            $content = '<div class="tx-dlf-' . strtolower(Helper::getUnqualifiedClassName(get_class($this))) . '">' . $content . '</div>';
260
+            $content = '<div class="tx-dlf-'.strtolower(Helper::getUnqualifiedClassName(get_class($this))).'">'.$content.'</div>';
261 261
             if (!$this->frontendController->config['config']['disablePrefixComment']) {
262
-                $content = "\n\n<!-- BEGIN: Content of extension '" . $this->extKey . "', plugin '" . Helper::getUnqualifiedClassName(get_class($this)) . "' -->\n\n" . $content . "\n\n<!-- END: Content of extension '" . $this->extKey . "', plugin '" . Helper::getUnqualifiedClassName(get_class($this)) . "' -->\n\n";
262
+                $content = "\n\n<!-- BEGIN: Content of extension '".$this->extKey."', plugin '".Helper::getUnqualifiedClassName(get_class($this))."' -->\n\n".$content."\n\n<!-- END: Content of extension '".$this->extKey."', plugin '".Helper::getUnqualifiedClassName(get_class($this))."' -->\n\n";
263 263
             }
264 264
         }
265 265
         return $content;
Please login to merge, or discard this patch.