Passed
Pull Request — master (#123)
by Sebastian
03:43
created
Tests/Functional/Api/PageViewProxyTest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         ]);
78 78
 
79 79
         $this->assertEquals(200, $response->getStatusCode());
80
-        $this->assertEquals('This is some plain text test file.' . "\n", (string) $response->getBody());
80
+        $this->assertEquals('This is some plain text test file.'."\n", (string) $response->getBody());
81 81
     }
82 82
 
83 83
     /**
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,19 +6,16 @@
 block discarded – undo
6 6
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
7 7
 use TYPO3\CMS\Core\Utility\GeneralUtility;
8 8
 
9
-class PageViewProxyTest extends FunctionalTestCase
10
-{
9
+class PageViewProxyTest extends FunctionalTestCase {
11 10
     protected $disableJsonWrappedResponse = true;
12 11
 
13
-    protected function getDlfConfiguration()
14
-    {
12
+    protected function getDlfConfiguration() {
15 13
         return array_merge(parent::getDlfConfiguration(), [
16 14
             'enableInternalProxy' => true,
17 15
         ]);
18 16
     }
19 17
 
20
-    protected function queryProxy(array $query, string $method = 'GET')
21
-    {
18
+    protected function queryProxy(array $query, string $method = 'GET') {
22 19
         $query['eID'] = 'tx_dlf_pageview_proxy';
23 20
 
24 21
         return $this->httpClient->request($method, '', [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
 
9 9
 class PageViewProxyTest extends FunctionalTestCase
10 10
 {
11
-    protected $disableJsonWrappedResponse = true;
11
+    protected $disableJsonWrappedResponse = TRUE;
12 12
 
13 13
     protected function getDlfConfiguration()
14 14
     {
15 15
         return array_merge(parent::getDlfConfiguration(), [
16
-            'enableInternalProxy' => true,
16
+            'enableInternalProxy' => TRUE,
17 17
         ]);
18 18
     }
19 19
 
Please login to merge, or discard this patch.
Tests/Functional/Api/PageViewProxyDisabledTest.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,12 +5,10 @@
 block discarded – undo
5 5
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
6 6
 use TYPO3\CMS\Core\Utility\GeneralUtility;
7 7
 
8
-class PageViewProxyDisabledTest extends FunctionalTestCase
9
-{
8
+class PageViewProxyDisabledTest extends FunctionalTestCase {
10 9
     protected $disableJsonWrappedResponse = true;
11 10
 
12
-    protected function queryProxy(array $query, string $method = 'GET')
13
-    {
11
+    protected function queryProxy(array $query, string $method = 'GET') {
14 12
         $query['eID'] = 'tx_dlf_pageview_proxy';
15 13
 
16 14
         return $this->httpClient->request($method, '', [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 class PageViewProxyDisabledTest extends FunctionalTestCase
9 9
 {
10
-    protected $disableJsonWrappedResponse = true;
10
+    protected $disableJsonWrappedResponse = TRUE;
11 11
 
12 12
     protected function queryProxy(array $query, string $method = 'GET')
13 13
     {
Please login to merge, or discard this patch.
Tests/Functional/Repository/DocumentRepositoryTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@
 block discarded – undo
21 21
 
22 22
         $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000);
23 23
 
24
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.xml');
25
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/pages.xml');
26
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/libraries.xml');
24
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/documents_1.xml');
25
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/pages.xml');
26
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/libraries.xml');
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
9 9
 use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage;
10 10
 
11
-class DocumentRepositoryTest extends FunctionalTestCase
12
-{
11
+class DocumentRepositoryTest extends FunctionalTestCase {
13 12
     /**
14 13
      * @var DocumentRepository
15 14
      */
Please login to merge, or discard this patch.
Build/Documentation/dbdocs/Generator.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
             // There may be a single non-signifying space after the doc-comment asterisk,
185 185
             // which is not included.
186
-            $text .= preg_replace('#\\s*/?[*/]*\\s?(.*)$#', '$1', $line) . "\n";
186
+            $text .= preg_replace('#\\s*/?[*/]*\\s?(.*)$#', '$1', $line)."\n";
187 187
         }
