Completed
Push — master ( e2d2d8...1e45e0 )
by
unknown
48s queued 45s
created
Classes/Domain/Repository/MailRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
 class MailRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
19 19
 {
20 20
 
21
-    public function findAllWithPid($pid)
22
-    {
21
+    public function findAllWithPid($pid) {
23 22
         /** @var Typo3QuerySettings $querySettings */
24 23
         $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
25 24
 
Please login to merge, or discard this patch.
Classes/Domain/Model/Metadata.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -109,14 +109,12 @@  discard block
 block discarded – undo
109 109
     /**
110 110
      * constructor
111 111
      */
112
-    public function __construct()
113
-    {
112
+    public function __construct() {
114 113
         // Do not remove the next line: It would break the functionality
115 114
         $this->initStorageObjects();
116 115
     }
117 116
 
118
-    protected function initStorageObjects()
119
-    {
117
+    protected function initStorageObjects() {
120 118
         $this->format = new ObjectStorage();
121 119
     }
122 120
 
@@ -187,8 +185,7 @@  discard block
 block discarded – undo
187 185
     /**
188 186
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\MetadataFormat> $format
189 187
      */
190
-    public function getFormat()
191
-    {
188
+    public function getFormat() {
192 189
         return $this->format;
193 190
     }
194 191
 
@@ -207,8 +204,7 @@  discard block
 block discarded – undo
207 204
      *
208 205
      * @return void
209 206
      */
210
-    public function addFormat(MetadataFormat $format)
211
-    {
207
+    public function addFormat(MetadataFormat $format) {
212 208
         $this->format->attach($format);
213 209
     }
214 210
 
@@ -219,8 +215,7 @@  discard block
 block discarded – undo
219 215
      *
220 216
      * @return void
221 217
      */
222
-    public function removeFormat(MetadataFormat $formatToRemove)
223
-    {
218
+    public function removeFormat(MetadataFormat $formatToRemove) {
224 219
         $this->format->detach($formatToRemove);
225 220
     }
226 221
 
Please login to merge, or discard this patch.
Classes/Format/TeiHeader.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
      *
33 33
      * @return void
34 34
      */
35
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata)
36
-    {
35
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
37 36
         $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0');
38 37
     }
39 38
 }
Please login to merge, or discard this patch.
Classes/Controller/Backend/NewTenantController.php 3 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     public function addFormatAction()
159 159
     {
160 160
         // Include formats definition file.
161
-        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php');
161
+        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/FormatDefaults.php');
162 162
 
163 163
         $frameworkConfiguration = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FRAMEWORK);
164 164
         // tx_dlf_formats are stored on PID = 0
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     public function addMetadataAction()
197 197
     {
198 198
         // Include metadata definition file.
199
-        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
199
+        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/MetadataDefaults.php');
200 200
 
201 201
         $doPersist = false;
202 202
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             if ($this->metadataRepository->findOneByIndexName($indexName) === null) {
209 209
 
210 210
                 $newRecord = GeneralUtility::makeInstance(Metadata::class);
211
-                $newRecord->setLabel($this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels));
211
+                $newRecord->setLabel($this->getLLL('metadata.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels));
212 212
                 $newRecord->setIndexName($indexName);
213 213
                 $newRecord->setDefaultValue($values['default_value']);
214 214
                 $newRecord->setWrap($values['wrap'] ? : $GLOBALS['TCA']['tx_dlf_metadata']['columns']['wrap']['config']['default']);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                     $translatedRecord = GeneralUtility::makeInstance(Metadata::class);
244 244
                     $translatedRecord->setL18nParent($newRecord);
245 245
                     $translatedRecord->_setProperty('_languageUid', $siteLanguage->getLanguageId());
246
-                    $translatedRecord->setLabel($this->getLLL('metadata.' . $indexName, $siteLanguage->getTypo3Language(), $metadataLabels));
246
+                    $translatedRecord->setLabel($this->getLLL('metadata.'.$indexName, $siteLanguage->getTypo3Language(), $metadataLabels));
247 247
                     $translatedRecord->setIndexName($indexName);
248 248
                     $translatedRecord->setWrap($newRecord->getWrap());
249 249
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 
278 278
         if ($this->solrCoreRepository->findOneByPid($this->pid) === null) {
279 279
             $newRecord = GeneralUtility::makeInstance(SolrCore::class);
280
-            $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')');
280
+            $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels).' (PID '.$this->pid.')');
281 281
             $indexName = Solr::createCore('');
282 282
             $newRecord->setIndexName($indexName);
283 283
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     public function addStructureAction()
302 302
     {
303 303
         // Include structure definition file.
304
-        $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
304
+        $structureDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/StructureDefaults.php');
305 305
 
306 306
         $doPersist = false;
307 307
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             // if default format record is not found, add it to the repository
313 313
             if ($this->structureRepository->findOneByIndexName($indexName) === null) {
314 314
                 $newRecord = GeneralUtility::makeInstance(Structure::class);
315
-                $newRecord->setLabel($this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels));
315
+                $newRecord->setLabel($this->getLLL('structure.'.$indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels));
316 316
                 $newRecord->setIndexName($indexName);
317 317
                 $newRecord->setToplevel($values['toplevel']);
318 318
                 $newRecord->setOaiName($values['oai_name']);
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                     $translatedRecord = GeneralUtility::makeInstance(Structure::class);
327 327
                     $translatedRecord->setL18nParent($newRecord);
328 328
                     $translatedRecord->_setProperty('_languageUid', $siteLanguage->getLanguageId());
329
-                    $translatedRecord->setLabel($this->getLLL('structure.' . $indexName, $siteLanguage->getTypo3Language(), $structLabels));
329
+                    $translatedRecord->setLabel($this->getLLL('structure.'.$indexName, $siteLanguage->getTypo3Language(), $structLabels));
330 330
                     $translatedRecord->setIndexName($indexName);
331 331
 
332 332
                     $this->structureRepository->add($translatedRecord);
@@ -378,15 +378,15 @@  discard block
 block discarded – undo
378 378
             $this->forward('error');
379 379
         }
380 380
 
381
-        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php');
381
+        $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/FormatDefaults.php');
382 382
         $recordInfos['formats']['numCurrent'] = $this->formatRepository->countAll();
383 383
         $recordInfos['formats']['numDefault'] = count($formatsDefaults);
384 384
 
385
-        $structuresDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
385
+        $structuresDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/StructureDefaults.php');
386 386
         $recordInfos['structures']['numCurrent'] = $this->structureRepository->countByPid($this->pid);
387 387
         $recordInfos['structures']['numDefault'] = count($structuresDefaults);
388 388
 
389
-        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
389
+        $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf').'Resources/Private/Data/MetadataDefaults.php');
390 390
         $recordInfos['metadata']['numCurrent'] = $this->metadataRepository->countByPid($this->pid);
391 391
         $recordInfos['metadata']['numDefault'] = count($metadataDefaults);
392 392
 
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@  discard block
 block discarded – undo
44 44
  * @subpackage dlf
45 45
  * @access public
46 46
  */
47
-class NewTenantController extends AbstractController
48
-{
47
+class NewTenantController extends AbstractController {
49 48
     /**
50 49
      * @var int
51 50
      */
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
     /**
86 85
      * @param FormatRepository $formatRepository
87 86
      */
88
-    public function injectFormatRepository(FormatRepository $formatRepository)
89
-    {
87
+    public function injectFormatRepository(FormatRepository $formatRepository) {
90 88
         $this->formatRepository = $formatRepository;
91 89
     }
92 90
 
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
     /**
99 97
      * @param MetadataRepository $metadataRepository
100 98
      */
101
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
102
-    {
99
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
103 100
         $this->metadataRepository = $metadataRepository;
104 101
     }
105 102
 
@@ -111,8 +108,7 @@  discard block
 block discarded – undo
111 108
     /**
112 109
      * @param StructureRepository $structureRepository
113 110
      */
114
-    public function injectStructureRepository(StructureRepository $structureRepository)
115
-    {
111
+    public function injectStructureRepository(StructureRepository $structureRepository) {
116 112
         $this->structureRepository = $structureRepository;
117 113
     }
118 114
 
@@ -124,8 +120,7 @@  discard block
 block discarded – undo
124 120
     /**
125 121
      * @param SolrCoreRepository $solrCoreRepository
126 122
      */
127
-    public function injectSolrCoreRepository(SolrCoreRepository $solrCoreRepository)
128
-    {
123
+    public function injectSolrCoreRepository(SolrCoreRepository $solrCoreRepository) {
129 124
         $this->solrCoreRepository = $solrCoreRepository;
130 125
     }
131 126
 
@@ -133,8 +128,7 @@  discard block
 block discarded – undo
133 128
      * Initialization for all actions
134 129
      *
135 130
      */
136
-    protected function initializeAction()
137
-    {
131
+    protected function initializeAction() {
138 132
         $this->pid = (int) GeneralUtility::_GP('id');
139 133
 
140 134
         $frameworkConfiguration = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FRAMEWORK);
@@ -155,8 +149,7 @@  discard block
 block discarded – undo
155 149
     /**
156 150
      * Action adding formats records
157 151
      */
158
-    public function addFormatAction()
159
-    {
152
+    public function addFormatAction() {
160 153
         // Include formats definition file.
161 154
         $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php');
162 155
 
@@ -193,8 +186,7 @@  discard block
 block discarded – undo
193 186
     /**
194 187
      * Action adding metadata records
195 188
      */
196
-    public function addMetadataAction()
197
-    {
189
+    public function addMetadataAction() {
198 190
         // Include metadata definition file.
199 191
         $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
200 192
 
@@ -268,8 +260,7 @@  discard block
 block discarded – undo
268 260
     /**
269 261
      * Action adding Solr core records
270 262
      */
271
-    public function addSolrCoreAction()
272
-    {
263
+    public function addSolrCoreAction() {
273 264
         $doPersist = false;
274 265
 
275 266
         // load language file in own array
@@ -298,8 +289,7 @@  discard block
 block discarded – undo
298 289
     /**
299 290
      * Action adding structure records
300 291
      */
301
-    public function addStructureAction()
302
-    {
292
+    public function addStructureAction() {
303 293
         // Include structure definition file.
304 294
         $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
305 295
 
@@ -351,8 +341,7 @@  discard block
 block discarded – undo
351 341
      * @param ViewInterface $view
352 342
      * @return void
353 343
      */
354
-    protected function initializeView(ViewInterface $view)
355
-    {
344
+    protected function initializeView(ViewInterface $view) {
356 345
         /** @var BackendTemplateView $view */
357 346
         parent::initializeView($view);
358 347
         if ($this->actionMethodName == 'indexAction') {
@@ -370,8 +359,7 @@  discard block
 block discarded – undo
370 359
      * @access public
371 360
      *
372 361
      */
373
-    public function indexAction()
374
-    {
362
+    public function indexAction() {
375 363
         $recordInfos = [];
376 364
 
377 365
         if ($this->pageInfo['doktype'] != 254) {
@@ -401,8 +389,7 @@  discard block
 block discarded – undo
401 389
      * @access public
402 390
      *
403 391
      */
404
-    public function errorAction()
405
-    {
392
+    public function errorAction() {
406 393
     }
407 394
 
408 395
     /**
@@ -414,8 +401,7 @@  discard block
 block discarded – undo
414 401
      *
415 402
      * @access public
416 403
      */
417
-    protected function getLLL($index, $lang, $langArray)
418
-    {
404
+    protected function getLLL($index, $lang, $langArray) {
419 405
         if (isset($langArray[$lang][$index][0]['target'])) {
420 406
             return $langArray[$lang][$index][0]['target'];
421 407
         } else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
         $frameworkConfiguration['persistence']['storagePid'] = 0;
166 166
         $this->configurationManager->setConfiguration($frameworkConfiguration);
167 167
 
168
-        $doPersist = false;
168
+        $doPersist = FALSE;
169 169
 
170 170
         foreach ($formatsDefaults as $type => $values) {
171 171
             // if default format record is not found, add it to the repository
172
-            if ($this->formatRepository->findOneByType($type) === null) {
172
+            if ($this->formatRepository->findOneByType($type) === NULL) {
173 173
                 $newRecord = GeneralUtility::makeInstance(Format::class);
174 174
                 $newRecord->setType($type);
175 175
                 $newRecord->setRoot($values['root']);
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
                 $newRecord->setClass($values['class']);
178 178
                 $this->formatRepository->add($newRecord);
179 179
 
180
-                $doPersist = true;
180
+                $doPersist = TRUE;
181 181
             }
182 182
         }
183 183
 
184 184
         // We must persist here, if we changed anything.
185
-        if ($doPersist === true) {
185
+        if ($doPersist === TRUE) {
186 186
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
187 187
             $persistenceManager->persistAll();
188 188
         }
@@ -198,14 +198,14 @@  discard block
 block discarded – undo
198 198
         // Include metadata definition file.
199 199
         $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
200 200
 
201
-        $doPersist = false;
201
+        $doPersist = FALSE;
202 202
 
203 203
         // load language file in own array
204 204
         $metadataLabels = $this->languageFactory->getParsedData('EXT:dlf/Resources/Private/Language/locallang_metadata.xlf', $this->siteLanguages[0]->getTypo3Language());
205 205
 
206 206
         foreach ($metadataDefaults as $indexName => $values) {
207 207
             // if default format record is not found, add it to the repository
208
-            if ($this->metadataRepository->findOneByIndexName($indexName) === null) {
208
+            if ($this->metadataRepository->findOneByIndexName($indexName) === NULL) {
209 209
 
210 210
                 $newRecord = GeneralUtility::makeInstance(Metadata::class);
211 211
                 $newRecord->setLabel($this->getLLL('metadata.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $metadataLabels));
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                     foreach ($values['format'] as $format) {
226 226
                         $formatRecord = $this->formatRepository->findOneByRoot($format['format_root']);
227 227
                         // If formatRecord is null, we cannot create a MetadataFormat record.
228
-                        if ($formatRecord !== null) {
228
+                        if ($formatRecord !== NULL) {
229 229
                             $newMetadataFormat = GeneralUtility::makeInstance(MetadataFormat::class);
230 230
                             $newMetadataFormat->setEncoded($formatRecord->getUid());
231 231
                             $newMetadataFormat->setXpath($format['xpath']);
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
 
253 253
                 $this->metadataRepository->add($newRecord);
254 254
 
255
-                $doPersist = true;
255
+                $doPersist = TRUE;
256 256
             }
257 257
         }
258 258
 
259 259
         // We must persist here, if we changed anything.
260
-        if ($doPersist === true) {
260
+        if ($doPersist === TRUE) {
261 261
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
262 262
             $persistenceManager->persistAll();
263 263
         }
@@ -270,12 +270,12 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function addSolrCoreAction()
272 272
     {
273
-        $doPersist = false;
273
+        $doPersist = FALSE;
274 274
 
275 275
         // load language file in own array
276 276
         $beLabels = $this->languageFactory->getParsedData('EXT:dlf/Resources/Private/Language/locallang_be.xlf', $this->siteLanguages[0]->getTypo3Language());
277 277
 
278
-        if ($this->solrCoreRepository->findOneByPid($this->pid) === null) {
278
+        if ($this->solrCoreRepository->findOneByPid($this->pid) === NULL) {
279 279
             $newRecord = GeneralUtility::makeInstance(SolrCore::class);
280 280
             $newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')');
281 281
             $indexName = Solr::createCore('');
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 
284 284
             $this->solrCoreRepository->add($newRecord);
285 285
 
286
-            $doPersist = true;
286
+            $doPersist = TRUE;
287 287
         }
288 288
 
289 289
         // We must persist here, if we changed anything.
290
-        if ($doPersist === true) {
290
+        if ($doPersist === TRUE) {
291 291
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
292 292
             $persistenceManager->persistAll();
293 293
         }
@@ -303,14 +303,14 @@  discard block
 block discarded – undo
303 303
         // Include structure definition file.
304 304
         $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
305 305
 
306
-        $doPersist = false;
306
+        $doPersist = FALSE;
307 307
 
308 308
         // load language file in own array
309 309
         $structLabels = $this->languageFactory->getParsedData('EXT:dlf/Resources/Private/Language/locallang_structure.xlf', $this->siteLanguages[0]->getTypo3Language());
310 310
 
311 311
         foreach ($structureDefaults as $indexName => $values) {
312 312
             // if default format record is not found, add it to the repository
313
-            if ($this->structureRepository->findOneByIndexName($indexName) === null) {
313
+            if ($this->structureRepository->findOneByIndexName($indexName) === NULL) {
314 314
                 $newRecord = GeneralUtility::makeInstance(Structure::class);
315 315
                 $newRecord->setLabel($this->getLLL('structure.' . $indexName, $this->siteLanguages[0]->getTypo3Language(), $structLabels));
316 316
                 $newRecord->setIndexName($indexName);
@@ -332,12 +332,12 @@  discard block
 block discarded – undo
332 332
                     $this->structureRepository->add($translatedRecord);
333 333
                 }
334 334
 
335
-                $doPersist = true;
335
+                $doPersist = TRUE;
336 336
             }
337 337
         }
338 338
 
339 339
         // We must persist here, if we changed anything.
340
-        if ($doPersist === true) {
340
+        if ($doPersist === TRUE) {
341 341
             $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
342 342
             $persistenceManager->persistAll();
343 343
         }
Please login to merge, or discard this patch.
Classes/Eid/SearchInDocument.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
      */
121 121
     private function getQuery($fields, $parameters)
122 122
     {
123
-        return $fields['fulltext'] . ':(' . Solr::escapeQuery((string) $parameters['q']) . ') AND ' . $fields['uid'] . ':' . $this->getUid($parameters['uid']);
123
+        return $fields['fulltext'].':('.Solr::escapeQuery((string) $parameters['q']).') AND '.$fields['uid'].':'.$this->getUid($parameters['uid']);
124 124
     }
125 125
 
126 126
     /**
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,16 +28,14 @@  discard block
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class SearchInDocument
32
-{
31
+class SearchInDocument {
33 32
     /**
34 33
      * The main method of the eID script
35 34
      *
36 35
      * @param ServerRequestInterface $request
37 36
      * @return ResponseInterface JSON response of search suggestions
38 37
      */
39
-    public function main(ServerRequestInterface $request)
40
-    {
38
+    public function main(ServerRequestInterface $request) {
41 39
         $output = [
42 40
             'documents' => [],
43 41
             'numFound' => 0
@@ -118,8 +116,7 @@  discard block
 block discarded – undo
118 116
      *
119 117
      * @return string SOLR query
120 118
      */
121
-    private function getQuery($fields, $parameters)
122
-    {
119
+    private function getQuery($fields, $parameters) {
123 120
         return $fields['fulltext'] . ':(' . Solr::escapeQuery((string) $parameters['q']) . ') AND ' . $fields['uid'] . ':' . $this->getUid($parameters['uid']);
124 121
     }
125 122
 
@@ -133,8 +130,7 @@  discard block
 block discarded – undo
133 130
      *
134 131
      * @return int|string uid of the document
135 132
      */
136
-    private function getUid($uid)
137
-    {
133
+    private function getUid($uid) {
138 134
         return is_numeric($uid) ? intval($uid) : $uid;
139 135
     }
140 136
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         ];
45 45
         // Get input parameters and decrypt core name.
46 46
         $parameters = $request->getParsedBody();
47
-        if ($parameters === null) {
47
+        if ($parameters === NULL) {
48 48
             throw new \InvalidArgumentException('No parameters passed!', 1632322297);
49 49
         }
50 50
         $encrypted = (string) $parameters['encrypted'];
Please login to merge, or discard this patch.
Classes/Eid/PageViewProxy.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
  * @subpackage dlf
35 35
  * @access public
36 36
  */
37
-class PageViewProxy
38
-{
37
+class PageViewProxy {
39 38
     /**
40 39
      * @var RequestFactory
41 40
      */
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      */
47 46
     protected $extConf;
48 47
 
49
-    public function __construct()
50
-    {
48
+    public function __construct() {
51 49
         $this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
52 50
         $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
53 51
     }
@@ -173,8 +171,7 @@  discard block
 block discarded – undo
173 171
      * @param ServerRequestInterface $request
174 172
      * @return ResponseInterface
175 173
      */
176
-    public function main(ServerRequestInterface $request)
177
-    {
174
+    public function main(ServerRequestInterface $request) {
178 175
         switch ($request->getMethod()) {
179 176
             case 'OPTIONS':
180 177
                 return $this->handleOptions($request);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,11 +140,11 @@
 block discarded – undo
140 140
                 // For performance, don't download content up-front. Rather, we'll
141 141
                 // download and upload simultaneously.
142 142
                 // https://docs.guzzlephp.org/en/6.5/request-options.html#stream
143
-                'stream' => true,
143
+                'stream' => TRUE,
144 144
 
145 145
                 // Don't throw exceptions when a non-success status code is
146 146
                 // received. We handle these manually.
147
-                'http_errors' => false,
147
+                'http_errors' => FALSE,
148 148
             ]);
149 149
         } catch (\Exception $e) {
150 150
             return new JsonResponse(['message' => 'Could not fetch resource of given URL.'], 500);
Please login to merge, or discard this patch.
Classes/Eid/SearchSuggest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $parameters = $request->getParsedBody();
46 46
         $solrCore = (string) $parameters['solrcore'];
47 47
         $uHash = (string) $parameters['uHash'];
48
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
48
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
49 49
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
50 50
         }
51 51
         // Perform Solr query.
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,16 +30,14 @@
 block discarded – undo
30 30
  * @subpackage dlf
31 31
  * @access public
32 32
  */
33
-class SearchSuggest
34
-{
33
+class SearchSuggest {
35 34
     /**
36 35
      * The main method of the eID script
37 36
      *
38 37
      * @param ServerRequestInterface $request
39 38
      * @return ResponseInterface XML response of search suggestions
40 39
      */
41
-    public function main(ServerRequestInterface $request)
42
-    {
40
+    public function main(ServerRequestInterface $request) {
43 41
         $output = [];
44 42
         // Get input parameters and decrypt core name.
45 43
         $parameters = $request->getParsedBody();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $parameters = $request->getParsedBody();
46 46
         $solrCore = (string) $parameters['solrcore'];
47 47
         $uHash = (string) $parameters['uHash'];
48
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
48
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === FALSE) {
49 49
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
50 50
         }
51 51
         // Perform Solr query.
Please login to merge, or discard this patch.
ext_localconf.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,22 +65,22 @@
 block discarded – undo
65 65
 $_EXTKEY = 'dlf';
66 66
 // Register tools for toolbox plugin.
67 67
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = [];
68
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool';
69
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool';
70
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool';
71
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool';
72
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool';
73
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool';
74
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool';
68
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool';
69
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool';
70
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool';
71
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool';
72
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool';
73
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool';
74
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool';
75 75
 // Register hooks.
76 76
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
77 77
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class;
78 78
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class;
79 79
 // Register AJAX eID handlers.
80
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class . '::main';
81
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class . '::main';
80
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class.'::main';
81
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class.'::main';
82 82
 if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? false) {
83
-    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
83
+    $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class.'::main';
84 84
 }
85 85
 // Use Caching Framework for Solr queries
86 86
 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'])) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 // Register AJAX eID handlers.
80 80
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Eid\SearchSuggest::class . '::main';
81 81
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Eid\SearchInDocument::class . '::main';
82
-if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? false) {
82
+if ($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['dlf']['enableInternalProxy'] ?? FALSE) {
83 83
     $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Eid\PageViewProxy::class . '::main';
84 84
 }
85 85
 // Use Caching Framework for Solr queries
Please login to merge, or discard this patch.
Classes/Controller/StatisticsController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
         $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings);
34 34
 
35 35
         // Set replacements.
36
-        $args['###TITLES###'] = $foundNumbers['titles'] . ' ' . htmlspecialchars(
36
+        $args['###TITLES###'] = $foundNumbers['titles'].' '.htmlspecialchars(
37 37
             LocalizationUtility::translate(
38 38
                 ($foundNumbers['titles'] > 1 ? 'titles' : 'title'), 'dlf'
39 39
             )
40 40
         );
41 41
 
42
-        $args['###VOLUMES###'] = $foundNumbers['volumes'] . ' ' . htmlspecialchars(
42
+        $args['###VOLUMES###'] = $foundNumbers['volumes'].' '.htmlspecialchars(
43 43
             LocalizationUtility::translate(
44 44
                 ($foundNumbers['volumes'] > 1 ? 'volumes' : 'volume'), 'dlf'
45 45
             )
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,15 +21,13 @@
 block discarded – undo
21 21
  * @subpackage dlf
22 22
  * @access public
23 23
  */
24
-class StatisticsController extends AbstractController
25
-{
24
+class StatisticsController extends AbstractController {
26 25
     /**
27 26
      * The main method of the plugin
28 27
      *
29 28
      * @return void
30 29
      */
31
-    public function mainAction()
32
-    {
30
+    public function mainAction() {
33 31
         $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings);
34 32
 
35 33
         // Set replacements.
Please login to merge, or discard this patch.