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/ExpressionLanguage/DocumentTypeFunctionProvider.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
                 // Load document with current plugin parameters.
76 76
                 $doc = $this->loadDocument($queryParams[$this->prefixId]);
77
-                if ($doc === null) {
77
+                if ($doc === NULL) {
78 78
                     return $type;
79 79
                 }
80 80
                 // Set PID for metadata definitions.
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                     // Calendar plugin does not support IIIF (yet). Abort for all newspaper related types.
86 86
                     if (
87 87
                         $doc instanceof IiifManifest
88
-                        && array_search($metadata['type'][0], ['newspaper', 'ephemera', 'year', 'issue']) !== false
88
+                        && array_search($metadata['type'][0], ['newspaper', 'ephemera', 'year', 'issue']) !== FALSE
89 89
                     ) {
90 90
                         return $type;
91 91
                     }
Please login to merge, or discard this patch.
Classes/Hooks/UserFunc.php 2 patches
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.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
  * @subpackage dlf
31 31
  * @access public
32 32
  */
33
-class UserFunc implements LoggerAwareInterface
34
-{
33
+class UserFunc implements LoggerAwareInterface {
35 34
     use LoggerAwareTrait;
36 35
 
37 36
     /**
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
      *
54 53
      * @return string HTML <img> tag for thumbnail
55 54
      */
56
-    public function displayThumbnail(&$params)
57
-    {
55
+    public function displayThumbnail(&$params) {
58 56
         // Simulate TCA field type "passthrough".
59 57
         $output = '<input type="hidden" name="' . $params['itemFormElName'] . '" value="' . $params['itemFormElValue'] . '" />';
60 58
         if (!empty($params['itemFormElValue'])) {
Please login to merge, or discard this patch.
Classes/Hooks/ConfigurationForm.php 2 patches
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 ConfigurationForm
32
-{
31
+class ConfigurationForm {
33 32
     /**
34 33
      * This holds the current configuration
35 34
      *
@@ -45,8 +44,7 @@  discard block
 block discarded – undo
45 44
      *
46 45
      * @return string Message informing the user of success or failure
47 46
      */
48
-    public function checkSolrConnection()
49
-    {
47
+    public function checkSolrConnection() {
50 48
         $solr = Solr::getInstance();
51 49
         if ($solr->ready) {
52 50
             Helper::addMessage(
@@ -71,8 +69,7 @@  discard block
 block discarded – undo
71 69
      *
72 70
      * @return string Message informing the user of success or failure
73 71
      */
74
-    public function checkMetadataFormats()
75
-    {
72
+    public function checkMetadataFormats() {
76 73
         // We need to do some bootstrapping manually as of TYPO3 9.
77 74
         // Load table configuration array into $GLOBALS['TCA'].
78 75
         ExtensionManagementUtility::loadBaseTca(false);
@@ -201,8 +198,7 @@  discard block
 block discarded – undo
201 198
      *
202 199
      * @return void
203 200
      */
204
-    public function __construct()
205
-    {
201
+    public function __construct() {
206 202
         // Load localization file.
207 203
         $GLOBALS['LANG']->includeLLFile('EXT:dlf/Resources/Private/Language/FlashMessages.xml');
208 204
         // Get current configuration.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -75,21 +75,21 @@  discard block
 block discarded – undo
75 75
     {
76 76
         // We need to do some bootstrapping manually as of TYPO3 9.
77 77
         // Load table configuration array into $GLOBALS['TCA'].
78
-        ExtensionManagementUtility::loadBaseTca(false);
78
+        ExtensionManagementUtility::loadBaseTca(FALSE);
79 79
         // Get extension configuration from dlf/ext_localconf.php.
80
-        ExtensionManagementUtility::loadExtLocalconf(false);
80
+        ExtensionManagementUtility::loadExtLocalconf(FALSE);
81 81
         // Initialize backend user into $GLOBALS['BE_USER'].
82 82
         Bootstrap::initializeBackendUser();
83 83
         // Initialize backend and ensure authenticated access.
84 84
         Bootstrap::initializeBackendAuthentication();
85 85
 
86 86
         $nsDefined = [
87
-            'MODS' => false,
88
-            'TEIHDR' => false,
89
-            'ALTO' => false,
90
-            'IIIF1' => false,
91
-            'IIIF2' => false,
92
-            'IIIF3' => false
87
+            'MODS' => FALSE,
88
+            'TEIHDR' => FALSE,
89
+            'ALTO' => FALSE,
90
+            'IIIF1' => FALSE,
91
+            'IIIF2' => FALSE,
92
+            'IIIF3' => FALSE
93 93
         ];
94 94
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
95 95
             ->getQueryBuilderForTable('tx_dlf_formats');
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             ->execute();
105 105
 
106 106
         while ($resArray = $result->fetch()) {
107
-            $nsDefined[$resArray['type']] = true;
107
+            $nsDefined[$resArray['type']] = TRUE;
108 108
         }
109 109
         // Build data array.
110 110
         $data = [];
Please login to merge, or discard this patch.
Classes/Common/AbstractPlugin.php 3 patches
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.
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @access public
30 30
  * @abstract
31 31
  */
32
-abstract class AbstractPlugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin implements LoggerAwareInterface
33
-{
32
+abstract class AbstractPlugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin implements LoggerAwareInterface {
34 33
     use LoggerAwareTrait;
35 34
 
36 35
     public $extKey = 'dlf';
@@ -73,8 +72,7 @@  discard block
 block discarded – undo
73 72
      *
74 73
      * @return void
75 74
      */
76
-    protected function getTemplate($part = '###TEMPLATE###')
77
-    {
75
+    protected function getTemplate($part = '###TEMPLATE###') {
78 76
         $this->templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class);
79 77
         if (!empty($this->conf['templateFile'])) {
80 78
             // Load template file from configuration.
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
      *
99 97
      * @return void
100 98
      */
101
-    protected function init(array $conf)
102
-    {
99
+    protected function init(array $conf) {
103 100
         // Read FlexForm configuration.
104 101
         $flexFormConf = [];
105 102
         $this->cObj->readFlexformIntoConf($this->cObj->data['pi_flexform'], $flexFormConf);
@@ -137,8 +134,7 @@  discard block
 block discarded – undo
137 134
      *
138 135
      * @return void
139 136
      */
140
-    protected function loadDocument()
141
-    {
137
+    protected function loadDocument() {
142 138
         // Check for required variable.
143 139
         if (
144 140
             !empty($this->piVars['id'])
@@ -209,8 +205,7 @@  discard block
 block discarded – undo
209 205
      *
210 206
      * @return array The resulting typoscript array
211 207
      */
212
-    protected function parseTS($string = '')
213
-    {
208
+    protected function parseTS($string = '') {
214 209
         $parser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
215 210
         $parser->parse($string);
216 211
         return $parser->setup;
@@ -229,8 +224,7 @@  discard block
 block discarded – undo
229 224
      *
230 225
      * @return string The input string wrapped in <a> tags
231 226
      */
232
-    public function pi_linkTP($str, $urlParameters = [], $cache = false, $altPageId = 0)
233
-    {
227
+    public function pi_linkTP($str, $urlParameters = [], $cache = false, $altPageId = 0) {
234 228
         $conf = [];
235 229
         if (!$cache) {
236 230
             $conf['no_cache'] = true;
@@ -253,8 +247,7 @@  discard block
 block discarded – undo
253 247
      *
254 248
      * @return string HTML content wrapped, ready to return to the parent object.
255 249
      */
256
-    public function pi_wrapInBaseClass($content)
257
-    {
250
+    public function pi_wrapInBaseClass($content) {
258 251
         if (!$this->frontendController->config['config']['disableWrapInBaseClass']) {
259 252
             // Use class name instead of $this->prefixId for content wrapping because $this->prefixId is the same for all plugins.
260 253
             $content = '<div class="tx-dlf-' . strtolower(Helper::getUnqualifiedClassName(get_class($this))) . '">' . $content . '</div>';
@@ -274,8 +267,7 @@  discard block
 block discarded – undo
274 267
      *
275 268
      * @return void
276 269
      */
277
-    protected function setCache($cache = true)
278
-    {
270
+    protected function setCache($cache = true) {
279 271
         if ($cache) {
280 272
             // Set cObject type to "USER" (default).
281 273
             $this->pi_USER_INT_obj = false;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
     public $prefixId = 'tx_dlf';
38 38
     public $scriptRelPath = 'Classes/Common/AbstractPlugin.php';
39 39
     // Plugins are cached by default (@see setCache()).
40
-    public $pi_USER_INT_obj = false;
41
-    public $pi_checkCHash = true;
40
+    public $pi_USER_INT_obj = FALSE;
41
+    public $pi_checkCHash = TRUE;
42 42
 
43 43
     /**
44 44
      * This holds the current document
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             $this->doc = Document::getInstance($this->piVars['id'], $pid);
151 151
             if (!$this->doc->ready) {
152 152
                 // Destroy the incomplete object.
153
-                $this->doc = null;
153
+                $this->doc = NULL;
154 154
                 $this->logger->error('Failed to load document with UID ' . $this->piVars['id']);
155 155
             } else {
156 156
                 // Set configuration PID.
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
      *
230 230
      * @return string The input string wrapped in <a> tags
231 231
      */
232
-    public function pi_linkTP($str, $urlParameters = [], $cache = false, $altPageId = 0)
232
+    public function pi_linkTP($str, $urlParameters = [], $cache = FALSE, $altPageId = 0)
233 233
     {
234 234
         $conf = [];
235 235
         if (!$cache) {
236
-            $conf['no_cache'] = true;
236
+            $conf['no_cache'] = TRUE;
237 237
         }
238 238
         $conf['parameter'] = $altPageId ?: ($this->pi_tmpPageId ?: 'current');
239
-        $conf['additionalParams'] = $this->conf['parent.']['addParams'] . HttpUtility::buildQueryString($urlParameters, '&', true) . $this->pi_moreParams;
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';
@@ -274,20 +274,20 @@  discard block
 block discarded – undo
274 274
      *
275 275
      * @return void
276 276
      */
277
-    protected function setCache($cache = true)
277
+    protected function setCache($cache = TRUE)
278 278
     {
279 279
         if ($cache) {
280 280
             // Set cObject type to "USER" (default).
281
-            $this->pi_USER_INT_obj = false;
282
-            $this->pi_checkCHash = true;
281
+            $this->pi_USER_INT_obj = FALSE;
282
+            $this->pi_checkCHash = TRUE;
283 283
             if (count($this->piVars)) {
284 284
                 // Check cHash or disable caching.
285 285
                 $GLOBALS['TSFE']->reqCHash();
286 286
             }
287 287
         } else {
288 288
             // Set cObject type to "USER_INT".
289
-            $this->pi_USER_INT_obj = true;
290
-            $this->pi_checkCHash = false;
289
+            $this->pi_USER_INT_obj = TRUE;
290
+            $this->pi_checkCHash = FALSE;
291 291
             // Plugins are of type "USER" by default, so convert it to "USER_INT".
292 292
             $this->cObj->convertToUserIntObject();
293 293
         }
Please login to merge, or discard this patch.