Passed
Pull Request — master (#105)
by Alexander
05:13
created
Classes/Controller/AudioPlayerController.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  * @subpackage dlf
26 26
  * @access public
27 27
  */
28
-class AudioplayerController extends AbstractController
29
-{
28
+class AudioplayerController extends AbstractController {
30 29
     /**
31 30
      * Holds the current audio file's URL, MIME type and optional label
32 31
      *
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
      *
43 42
      * @return void
44 43
      */
45
-    protected function addPlayerJS()
46
-    {
44
+    protected function addPlayerJS() {
47 45
         // Inline CSS.
48 46
         $inlineCSS = '#tx-dlf-audio { width: 100px; height: 100px; }';
49 47
 
@@ -72,8 +70,7 @@  discard block
 block discarded – undo
72 70
      *
73 71
      * @return void
74 72
      */
75
-    public function mainAction()
76
-    {
73
+    public function mainAction() {
77 74
         // Load current document.
78 75
         $this->loadDocument($this->requestData);
79 76
         if (
Please login to merge, or discard this patch.
Classes/Controller/ListViewController.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class ListViewController extends AbstractController
33
-{
32
+class ListViewController extends AbstractController {
34 33
     /**
35 34
      * @var CollectionRepository
36 35
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
     /**
40 39
      * @param CollectionRepository $collectionRepository
41 40
      */
42
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
43
-    {
41
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
44 42
         $this->collectionRepository = $collectionRepository;
45 43
     }
46 44
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
     /**
53 51
      * @param MetadataRepository $metadataRepository
54 52
      */
55
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
56
-    {
53
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
57 54
         $this->metadataRepository = $metadataRepository;
58 55
     }
59 56
 
@@ -68,8 +65,7 @@  discard block
 block discarded – undo
68 65
      *
69 66
      * @return void
70 67
      */
71
-    public function mainAction()
72
-    {
68
+    public function mainAction() {
73 69
         $this->searchParams = $this->getParametersSafely('searchParameter');
74 70
 
75 71
         $collection = null;
Please login to merge, or discard this patch.
Classes/Controller/PageGridController.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,15 +22,13 @@  discard block
 block discarded – undo
22 22
  * @subpackage dlf
23 23
  * @access public
24 24
  */
25
-class PageGridController extends AbstractController
26
-{
25
+class PageGridController extends AbstractController {
27 26
     /**
28 27
      * The main method of the plugin
29 28
      *
30 29
      * @return void
31 30
      */
32
-    public function mainAction()
33
-    {
31
+    public function mainAction() {
34 32
         $this->loadDocument($this->requestData);
35 33
         if (
36 34
             $this->document === null
@@ -65,8 +63,7 @@  discard block
 block discarded – undo
65 63
      *
66 64
      * @return array The rendered entry ready for fluid
67 65
      */
68
-    protected function getEntry($number, $fileGrpThumbs)
69
-    {
66
+    protected function getEntry($number, $fileGrpThumbs) {
70 67
         // Set pagination.
71 68
         $entry['pagination'] = htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$number]]['orderlabel']);
72 69
         $entry['page'] = $number;
Please login to merge, or discard this patch.
Classes/Controller/ToolboxController.php 1 patch
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -23,15 +23,13 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class ToolboxController extends AbstractController
27
-{
26
+class ToolboxController extends AbstractController {
28 27
     /**
29 28
      * The main method of the plugin
30 29
      *
31 30
      * @return void
32 31
      */
33
-    public function mainAction()
34
-    {
32
+    public function mainAction() {
35 33
         // Load current document.
36 34
         $this->loadDocument($this->requestData);
37 35
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @return void
54 52
      */
55
-    public function annotationtool()
56
-    {
53
+    public function annotationtool() {
57 54
         if (
58 55
             $this->document === null
59 56
             || $this->document->getDoc()->numPages < 1
@@ -94,8 +91,7 @@  discard block
 block discarded – undo
94 91
      *
95 92
      * @return void
96 93
      */
97
-    public function fulltextdownloadtool()
98
-    {
94
+    public function fulltextdownloadtool() {
99 95
         if (
100 96
             $this->document === null
101 97
             || $this->document->getDoc()->numPages < 1
@@ -140,8 +136,7 @@  discard block
 block discarded – undo
140 136
      *
141 137
      * @return void
142 138
      */
143
-    public function fulltexttool()
144
-    {
139
+    public function fulltexttool() {
145 140
         if (
146 141
             $this->document === null
147 142
             || $this->document->getDoc()->numPages < 1
@@ -186,8 +181,7 @@  discard block
 block discarded – undo
186 181
      *
187 182
      * @return void
188 183
      */
189
-    public function imagedownloadtool()
190
-    {
184
+    public function imagedownloadtool() {
191 185
         if (
192 186
             $this->document === null
193 187
             || $this->document->getDoc()->numPages < 1
@@ -230,8 +224,7 @@  discard block
 block discarded – undo
230 224
      *
231 225
      * @return array Array of image links and image format information
232 226
      */
233
-    protected function getImage($page)
234
-    {
227
+    protected function getImage($page) {
235 228
         $image = [];
236 229
         // Get @USE value of METS fileGrp.
237 230
         $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->settings['fileGrpsImageDownload']);
@@ -264,8 +257,7 @@  discard block
 block discarded – undo
264 257
      *
265 258
      * @return void
266 259
      */
267
-    public function imagemanipulationtool()
268
-    {
260
+    public function imagemanipulationtool() {
269 261
         // Set parent element for initialization.
270 262
         $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool';
271 263
 
@@ -278,8 +270,7 @@  discard block
 block discarded – undo
278 270
      *
279 271
      * @return void
280 272
      */
281
-    public function pdfdownloadtool()
282
-    {
273
+    public function pdfdownloadtool() {
283 274
         if (
284 275
             $this->document === null
285 276
             || $this->document->getDoc() === null
@@ -318,8 +309,7 @@  discard block
 block discarded – undo
318 309
      *
319 310
      * @return array Link to downloadable page
320 311
      */
321
-    protected function getPageLink()
322
-    {
312
+    protected function getPageLink() {
323 313
         $page1Link = '';
324 314
         $page2Link = '';
325 315
         $pageLinkArray = [];
@@ -363,8 +353,7 @@  discard block
 block discarded – undo
363 353
      *
364 354
      * @return string Link to downloadable work
365 355
      */
366
-    protected function getWorkLink()
367
-    {
356
+    protected function getWorkLink() {
368 357
         $workLink = '';
369 358
         $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['fileGrpDownload']);
370 359
         // Get work link.
@@ -393,8 +382,7 @@  discard block
 block discarded – undo
393 382
      *
394 383
      * @return void
395 384
      */
396
-    public function searchindocumenttool()
397
-    {
385
+    public function searchindocumenttool() {
398 386
         if (
399 387
             $this->document === null
400 388
             || $this->document->getDoc()->numPages < 1
@@ -457,8 +445,7 @@  discard block
 block discarded – undo
457 445
      *
458 446
      * @return string with current document id
459 447
      */
460
-    protected function getCurrentDocumentId()
461
-    {
448
+    protected function getCurrentDocumentId() {
462 449
         $id = $this->document->getUid();
463 450
 
464 451
         if ($id !== null && $id > 0) {
@@ -493,8 +480,7 @@  discard block
 block discarded – undo
493 480
      *
494 481
      * @return string with encrypted core name
495 482
      */
496
-    protected function getEncryptedCoreName()
497
-    {
483
+    protected function getEncryptedCoreName() {
498 484
         // Get core name.
499 485
         $name = Helper::getIndexNameFromUid($this->settings['solrcore'], 'tx_dlf_solrcores');
500 486
         // Encrypt core name.
Please login to merge, or discard this patch.
Classes/Controller/NavigationController.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,13 @@
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class NavigationController extends AbstractController
27
-{
26
+class NavigationController extends AbstractController {
28 27
     /**
29 28
      * The main method of the plugin
30 29
      *
31 30
      * @return void
32 31
      */
33
-    public function mainAction()
34
-    {
32
+    public function mainAction() {
35 33
         // Load current document.
36 34
         $this->loadDocument($this->requestData);
37 35
         if (
Please login to merge, or discard this patch.
Classes/Hooks/DataHandler.php 1 patch
Braces   +5 added lines, -10 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 DataHandler implements LoggerAwareInterface
38
-{
37
+class DataHandler implements LoggerAwareInterface {
39 38
     use LoggerAwareTrait;
40 39
 
41 40
     /**
@@ -43,8 +42,7 @@  discard block
 block discarded – undo
43 42
      */
44 43
     protected $documentRepository;
45 44
 
46
-    protected function getDocumentRepository()
47
-    {
45
+    protected function getDocumentRepository() {
48 46
         if ($this->documentRepository === null) {
49 47
             $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
50 48
             $this->documentRepository = $objectManager->get(DocumentRepository::class);
@@ -65,8 +63,7 @@  discard block
 block discarded – undo
65 63
      *
66 64
      * @return void
67 65
      */
68
-    public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray)
69
-    {
66
+    public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray) {
70 67
         if ($status == 'new') {
71 68
             switch ($table) {
72 69
                     // Field post-processing for table "tx_dlf_documents".
@@ -195,8 +192,7 @@  discard block
 block discarded – undo
195 192
      *
196 193
      * @return void
197 194
      */
198
-    public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray)
199
-    {
195
+    public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray) {
200 196
         if ($status == 'update') {
201 197
             switch ($table) {
202 198
                     // After database operations for table "tx_dlf_documents".
@@ -275,8 +271,7 @@  discard block
 block discarded – undo
275 271
      *
276 272
      * @return void
277 273
      */
278
-    public function processCmdmap_postProcess($command, $table, $id)
279
-    {
274
+    public function processCmdmap_postProcess($command, $table, $id) {
280 275
         if (
281 276
             in_array($command, ['move', 'delete', 'undelete'])
282 277
             && $table == 'tx_dlf_documents'
Please login to merge, or discard this patch.
Classes/Hooks/ItemsProcFunc.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class ItemsProcFunc
30
-{
29
+class ItemsProcFunc {
31 30
     /**
32 31
      * @var int
33 32
      */
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
      *
43 42
      * @return void
44 43
      */
45
-    public function toolList(&$params)
46
-    {
44
+    public function toolList(&$params) {
47 45
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] as $class => $label) {
48 46
             $params['items'][] = [Helper::getLanguageService()->getLL($label), $class];
49 47
         }
@@ -56,8 +54,7 @@  discard block
 block discarded – undo
56 54
      *
57 55
      * @return void
58 56
      */
59
-    public function __construct()
60
-    {
57
+    public function __construct() {
61 58
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
62 59
         $configurationManager = $objectManager->get(ConfigurationManager::class);
63 60
         // we must get the storagePid from full TypoScript setup at this point.
@@ -74,8 +71,7 @@  discard block
 block discarded – undo
74 71
      *
75 72
      * @return void
76 73
      */
77
-    public function extendedSearchList(&$params)
78
-    {
74
+    public function extendedSearchList(&$params) {
79 75
         $this->generateList(
80 76
             $params,
81 77
             'label,index_name',
@@ -116,8 +112,7 @@  discard block
 block discarded – undo
116 112
      *
117 113
      * @return void
118 114
      */
119
-    protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '')
120
-    {
115
+    protected function generateList(&$params, $fields, $table, $sorting, $andWhere = '') {
121 116
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
122 117
             ->getQueryBuilderForTable($table);
123 118
 
Please login to merge, or discard this patch.
Classes/Hooks/ThumbnailCustomElement.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,10 +14,8 @@
 block discarded – undo
14 14
 
15 15
 use TYPO3\CMS\Backend\Form\Element\AbstractFormElement;
16 16
 
17
-class ThumbnailCustomElement extends AbstractFormElement
18
-{
19
-    public function render()
20
-    {
17
+class ThumbnailCustomElement extends AbstractFormElement {
18
+    public function render() {
21 19
         // Custom TCA properties and other data can be found in $this->data, for example the above
22 20
         // parameters are available in $this->data['parameterArray']['fieldConf']['config']['parameters']
23 21
         $result = $this->initializeResultArray();
Please login to merge, or discard this patch.
Classes/Hooks/ConfigurationForm.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class ConfigurationForm
33
-{
32
+class ConfigurationForm {
34 33
 
35 34
     /**
36 35
      * Check if a connection to a Solr server could be established with the given credentials.
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      *
40 39
      * @return string Message informing the user of success or failure
41 40
      */
42
-    public function checkSolrConnection()
43
-    {
41
+    public function checkSolrConnection() {
44 42
         $solr = Solr::getInstance();
45 43
         if ($solr->ready) {
46 44
             Helper::addMessage(
@@ -65,8 +63,7 @@  discard block
 block discarded – undo
65 63
      *
66 64
      * @return void
67 65
      */
68
-    public function __construct()
69
-    {
66
+    public function __construct() {
70 67
         // Load backend localization file.
71 68
         Helper::getLanguageService()->includeLLFile('EXT:dlf/Resources/Private/Language/locallang_be.xlf');
72 69
     }
Please login to merge, or discard this patch.