188 188
         $text = trim($text);
189 189
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 RST);
205 205
 
206 206
         // Sort tables alphabetically
207
-        usort($tables, function ($lhs, $rhs) {
207
+        usort($tables, function($lhs, $rhs) {
208 208
             return $lhs->name <=> $rhs->name;
209 209
         });
210 210
 
@@ -214,13 +214,13 @@  discard block
 block discarded – undo
214 214
             // Set header
215 215
             $header = $tableInfo->name;
216 216
             if (!empty($tableInfo->feComment)) {
217
-                $header .= ': ' . $tableInfo->feComment;
217
+                $header .= ': '.$tableInfo->feComment;
218 218
             }
219 219
             $section->setHeader($header);
220 220
 
221 221
             // Set introductory text of subsection
222 222
             if ($tableInfo->modelClass) {
223
-                $section->addText('Extbase domain model: ``' . $tableInfo->modelClass . '``');
223
+                $section->addText('Extbase domain model: ``'.$tableInfo->modelClass.'``');
224 224
             }
225 225
             $section->addText($tableInfo->classComment);
226 226
             $section->addText($tableInfo->sqlComment);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                 'description' => 'Description',
232 232
             ]];
233 233
 
234
-            $rows = array_map(function ($column) use ($page) {
234
+            $rows = array_map(function($column) use ($page) {
235 235
                 return [
236 236
                     'field' => (
237 237
                         $page->format($column->name, ['bold' => $column->isPrimary])
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
  * @subpackage dlf
33 33
  * @access public
34 34
  */
35
-class Generator
36
-{
35
+class Generator {
37 36
     /**
38 37
      * @var ObjectManager
39 38
      */
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
      */
50 49
     protected $dataMapper;
51 50
 
52
-    public function __construct()
53
-    {
51
+    public function __construct() {
54 52
         $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
55 53
         $this->languageService = $this->objectManager->get(LanguageService::class);
56 54
         $this->dataMapper = $this->objectManager->get(DataMapper::class);
@@ -167,8 +165,7 @@  discard block
 block discarded – undo
167 165
         return $result;
168 166
     }
169 167
 
170
-    protected function parseDocComment($docComment)
171
-    {
168
+    protected function parseDocComment($docComment) {
172 169
         // TODO: Consider using phpDocumentor (though that splits the docblock into summary and description)
173 170
 
174 171
         // Adopted from DocCommentParser in TYPO3 v9
@@ -193,8 +190,7 @@  discard block
 block discarded – undo
193 190
     /**
194 191
      * Transform table structure into .rst page.
195 192
      */
196
-    public function generatePage(array $tables)
197
-    {
193
+    public function generatePage(array $tables) {
198 194
         $page = new RstSection();
199 195
         $page->setHeader('Database Tables');
200 196
         $page->addText(<<<RST
Please login to merge, or discard this patch.
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function collectTables(): array
64 64
     {
65 65
         $sqlReader = $this->objectManager->get(SqlReader::class);
66
-        $sqlCode = $sqlReader->getTablesDefinitionString(true);
66
+        $sqlCode = $sqlReader->getTablesDefinitionString(TRUE);
67 67
         $createTableStatements = $sqlReader->getCreateTableStatementArray($sqlCode);
68 68
 
69 69
         $tableToClassName = $this->getTableClassMap();
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 continue;
80 80
             }
81 81
 
82
-            $className = $tableToClassName[$tableName] ?? null;
82
+            $className = $tableToClassName[$tableName] ?? NULL;
83 83
 
84 84
             $result[] = $this->getTableInfo($table, $className);
85 85
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $isPrimary = [];
121 121
         if (!is_null($primaryKey = $table->getPrimaryKey())) {
122 122
             foreach ($primaryKey->getUnquotedColumns() as $primaryColumn) {
123
-                $isPrimary[$primaryColumn] = true;
123
+                $isPrimary[$primaryColumn] = TRUE;
124 124
             }
125 125
         }
126 126
 
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
         $result = (object) [
142 142
             'name' => $tableName,
143 143
             'columns' => $columns,
144
-            'modelClass' => null,
144
+            'modelClass' => NULL,
145 145
             'sqlComment' => $table->getComment() ?? '',
146 146
             'classComment' => '',
147 147
             'feComment' => $this->languageService->sL($GLOBALS['TCA'][$tableName]['ctrl']['title'] ?? ''),
148 148
         ];
149 149
 
150 150
         // Integrate doc-comments from model class and its fields
151
-        if ($className !== null) {
151
+        if ($className !== NULL) {
152 152
             $reflection = new ReflectionClass($className);
153 153
 
154 154
             $dataMap = $this->dataMapper->getDataMap($className);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 // In that case, try to guess the column name from the property name.
159 159
 
160 160
                 $column = $dataMap->getColumnMap($property->getName());
161
-                $columnName = $column === null
161
+                $columnName = $column === NULL
162 162
                     ? GeneralUtility::camelCaseToLowerCaseUnderscored($property->getName())
163 163
                     : $column->getColumnName();
164 164
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         $lines = explode("\n", $docComment);
185 185
         foreach ($lines as $line) {
186 186
             // Stop parsing at first tag
187
-            if ($line !== '' && strpos($line, '@') !== false) {
187
+            if ($line !== '' && strpos($line, '@') !== FALSE) {
188 188
                 break;
189 189
             }
190 190
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 This is a reference of all database tables defined by Kitodo.Presentation.
209 209
 
210 210
 .. tip:: This page is auto-generated. If you would like to edit it, please use doc-comments in the model class, COMMENT fields in ``ext_tables.sql`` if the table does not have one, or TCA labels. Then, you may re-generate the page by running ``composer docs:db`` inside the Kitodo.Presentation base folder.
211
-RST);
211
+rst);
212 212
 
213 213
         // Sort tables alphabetically
214 214
         usort($tables, function ($lhs, $rhs) {
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
                     'field' => (
244 244
                         $page->format($column->name, ['bold' => $column->isPrimary])
245 245
                         . "\u{00a0}\u{00a0}"
246
-                        . $page->format($column->type->getName(), ['italic' => true])
246
+                        . $page->format($column->type->getName(), ['italic' => TRUE])
247 247
                     ),
248 248
 
249 249
                     'description' => $page->paragraphs([
250
-                        $page->format($column->feComment, ['italic' => true]),
250
+                        $page->format($column->feComment, ['italic' => TRUE]),
251 251
                         $column->fieldComment,
252 252
                         $column->sqlComment,
253 253
                     ]),
Please login to merge, or discard this patch.
Classes/Domain/Repository/TokenRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
25 25
      *
26 26
      * @return void
27 27
      */
28
-    public function deleteExpiredTokens($expireTime)
29
-    {
28
+    public function deleteExpiredTokens($expireTime) {
30 29
         $query = $this->createQuery();
31 30
 
32 31
         $constraints = [];
Please login to merge, or discard this patch.
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/Controller/BasketController.php 3 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 foreach ($this->requestData['selected'] as $docValue) {
110 110
                     if ($docValue['id']) {
111 111
                         $docData = $this->getDocumentData($docValue['id'], $docValue);
112
-                        $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
112
+                        $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
113 113
                         $this->redirectToUri($pdfUrl);
114 114
                     }
115 115
                 }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         if ($allMails->count() > 0) {
173 173
             $mailSelect[0] = htmlspecialchars(LocalizationUtility::translate('basket.chooseMail', 'dlf'));
174 174
             foreach ($allMails as $mail) {
175
-                $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()) . ' (' . htmlspecialchars($mail->getMail()) . ')';
175
+                $mailSelect[$mail->getUid()] = htmlspecialchars($mail->getName()).' ('.htmlspecialchars($mail->getMail()).')';
176 176
             }
177 177
             $this->view->assign('mailSelect', $mailSelect);
178 178
         }
@@ -256,12 +256,12 @@  discard block
 block discarded – undo
256 256
 
257 257
         $entryArray['BASKETDATA'] = $docData;
258 258
 
259
-        $entryKey = $id . '_' . $startpage;
259
+        $entryKey = $id.'_'.$startpage;
260 260
         if (!empty($startX)) {
261
-            $entryKey .= '_' . $startX;
261
+            $entryKey .= '_'.$startX;
262 262
         }
263 263
         if (!empty($endX)) {
264
-            $entryKey .= '_' . $endX;
264
+            $entryKey .= '_'.$endX;
265 265
         }
266 266
 
267 267
         $entryArray['id'] = $id;
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             $urlParams = str_replace("##endy##", $data['endY'] === "" ? "" : (int) $data['endY'], $urlParams);
313 313
             $urlParams = str_replace("##rotation##", $data['rotation'] === "" ? "" : (int) $data['rotation'], $urlParams);
314 314
 
315
-            $downloadUrl = $this->settings['pdfgenerate'] . $urlParams;
315
+            $downloadUrl = $this->settings['pdfgenerate'].$urlParams;
316 316
 
317 317
             $title = $this->document->getTitle();
318 318
             if (empty($title)) {
@@ -323,15 +323,15 @@  discard block
 block discarded – undo
323 323
             $info = '';
324 324
             if ($data['startX'] != '' && $data['endX'] != '') {
325 325
                 // cutout
326
-                $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')) . ' ';
326
+                $info .= htmlspecialchars(LocalizationUtility::translate('basket.cutout', 'dlf')).' ';
327 327
             }
328 328
             if ($data['startpage'] == $data['endpage']) {
329 329
                 // One page
330
-                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'];
330
+                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'];
331 331
             } else {
332
-                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')) . ' ' . $data['startpage'] . '-' . $data['endpage'];
332
+                $info .= htmlspecialchars(LocalizationUtility::translate('page', 'dlf')).' '.$data['startpage'].'-'.$data['endpage'];
333 333
             }
334
-            $downloadLink = '<a href="' . $downloadUrl . '" target="_blank">' . htmlspecialchars($title) . '</a> (' . $info . ')';
334
+            $downloadLink = '<a href="'.$downloadUrl.'" target="_blank">'.htmlspecialchars($title).'</a> ('.$info.')';
335 335
             if ($data['startpage'] == $data['endpage']) {
336 336
                 $pageNums = 1;
337 337
             } else {
@@ -407,12 +407,12 @@  discard block
 block discarded – undo
407 407
             if ($_piVars['addToBasket'] == 'list') {
408 408
                 $documentItem['endpage'] = $this->document->getDoc()->numPages;
409 409
             }
410
-            $arrayKey = $documentItem['id'] . '_' . $page;
410
+            $arrayKey = $documentItem['id'].'_'.$page;
411 411
             if (!empty($documentItem['startX'])) {
412
-                $arrayKey .= '_' . $documentItem['startX'];
412
+                $arrayKey .= '_'.$documentItem['startX'];
413 413
             }
414 414
             if (!empty($documentItem['endX'])) {
415
-                $arrayKey .= '_' . $documentItem['endX'];
415
+                $arrayKey .= '_'.$documentItem['endX'];
416 416
             }
417 417
             // do not add more than one identical object
418 418
             if (!in_array($arrayKey, $items)) {
@@ -431,14 +431,14 @@  discard block
 block discarded – undo
431 431
                     // remove parameter endpage
432 432
                     $pdfParams = str_replace(",##endpage##", '', $pdfParams);
433 433
                 }
434
-                $pdfGenerateUrl = $this->settings['pdfgenerate'] . $pdfParams;
434
+                $pdfGenerateUrl = $this->settings['pdfgenerate'].$pdfParams;
435 435
                 if ($this->settings['pregeneration']) {
436 436
                     // send ajax request to webapp
437 437
                     $output .= '
438 438
      <script>
439 439
       $(document).ready(function(){
440 440
        $.ajax({
441
-         url: "' . $pdfGenerateUrl . '",
441
+         url: "' . $pdfGenerateUrl.'",
442 442
        }).done(function() {
443 443
        });
444 444
       });
@@ -476,12 +476,12 @@  discard block
 block discarded – undo
476 476
         }
477 477
         foreach ($_piVars['selected'] as $value) {
478 478
             if (isset($value['id'])) {
479
-                $arrayKey = $value['id'] . '_' . $value['startpage'];
479
+                $arrayKey = $value['id'].'_'.$value['startpage'];
480 480
                 if (!empty($value['startX'])) {
481
-                    $arrayKey .= '_' . $value['startX'];
481
+                    $arrayKey .= '_'.$value['startX'];
482 482
                 }
483 483
                 if (!empty($value['endX'])) {
484
-                    $arrayKey .= '_' . $value['endX'];
484
+                    $arrayKey .= '_'.$value['endX'];
485 485
                 }
486 486
                 if (isset($items[$arrayKey])) {
487 487
                     unset($items[$arrayKey]);
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 
515 515
         $mailObject = $this->mailRepository->findByUid(intval($mailId))->getFirst();
516 516
 
517
-        $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf')) . "\n";
517
+        $mailText = htmlspecialchars(LocalizationUtility::translate('basket.mailBody', 'dlf'))."\n";
518 518
         $numberOfPages = 0;
519 519
         $pdfUrl = $this->settings['pdfdownload'];
520 520
         // prepare links
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
             if ($docValue['id']) {
523 523
                 $explodeId = explode("_", $docValue['id']);
524 524
                 $docData = $this->getDocumentData($explodeId[0], $docValue);
525
-                $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
525
+                $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
526 526
                 $pages = (abs(intval($docValue['startpage']) - intval($docValue['endpage'])));
527 527
                 if ($pages === 0) {
528 528
                     $numberOfPages = $numberOfPages + 1;
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
         }
534 534
         // Remove leading/tailing pdfparamseperator
535 535
         $pdfUrl = trim($pdfUrl, $this->settings['pdfparamseparator']);
536
-        $mailBody = $mailText . $pdfUrl;
536
+        $mailBody = $mailText.$pdfUrl;
537 537
         // Get hook objects.
538 538
         $hookObjects = Helper::getHookObjects('Classes/Controller/BasketController.php');
539 539
         // Hook for getting a customized mail body.
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
         $newActionLog = GeneralUtility::makeInstance(ActionLog::class);
561 561
         $newActionLog->setFileName($pdfUrl);
562 562
         $newActionLog->setCountPages($numberOfPages);
563
-        $newActionLog->setLabel('Mail: ' . $mailObject->getMail());
563
+        $newActionLog->setLabel('Mail: '.$mailObject->getMail());
564 564
 
565 565
         if ($GLOBALS["TSFE"]->loginUser) {
566 566
             // internal user
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         foreach ($this->requestData['selected'] as $docId => $docValue) {
593 593
             if ($docValue['id']) {
594 594
                 $docData = $this->getDocumentData($docValue['id'], $docValue);
595
-                $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
595
+                $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
596 596
                 $numberOfPages += $docData['pageNums'];
597 597
             }
598 598
         }
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
                 if ($docValue['id']) {
611 611
                     $explodeId = explode("_", $docId);
612 612
                     $docData = $this->getDocumentData($explodeId[0], $docValue);
613
-                    $pdfUrl .= $docData['urlParams'] . $this->settings['pdfparamseparator'];
613
+                    $pdfUrl .= $docData['urlParams'].$this->settings['pdfparamseparator'];
614 614
                     $numberOfPages += $docData['pageNums'];
615 615
                 }
616 616
             }
@@ -627,12 +627,12 @@  discard block
 block discarded – undo
627 627
             // internal user
628 628
             $actionLog->setUserId($GLOBALS["TSFE"]->fe_user->user['uid']);
629 629
             $actionLog->setName($GLOBALS["TSFE"]->fe_user->user['username']);
630
-            $actionLog->setLabel('Print: ' . $printer->getLabel());
630
+            $actionLog->setLabel('Print: '.$printer->getLabel());
631 631
         } else {
632 632
             // external user
633 633
             $actionLog->setUserId(0);
634 634
             $actionLog->setName('n/a');
635
-            $actionLog->setLabel('Print: ' . $printer->getLabel());
635
+            $actionLog->setLabel('Print: '.$printer->getLabel());
636 636
         }
637 637
         // add action to protocol
638 638
         $this->actionLogRepository->add($actionLog);
Please login to merge, or discard this patch.
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
  * @subpackage dlf
32 32
  * @access public
33 33
  */
34
-class BasketController extends AbstractController
35
-{
34
+class BasketController extends AbstractController {
36 35
     /**
37 36
      * @var BasketRepository
38 37
      */
@@ -41,8 +40,7 @@  discard block
 block discarded – undo
41 40
     /**
42 41
      * @param BasketRepository $basketRepository
43 42
      */
44
-    public function injectBasketRepository(BasketRepository $basketRepository)
45
-    {
43
+    public function injectBasketRepository(BasketRepository $basketRepository) {
46 44
         $this->basketRepository = $basketRepository;
47 45
     }
48 46
 
@@ -54,8 +52,7 @@  discard block
 block discarded – undo
54 52
     /**
55 53
      * @param MailRepository $mailRepository
56 54
      */
57
-    public function injectMailRepository(MailRepository $mailRepository)
58
-    {
55
+    public function injectMailRepository(MailRepository $mailRepository) {
59 56
         $this->mailRepository = $mailRepository;
60 57
     }
61 58
 
@@ -67,8 +64,7 @@  discard block
 block discarded – undo
67 64
     /**
68 65
      * @param PrinterRepository $printerRepository
69 66
      */
70
-    public function injectPrinterRepository(PrinterRepository $printerRepository)
71
-    {
67
+    public function injectPrinterRepository(PrinterRepository $printerRepository) {
72 68
         $this->printerRepository = $printerRepository;
73 69
     }
74 70
 
@@ -80,8 +76,7 @@  discard block
 block discarded – undo
80 76
     /**
81 77
      * @param ActionLogRepository $actionLogRepository
82 78
      */
83
-    public function injectActionLogRepository(ActionLogRepository $actionLogRepository)
84
-    {
79
+    public function injectActionLogRepository(ActionLogRepository $actionLogRepository) {
85 80
         $this->actionLogRepository = $actionLogRepository;
86 81
     }
87 82
 
@@ -90,8 +85,7 @@  discard block
 block discarded – undo
90 85
      *
91 86
      * @return void
92 87
      */
93
-    public function basketAction()
94
-    {
88
+    public function basketAction() {
95 89
         $basket = $this->getBasketData();
96 90
 
97 91
         // action remove from basket
@@ -137,8 +131,7 @@  discard block
 block discarded – undo
137 131
      *
138 132
      * @return void
139 133
      */
140
-    public function addAction()
141
-    {
134
+    public function addAction() {
142 135
         $basket = $this->getBasketData();
143 136
 
144 137
         if (
@@ -156,8 +149,7 @@  discard block
 block discarded – undo
156 149
      *
157 150
      * @return void
158 151
      */
159
-    public function mainAction()
160
-    {
152
+    public function mainAction() {
161 153
         $basket = $this->getBasketData();
162 154
 
163 155
         $countDocs = 0;
@@ -203,8 +195,7 @@  discard block
 block discarded – undo
203 195
      *
204 196
      * @return Basket The found data from user session.
205 197
      */
206
-    protected function getBasketData()
207
-    {
198
+    protected function getBasketData() {
208 199
         // get user session
209 200
         $sessionId = $GLOBALS['TSFE']->fe_user->id;
210 201
 
@@ -238,8 +229,7 @@  discard block
 block discarded – undo
238 229
      *
239 230
      * @return string One basket entry
240 231
      */
241
-    protected function getEntry($data)
242
-    {
232
+    protected function getEntry($data) {
243 233
         if (is_object($data)) {
244 234
             $data = get_object_vars($data);
245 235
         }
@@ -291,8 +281,7 @@  discard block
 block discarded – undo
291 281
      *
292 282
      * @return mixed download url or false
293 283
      */
294
-    protected function getDocumentData($id, $data)
295
-    {
284
+    protected function getDocumentData($id, $data) {
296 285
         // get document instance to load further information
297 286
         $this->loadDocument(['id' => $id]);
298 287
         if ($this->document) {
@@ -360,8 +349,7 @@  discard block
 block discarded – undo
360 349
      *
361 350
      * @return array Basket data and JavaScript output
362 351
      */
363
-    protected function addToBasket($_piVars, $basket)
364
-    {
352
+    protected function addToBasket($_piVars, $basket) {
365 353
         $output = '';
366 354
 
367 355
         if (!$_piVars['startpage']) {
@@ -468,8 +456,7 @@  discard block
 block discarded – undo
468 456
      *
469 457
      * @return Basket basket
470 458
      */
471
-    protected function removeFromBasket($_piVars, $basket)
472
-    {
459
+    protected function removeFromBasket($_piVars, $basket) {
473 460
         if (!empty($basket->getDocIds())) {
474 461
             $items = json_decode($basket->getDocIds());
475 462
             $items = get_object_vars($items);
@@ -507,8 +494,7 @@  discard block
 block discarded – undo
507 494
      *
508 495
      * @return void
509 496
      */
510
-    protected function sendMail()
511
-    {
497
+    protected function sendMail() {
512 498
         // send mail
513 499
         $mailId = $this->requestData['mail_action'];
514 500
 
@@ -585,8 +571,7 @@  discard block
 block discarded – undo
585 571
      *
586 572
      * @return void
587 573
      */
588
-    protected function printDocument($basket)
589
-    {
574
+    protected function printDocument($basket) {
590 575
         $pdfUrl = $this->settings['pdfprint'];
591 576
         $numberOfPages = 0;
592 577
         foreach ($this->requestData['selected'] as $docId => $docValue) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
         $countDocs = 0;
164 164
         if ($basket->getDocIds()) {
165
-            $countDocs = count(json_decode($basket->getDocIds(), true));
165
+            $countDocs = count(json_decode($basket->getDocIds(), TRUE));
166 166
         }
167 167
         $this->view->assign('countDocs', $countDocs);
168 168
 
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
             $basket = $this->basketRepository->findOneByFeUserId((int) $GLOBALS['TSFE']->fe_user->user['uid']);
213 213
         } else {
214 214
             $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_dlf_basket', '');
215
-            $GLOBALS['TSFE']->fe_user->sesData_change = true;
215
+            $GLOBALS['TSFE']->fe_user->sesData_change = TRUE;
216 216
             $GLOBALS['TSFE']->fe_user->storeSessionData();
217 217
 
218 218
             $basket = $this->basketRepository->findOneBySessionId($sessionId);
219 219
         }
220 220
         // session does not exist
221
-        if ($basket === null) {
221
+        if ($basket === NULL) {
222 222
             // create new basket in db
223 223
             $basket = GeneralUtility::makeInstance(Basket::class);
224 224
             $basket->setSessionId($sessionId);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                 'record_id' => $this->document->getRecordId(),
348 348
             ];
349 349
         }
350
-        return false;
350
+        return FALSE;
351 351
     }
352 352
 
353 353
     /**
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         } else {
370 370
             $page = (int) $_piVars['startpage'];
371 371
         }
372
-        if ($page != null || $_piVars['addToBasket'] == 'list') {
372
+        if ($page != NULL || $_piVars['addToBasket'] == 'list') {
373 373
             $documentItem = [
374 374
                 'id' => (int) $_piVars['id'],
375 375
                 'startpage' => (int) $_piVars['startpage'],
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
             }
445 445
 
446 446
             $basket->setDocIds(json_encode($items));
447
-            if ($basket->getUid() === null) {
447
+            if ($basket->getUid() === NULL) {
448 448
                 $this->basketRepository->add($basket);
449 449
             } else {
450 450
                 $this->basketRepository->update($basket);
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.