Passed
Pull Request — master (#87)
by Alexander
02:55
created
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
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.
Spacing   +10 added lines, -10 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
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 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';
@@ -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.
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.
Classes/Common/SolrSearchResult/Region.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  * @subpackage dlf
21 21
  * @access public
22 22
  */
23
-class Region
24
-{
23
+class Region {
25 24
 
26 25
     /**
27 26
      * The identifier of the region
@@ -105,8 +104,7 @@  discard block
 block discarded – undo
105 104
      *
106 105
      * @return void
107 106
      */
108
-    public function __construct($id, $region)
109
-    {
107
+    public function __construct($id, $region) {
110 108
         $this->id = $id;
111 109
         $this->pageId = $region['pageIdx'];
112 110
         $this->xBeginPosition = $region['ulx'];
@@ -125,8 +123,7 @@  discard block
 block discarded – undo
125 123
      *
126 124
      * @return int The region's identifier
127 125
      */
128
-    public function getId()
129
-    {
126
+    public function getId() {
130 127
         return $this->id;
131 128
     }
132 129
 
@@ -137,8 +134,7 @@  discard block
 block discarded – undo
137 134
      *
138 135
      * @return int The region's page identifier
139 136
      */
140
-    public function getPageId()
141
-    {
137
+    public function getPageId() {
142 138
         return $this->pageId;
143 139
     }
144 140
 
@@ -149,8 +145,7 @@  discard block
 block discarded – undo
149 145
      *
150 146
      * @return int The region's horizontal beginning position
151 147
      */
152
-    public function getXBeginPosition()
153
-    {
148
+    public function getXBeginPosition() {
154 149
         return $this->xBeginPosition;
155 150
     }
156 151
 
@@ -161,8 +156,7 @@  discard block
 block discarded – undo
161 156
      *
162 157
      * @return int The region's horizontal ending position
163 158
      */
164
-    public function getXEndPosition()
165
-    {
159
+    public function getXEndPosition() {
166 160
         return $this->xEndPosition;
167 161
     }
168 162
 
@@ -173,8 +167,7 @@  discard block
 block discarded – undo
173 167
      *
174 168
      * @return int The region's vertical beginning position
175 169
      */
176
-    public function getYBeginPosition()
177
-    {
170
+    public function getYBeginPosition() {
178 171
         return $this->yBeginPosition;
179 172
     }
180 173
 
@@ -185,8 +178,7 @@  discard block
 block discarded – undo
185 178
      *
186 179
      * @return int The region's vertical ending position
187 180
      */
188
-    public function getYEndPosition()
189
-    {
181
+    public function getYEndPosition() {
190 182
         return $this->yEndPosition;
191 183
     }
192 184
 
@@ -197,8 +189,7 @@  discard block
 block discarded – undo
197 189
      *
198 190
      * @return int The region's width
199 191
      */
200
-    public function getWidth()
201
-    {
192
+    public function getWidth() {
202 193
         return $this->width;
203 194
     }
204 195
 
@@ -209,8 +200,7 @@  discard block
 block discarded – undo
209 200
      *
210 201
      * @return int The region's height
211 202
      */
212
-    public function getHeight()
213
-    {
203
+    public function getHeight() {
214 204
         return $this->height;
215 205
     }
216 206
 
@@ -221,8 +211,7 @@  discard block
 block discarded – undo
221 211
      *
222 212
      * @return string The region's text
223 213
      */
224
-    public function getText()
225
-    {
214
+    public function getText() {
226 215
         return $this->text;
227 216
     }
228 217
 }
Please login to merge, or discard this patch.
Classes/Common/SolrSearchResult/Page.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  * @subpackage dlf
21 21
  * @access public
22 22
  */
23
-class Page
24
-{
23
+class Page {
25 24
 
26 25
     /**
27 26
      * The identifier of the page
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
      *
66 65
      * @return void
67 66
      */
68
-    public function __construct($id, $page)
69
-    {
67
+    public function __construct($id, $page) {
70 68
         $this->id = $id;
71 69
         $this->name = $page['id'];
72 70
         $this->width = $page['width'];
@@ -80,8 +78,7 @@  discard block
 block discarded – undo
80 78
      *
81 79
      * @return int The page's identifier
82 80
      */
83
-    public function getId()
84
-    {
81
+    public function getId() {
85 82
         return $this->id;
86 83
     }
87 84
 
@@ -92,8 +89,7 @@  discard block
 block discarded – undo
92 89
      *
93 90
      * @return string The page's name
94 91
      */
95
-    public function getName()
96
-    {
92
+    public function getName() {
97 93
         return $this->name;
98 94
     }
99 95
 
@@ -104,8 +100,7 @@  discard block
 block discarded – undo
104 100
      *
105 101
      * @return int The page's width
106 102
      */
107
-    public function getWidth()
108
-    {
103
+    public function getWidth() {
109 104
         return $this->width;
110 105
     }
111 106
 
@@ -116,8 +111,7 @@  discard block
 block discarded – undo
116 111
      *
117 112
      * @return int The page's height
118 113
      */
119
-    public function getHeight()
120
-    {
114
+    public function getHeight() {
121 115
         return $this->height;
122 116
     }
123 117
 }
Please login to merge, or discard this patch.
Classes/Plugin/Eid/SearchSuggest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,16 +28,14 @@
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class SearchSuggest
32
-{
31
+class SearchSuggest {
33 32
     /**
34 33
      * The main method of the eID script
35 34
      *
36 35
      *  @param ServerRequestInterface $request
37 36
      * @return ResponseInterface XML response of search suggestions
38 37
      */
39
-    public function main(ServerRequestInterface $request)
40
-    {
38
+    public function main(ServerRequestInterface $request) {
41 39
         $output = [];
42 40
         // Get input parameters and decrypt core name.
43 41
         $parameters = $request->getParsedBody();
Please login to merge, or discard this patch.
Classes/Command/BaseCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class BaseCommand extends Command
30
-{
29
+class BaseCommand extends Command {
31 30
     /**
32 31
      * Return starting point for indexing command.
33 32
      *
Please login to merge, or discard this patch.
Classes/Command/ReindexCommand.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,15 +32,13 @@  discard block
 block discarded – undo
32 32
  * @subpackage dlf
33 33
  * @access public
34 34
  */
35
-class ReindexCommand extends BaseCommand
36
-{
35
+class ReindexCommand extends BaseCommand {
37 36
     /**
38 37
      * Configure the command by defining the name, options and arguments
39 38
      *
40 39
      * @return void
41 40
      */
42
-    public function configure()
43
-    {
41
+    public function configure() {
44 42
         $this
45 43
             ->setDescription('Reindex a collection into database and Solr.')
46 44
             ->setHelp('')
@@ -84,8 +82,7 @@  discard block
 block discarded – undo
84 82
      *
85 83
      * @return void
86 84
      */
87
-    protected function execute(InputInterface $input, OutputInterface $output)
88
-    {
85
+    protected function execute(InputInterface $input, OutputInterface $output) {
89 86
         // Make sure the _cli_ user is loaded
90 87
         Bootstrap::getInstance()->initializeBackendAuthentication();
91 88
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $startingPoint = $this->getStartingPoint($input->getOption('pid'));
104 104
 
105 105
         if ($startingPoint == 0) {
106
-            $io->error('ERROR: No valid PID (' . $startingPoint . ') given.');
106
+            $io->error('ERROR: No valid PID ('.$startingPoint.') given.');
107 107
             exit(1);
108 108
         }
109 109
 
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
119 119
                 $output_solrCores = [];
120 120
                 foreach ($allSolrCores as $index_name => $uid) {
121
-                    $output_solrCores[] = $uid . ' : ' . $index_name;
121
+                    $output_solrCores[] = $uid.' : '.$index_name;
122 122
                 }
123 123
                 if (empty($output_solrCores)) {
124
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $startingPoint . ".\n");
124
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$startingPoint.".\n");
125 125
                     exit(1);
126 126
                 } else {
127
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
127
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n");
128 128
                     exit(1);
129 129
                 }
130 130
             }
@@ -165,18 +165,18 @@  discard block
 block discarded – undo
165 165
             $doc = Document::getInstance($document, $startingPoint, true);
166 166
             if ($doc->ready) {
167 167
                 if ($dryRun) {
168
-                    $io->writeln('DRY RUN: Would index ' . $id . '/' . count($documents) . ' ' . $doc->uid . ' ("' . $doc->location . '") on PID ' . $startingPoint . ' and Solr core ' . $solrCoreUid . '.');
168
+                    $io->writeln('DRY RUN: Would index '.$id.'/'.count($documents).' '.$doc->uid.' ("'.$doc->location.'") on PID '.$startingPoint.' and Solr core '.$solrCoreUid.'.');
169 169
                 } else {
170 170
                     if ($io->isVerbose()) {
171
-                        $io->writeln(date('Y-m-d H:i:s') . ' Indexing ' . $id . '/' . count($documents) . ' ' . $doc->uid . ' ("' . $doc->location . '") on PID ' . $startingPoint . ' and Solr core ' . $solrCoreUid . '.');
171
+                        $io->writeln(date('Y-m-d H:i:s').' Indexing '.$id.'/'.count($documents).' '.$doc->uid.' ("'.$doc->location.'") on PID '.$startingPoint.' and Solr core '.$solrCoreUid.'.');
172 172
                     }
173 173
                     // ...and save it to the database...
174 174
                     if (!$doc->save($startingPoint, $solrCoreUid, $owner)) {
175
-                        $io->error('ERROR: Document "' . $id . '" not saved and indexed.');
175
+                        $io->error('ERROR: Document "'.$id.'" not saved and indexed.');
176 176
                     }
177 177
                 }
178 178
             } else {
179
-                $io->error('ERROR: Document "' . $id . '" could not be loaded.');
179
+                $io->error('ERROR: Document "'.$id.'" could not be loaded.');
180 180
             }
181 181
             // Clear document registry to prevent memory exhaustion.
182 182
             Document::clearRegistry();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             ->setHelp('')
47 47
             ->addOption(
48 48
                 'dry-run',
49
-                null,
49
+                NULL,
50 50
                 InputOption::VALUE_NONE,
51 51
                 'If this option is set, the files will not actually be processed but the location URI is shown.'
52 52
             )
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         // Make sure the _cli_ user is loaded
96 96
         Bootstrap::getInstance()->initializeBackendAuthentication();
97 97
 
98
-        $dryRun = $input->getOption('dry-run') != false ? true : false;
98
+        $dryRun = $input->getOption('dry-run') != FALSE ? TRUE : FALSE;
99 99
 
100 100
         $io = new SymfonyStyle($input, $output);
101 101
         $io->title($this->getDescription());
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 $owner = (string) $input->getOption('owner');
141 141
             }
142 142
         } else {
143
-            $owner = null;
143
+            $owner = NULL;
144 144
         }
145 145
 
146 146
         if (!empty($input->getOption('all'))) {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             && !is_array($input->getOption('coll'))
152 152
         ) {
153 153
             // "coll" may be a single integer or a comma-separated list of integers.
154
-            if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), true)))) {
154
+            if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), TRUE)))) {
155 155
                 $io->error('ERROR: Parameter --coll|-c is not a valid comma-separated list of collection UIDs.');
156 156
                 exit(1);
157 157
             }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         }
163 163
 
164 164
         foreach ($documents as $id => $document) {
165
-            $doc = Document::getInstance($document, $startingPoint, true);
165
+            $doc = Document::getInstance($document, $startingPoint, TRUE);
166 166
             if ($doc->ready) {
167 167
                 if ($dryRun) {
168 168
                     $io->writeln('DRY RUN: Would index ' . $id . '/' . count($documents) . ' ' . $doc->uid . ' ("' . $doc->location . '") on PID ' . $startingPoint . ' and Solr core ' . $solrCoreUid . '.');
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                     $queryBuilder->expr()->in(
226 226
                         'tx_dlf_collections_join.uid',
227 227
                         $queryBuilder->createNamedParameter(
228
-                            GeneralUtility::intExplode(',', $collIds, true),
228
+                            GeneralUtility::intExplode(',', $collIds, TRUE),
229 229
                             Connection::PARAM_INT_ARRAY
230 230
                         )
231 231
                     ),
Please login to merge, or discard this patch.
Classes/Command/IndexCommand.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,15 +31,13 @@  discard block
 block discarded – undo
31 31
  * @subpackage dlf
32 32
  * @access public
33 33
  */
34
-class IndexCommand extends BaseCommand
35
-{
34
+class IndexCommand extends BaseCommand {
36 35
     /**
37 36
      * Configure the command by defining the name, options and arguments
38 37
      *
39 38
      * @return void
40 39
      */
41
-    public function configure()
42
-    {
40
+    public function configure() {
43 41
         $this
44 42
             ->setDescription('Index single document into database and Solr.')
45 43
             ->setHelp('')
@@ -77,8 +75,7 @@  discard block
 block discarded – undo
77 75
      *
78 76
      * @return void
79 77
      */
80
-    protected function execute(InputInterface $input, OutputInterface $output)
81
-    {
78
+    protected function execute(InputInterface $input, OutputInterface $output) {
82 79
         // Make sure the _cli_ user is loaded
83 80
         Bootstrap::getInstance()->initializeBackendAuthentication();
84 81
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $startingPoint = $this->getStartingPoint($input->getOption('pid'));
96 96
 
97 97
         if ($startingPoint == 0) {
98
-            $io->error('ERROR: No valid PID (' . $startingPoint . ') given.');
98
+            $io->error('ERROR: No valid PID ('.$startingPoint.') given.');
99 99
             exit(1);
100 100
         }
101 101
 
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
111 111
                 $output_solrCores = [];
112 112
                 foreach ($allSolrCores as $index_name => $uid) {
113
-                    $output_solrCores[] = $uid . ' : ' . $index_name;
113
+                    $output_solrCores[] = $uid.' : '.$index_name;
114 114
                 }
115 115
                 if (empty($output_solrCores)) {
116
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $startingPoint . ".\n");
116
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. No valid cores found on PID '.$startingPoint.".\n");
117 117
                     exit(1);
118 118
                 } else {
119
-                    $io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
119
+                    $io->error('ERROR: No valid Solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".implode("\n", $output_solrCores)."\n");
120 120
                     exit(1);
121 121
                 }
122 122
             }
@@ -151,19 +151,19 @@  discard block
 block discarded – undo
151 151
         $doc = Document::getInstance($input->getOption('doc'), $startingPoint, true);
152 152
         if ($doc->ready) {
153 153
             if ($dryRun) {
154
-                $io->section('DRY RUN: Would index ' . $doc->uid . ' ("' . $doc->location . '") on PID ' . $startingPoint . ' and Solr core ' . $solrCoreUid . '.');
154
+                $io->section('DRY RUN: Would index '.$doc->uid.' ("'.$doc->location.'") on PID '.$startingPoint.' and Solr core '.$solrCoreUid.'.');
155 155
             } else {
156 156
                 if ($io->isVerbose()) {
157
-                    $io->section('Indexing ' . $doc->uid . ' ("' . $doc->location . '") on PID ' . $startingPoint . ' and Solr core ' . $solrCoreUid . '.');
157
+                    $io->section('Indexing '.$doc->uid.' ("'.$doc->location.'") on PID '.$startingPoint.' and Solr core '.$solrCoreUid.'.');
158 158
                 }
159 159
                 // ...and save it to the database...
160 160
                 if (!$doc->save($startingPoint, $solrCoreUid, $owner)) {
161
-                    $io->error('ERROR: Document "' . $input->getOption('doc') . '" not saved and indexed.');
161
+                    $io->error('ERROR: Document "'.$input->getOption('doc').'" not saved and indexed.');
162 162
                     exit(1);
163 163
                 }
164 164
             }
165 165
         } else {
166
-            $io->error('ERROR: Document "' . $input->getOption('doc') . '" could not be loaded.');
166
+            $io->error('ERROR: Document "'.$input->getOption('doc').'" could not be loaded.');
167 167
             exit(1);
168 168
         }
169 169
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             ->setHelp('')
45 45
             ->addOption(
46 46
                 'dry-run',
47
-                null,
47
+                NULL,
48 48
                 InputOption::VALUE_NONE,
49 49
                 'If this option is set, the files will not actually be processed but the location URI is shown.'
50 50
             )
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         // Make sure the _cli_ user is loaded
88 88
         Bootstrap::getInstance()->initializeBackendAuthentication();
89 89
 
90
-        $dryRun = $input->getOption('dry-run') != false ? true : false;
90
+        $dryRun = $input->getOption('dry-run') != FALSE ? TRUE : FALSE;
91 91
 
92 92
         $io = new SymfonyStyle($input, $output);
93 93
         $io->title($this->getDescription());
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
                 $owner = (string) $input->getOption('owner');
145 145
             }
146 146
         } else {
147
-            $owner = null;
147
+            $owner = NULL;
148 148
         }
149 149
 
150 150
         // Get the document...
151
-        $doc = Document::getInstance($input->getOption('doc'), $startingPoint, true);
151
+        $doc = Document::getInstance($input->getOption('doc'), $startingPoint, TRUE);
152 152
         if ($doc->ready) {
153 153
             if ($dryRun) {
154 154
                 $io->section('DRY RUN: Would index ' . $doc->uid . ' ("' . $doc->location . '") on PID ' . $startingPoint . ' and Solr core ' . $solrCoreUid . '.');
Please login to merge, or discard this patch.