@@ -34,7 +34,7 @@ |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate( |
| 37 | - "manager.documentList.state.".$aliasState, |
|
| 37 | + "manager.documentList.state." . $aliasState, |
|
| 38 | 38 | 'dpf', |
| 39 | 39 | $arguments = null |
| 40 | 40 | ); |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | // check if new document form has more field items as the existing form |
| 403 | 403 | if ($valueFieldCounter < $fieldCounter && !$checkFieldsForAdding) { |
| 404 | 404 | // field added |
| 405 | - for ($i = count($valueField); $i < $fieldCounter;$i++) { |
|
| 405 | + for ($i = count($valueField); $i < $fieldCounter; $i++) { |
|
| 406 | 406 | $returnArray['added'][] = $docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup][$keyRepeatGroup]->getItems()[$keyField][$i]; |
| 407 | 407 | |
| 408 | 408 | } |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | if ($valueGroupCounter < count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup])) { |
| 415 | 415 | // group added |
| 416 | 416 | $counter = count($docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup]); |
| 417 | - for ($i = $valueGroupCounter; $i < $counter;$i++) { |
|
| 417 | + for ($i = $valueGroupCounter; $i < $counter; $i++) { |
|
| 418 | 418 | $returnArray['added'][] = $docForm2->getItems()[$keyPage][$keyRepeatPage]->getItems()[$keyGroup][$i]; |
| 419 | 419 | } |
| 420 | 420 | } |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | |
| 664 | 664 | $newDocument->setState(DocumentWorkflow::STATE_NEW_NONE); |
| 665 | 665 | |
| 666 | - $copyTitle = LocalizationUtility::translate("manager.workspace.title.copy", "dpf").$document->getTitle(); |
|
| 666 | + $copyTitle = LocalizationUtility::translate("manager.workspace.title.copy", "dpf") . $document->getTitle(); |
|
| 667 | 667 | |
| 668 | 668 | $newDocument->setTitle($copyTitle); |
| 669 | 669 | |
@@ -804,7 +804,7 @@ discard block |
||
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | $this->editingLockService->lock( |
| 807 | - ($document->getObjectIdentifier()? $document->getObjectIdentifier() : $document->getUid()), |
|
| 807 | + ($document->getObjectIdentifier() ? $document->getObjectIdentifier() : $document->getUid()), |
|
| 808 | 808 | $this->security->getUser()->getUid() |
| 809 | 809 | ); |
| 810 | 810 | |
@@ -871,7 +871,7 @@ discard block |
||
| 871 | 871 | $documentForm = $documentMapper->getDocumentForm($document); |
| 872 | 872 | |
| 873 | 873 | $this->view->assign('suggestMod', true); |
| 874 | - $this->forward('edit','DocumentFormBackoffice',NULL, ['documentForm' => $documentForm, 'suggestMod' => true]); |
|
| 874 | + $this->forward('edit', 'DocumentFormBackoffice', NULL, ['documentForm' => $documentForm, 'suggestMod' => true]); |
|
| 875 | 875 | } |
| 876 | 876 | |
| 877 | 877 | |
@@ -1008,7 +1008,7 @@ discard block |
||
| 1008 | 1008 | |
| 1009 | 1009 | if ($this->documentManager->update($document, $workflowTransition)) { |
| 1010 | 1010 | |
| 1011 | - $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.success'; |
|
| 1011 | + $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.success'; |
|
| 1012 | 1012 | $this->flashMessage($document, $key, AbstractMessage::OK); |
| 1013 | 1013 | |
| 1014 | 1014 | if ($this->security->getUserRole() === Security::ROLE_LIBRARIAN) { |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | |
| 1038 | 1038 | $this->redirectToDocumentList(); |
| 1039 | 1039 | } else { |
| 1040 | - $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.failure'; |
|
| 1040 | + $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.failure'; |
|
| 1041 | 1041 | $this->flashMessage($document, $key, AbstractMessage::ERROR); |
| 1042 | 1042 | $this->redirect('showDetails', 'Document', NULL, ['document' => $document]); |
| 1043 | 1043 | } |
@@ -1048,7 +1048,7 @@ discard block |
||
| 1048 | 1048 | if ($exception instanceof DPFExceptionInterface) { |
| 1049 | 1049 | $key = $exception->messageLanguageKey(); |
| 1050 | 1050 | } else { |
| 1051 | - $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:'.$messageKeyPart.'.failure'; |
|
| 1051 | + $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:' . $messageKeyPart . '.failure'; |
|
| 1052 | 1052 | } |
| 1053 | 1053 | $this->flashMessage($document, $key, AbstractMessage::ERROR); |
| 1054 | 1054 | $this->redirectToDocumentList(); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | public function arrayRecursiveDiff($aArray1, $aArray2) { |
| 95 | - $aReturn = array(); |
|
| 95 | + $aReturn = array (); |
|
| 96 | 96 | |
| 97 | 97 | foreach ($aArray1 as $mKey => $mValue) { |
| 98 | 98 | if (array_key_exists($mKey, $aArray2)) { |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | $message = LocalizationUtility::translate( |
| 147 | 147 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.accessDenied', |
| 148 | 148 | 'dpf', |
| 149 | - array($document->getTitle()) |
|
| 149 | + array ($document->getTitle()) |
|
| 150 | 150 | ); |
| 151 | 151 | } else { |
| 152 | 152 | $message = LocalizationUtility::translate( |
| 153 | 153 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_edit.failureBlocked', |
| 154 | 154 | 'dpf', |
| 155 | - array($document->getTitle()) |
|
| 155 | + array ($document->getTitle()) |
|
| 156 | 156 | ); |
| 157 | 157 | } |
| 158 | 158 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $this->view->assign('suggestMod', $suggestMod); |
| 166 | 166 | |
| 167 | 167 | $this->editingLockService->lock( |
| 168 | - ($document->getObjectIdentifier()? $document->getObjectIdentifier() : $document->getUid()), |
|
| 168 | + ($document->getObjectIdentifier() ? $document->getObjectIdentifier() : $document->getUid()), |
|
| 169 | 169 | $this->security->getUser()->getUid() |
| 170 | 170 | ); |
| 171 | 171 | |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | } catch (\Throwable $t) { |
| 288 | 288 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR; |
| 289 | - $this->addFlashMessage("Failed", '', $severity,false); |
|
| 289 | + $this->addFlashMessage("Failed", '', $severity, false); |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | $this->redirectToDocumentList(); |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | $message = LocalizationUtility::translate( |
| 349 | 349 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.accessDenied', |
| 350 | 350 | 'dpf', |
| 351 | - array($document->getTitle()) |
|
| 351 | + array ($document->getTitle()) |
|
| 352 | 352 | ); |
| 353 | 353 | $this->addFlashMessage($message, '', AbstractMessage::ERROR); |
| 354 | 354 | |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $workflowTransition = null; |
| 377 | 377 | |
| 378 | 378 | // Convert the temporary copy into a local working copy if needed. |
| 379 | - if ( $updateDocument->isTemporaryCopy() && $saveMode == 'saveWorkingCopy') { |
|
| 379 | + if ($updateDocument->isTemporaryCopy() && $saveMode == 'saveWorkingCopy') { |
|
| 380 | 380 | $saveWorkingCopy = true; |
| 381 | 381 | $updateDocument->setTemporary(false); |
| 382 | 382 | $workflowTransition = DocumentWorkflow::TRANSITION_IN_PROGRESS; |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | $message = LocalizationUtility::translate( |
| 429 | 429 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.success', |
| 430 | 430 | 'dpf', |
| 431 | - array($updateDocument->getTitle()) |
|
| 431 | + array ($updateDocument->getTitle()) |
|
| 432 | 432 | ); |
| 433 | 433 | $this->addFlashMessage($message, '', AbstractMessage::OK); |
| 434 | 434 | |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | $message = LocalizationUtility::translate( |
| 483 | 483 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.failure', |
| 484 | 484 | 'dpf', |
| 485 | - array($updateDocument->getTitle()) |
|
| 485 | + array ($updateDocument->getTitle()) |
|
| 486 | 486 | ); |
| 487 | 487 | $this->addFlashMessage($message, '', AbstractMessage::ERROR); |
| 488 | 488 | } |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | $exceptionMsg[] = LocalizationUtility::translate( |
| 517 | 517 | 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_update.failure', |
| 518 | 518 | 'dpf', |
| 519 | - array($updateDocument->getTitle()) |
|
| 519 | + array ($updateDocument->getTitle()) |
|
| 520 | 520 | ); |
| 521 | 521 | |
| 522 | 522 | $exceptionMsg[] = LocalizationUtility::translate($key, 'dpf'); |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | if ($redirectUri) { |
| 646 | 646 | $this->redirectToUri($redirectUri); |
| 647 | 647 | } else { |
| 648 | - $this->redirect($action, $controller, null, array('message' => $message)); |
|
| 648 | + $this->redirect($action, $controller, null, array ('message' => $message)); |
|
| 649 | 649 | } |
| 650 | 650 | } |
| 651 | 651 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->addFlashMessage( |
| 52 | 52 | LocalizationUtility::translate("manager.locallang.user.settings.message.invalidFisId", "dpf"), |
| 53 | 53 | '', |
| 54 | - $severity,false |
|
| 54 | + $severity, false |
|
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->addFlashMessage( |
| 62 | 62 | LocalizationUtility::translate("manager.locallang.user.settings.message.successfullySaved", "dpf"), |
| 63 | 63 | '', |
| 64 | - $severity,false |
|
| 64 | + $severity, false |
|
| 65 | 65 | ); |
| 66 | 66 | |
| 67 | 67 | $this->forward('settings'); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | if ($this->documentManager->update($doc, null, [], [], true)) { |
| 262 | - return '{"success": "Document '.$document.' added '.$id.'"}'; |
|
| 262 | + return '{"success": "Document ' . $document . ' added ' . $id . '"}'; |
|
| 263 | 263 | } else { |
| 264 | 264 | return '{"failed": Could not update the Document"}'; |
| 265 | 265 | } |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | return '{"error": "Invalid data in parameter json."}'; |
| 299 | 299 | } |
| 300 | 300 | } else { |
| 301 | - if (empty($json) || json_decode($json,true) === []) { |
|
| 301 | + if (empty($json) || json_decode($json, true) === []) { |
|
| 302 | 302 | return '{"error": "Parameter json can not be empty."}'; |
| 303 | 303 | } |
| 304 | 304 | if (is_null(json_decode($json))) { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $doc = $this->documentManager->read($document); |
| 311 | 311 | |
| 312 | 312 | if (!$doc) { |
| 313 | - return '{"failed": "Document does not exist: '.$document.'"}'; |
|
| 313 | + return '{"failed": "Document does not exist: ' . $document . '"}'; |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | if ($doc->getState() === DocumentWorkflow::STATE_NEW_NONE) { |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | if ($linkedDocument) { |
| 326 | - return '{"failed": "There is already a suggestion for the document: '.$linkedDocument->getUid().'"}'; |
|
| 326 | + return '{"failed": "There is already a suggestion for the document: ' . $linkedDocument->getUid() . '"}'; |
|
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | $mapper = $this->objectManager->get(\EWW\Dpf\Services\Api\JsonToDocumentMapper::class); |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | $missingArguments = []; |
| 682 | 682 | foreach ($parameterNames as $parameterName) { |
| 683 | 683 | if (!$this->request->hasArgument($parameterName)) { |
| 684 | - $missingArguments[] = $parameterName; |
|
| 684 | + $missingArguments[] = $parameterName; |
|
| 685 | 685 | } |
| 686 | 686 | } |
| 687 | 687 | |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | $this->throwStatus( |
| 690 | 690 | 400, |
| 691 | 691 | null, |
| 692 | - '{"error": "Missing parameters: '.implode(", ", $missingArguments).'"}' |
|
| 692 | + '{"error": "Missing parameters: ' . implode(", ", $missingArguments) . '"}' |
|
| 693 | 693 | ); |
| 694 | 694 | } |
| 695 | 695 | |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | $this->throwStatus( |
| 720 | 720 | 400, |
| 721 | 721 | null, |
| 722 | - '{"error": "An invalid action hes been called: '.$actionName.'"}' |
|
| 722 | + '{"error": "An invalid action hes been called: ' . $actionName . '"}' |
|
| 723 | 723 | ); |
| 724 | 724 | } |
| 725 | 725 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $this->request->setArguments($requestArguments); |
| 184 | 184 | } else { |
| 185 | 185 | $t = $docForm->getNewFileNames(); |
| 186 | - $this->redirect('list', 'DocumentForm', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t)); |
|
| 186 | + $this->redirect('list', 'DocumentForm', null, array ('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t)); |
|
| 187 | 187 | } |
| 188 | 188 | } else { |
| 189 | 189 | $this->redirectToList("UPLOAD_POST_SIZE_ERROR"); |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | $this->request->setArguments($requestArguments); |
| 339 | 339 | } else { |
| 340 | 340 | $t = $docForm->getNewFileNames(); |
| 341 | - $this->redirect('list', 'Document', null, array('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t)); |
|
| 341 | + $this->redirect('list', 'Document', null, array ('message' => 'UPLOAD_MAX_FILESIZE_ERROR', 'errorFiles' => $t)); |
|
| 342 | 342 | } |
| 343 | 343 | } else { |
| 344 | 344 | $this->redirectToList("UPLOAD_POST_SIZE_ERROR"); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | */ |
| 251 | 251 | public function searchFisAction($searchTerm, $type = 'person') { |
| 252 | 252 | $fisUserDataService = new FisDataService(); |
| 253 | - $methodName = 'search'.ucfirst($type).'Request'; |
|
| 253 | + $methodName = 'search' . ucfirst($type) . 'Request'; |
|
| 254 | 254 | $result = $fisUserDataService->{$methodName}($searchTerm); |
| 255 | 255 | |
| 256 | 256 | return json_encode($result); |
@@ -267,10 +267,10 @@ discard block |
||
| 267 | 267 | */ |
| 268 | 268 | public function getFisDataAction($dataId, $groupId, $groupIndex, $fieldIndex, $pageId, $type = 'person') { |
| 269 | 269 | $fisDataService = new FisDataService(); |
| 270 | - $methodName = 'get'.ucfirst($type).'Data'; |
|
| 270 | + $methodName = 'get' . ucfirst($type) . 'Data'; |
|
| 271 | 271 | $fisData = $fisDataService->{$methodName}($dataId); |
| 272 | 272 | |
| 273 | - $result = $this->getApiMappingArray($groupId, $fisData, $groupIndex, $fieldIndex, $pageId, 'getFis'.ucfirst($type).'Mapping'); |
|
| 273 | + $result = $this->getApiMappingArray($groupId, $fisData, $groupIndex, $fieldIndex, $pageId, 'getFis' . ucfirst($type) . 'Mapping'); |
|
| 274 | 274 | |
| 275 | 275 | return json_encode($result); |
| 276 | 276 | } |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | */ |
| 283 | 283 | public function searchGndAction($searchTerm, $type = 'person') { |
| 284 | 284 | $gndUserDataService = new GndDataService(); |
| 285 | - $methodName = 'search'.ucfirst($type).'Request'; |
|
| 285 | + $methodName = 'search' . ucfirst($type) . 'Request'; |
|
| 286 | 286 | $result = $gndUserDataService->{$methodName}($searchTerm); |
| 287 | 287 | |
| 288 | 288 | return json_encode($result); |
@@ -298,10 +298,10 @@ discard block |
||
| 298 | 298 | */ |
| 299 | 299 | public function getGndDataAction($dataId, $groupId, $groupIndex, $fieldIndex, $pageId, $type = 'person') { |
| 300 | 300 | $gndUserDataService = new GndDataService(); |
| 301 | - $methodName = 'get'.ucfirst($type).'Data'; |
|
| 301 | + $methodName = 'get' . ucfirst($type) . 'Data'; |
|
| 302 | 302 | $gndData = $gndUserDataService->{$methodName}($dataId); |
| 303 | 303 | |
| 304 | - $result = $this->getApiMappingArray($groupId, $gndData, $groupIndex, $fieldIndex, $pageId, 'getGnd'.ucfirst($type).'Mapping'); |
|
| 304 | + $result = $this->getApiMappingArray($groupId, $gndData, $groupIndex, $fieldIndex, $pageId, 'getGnd' . ucfirst($type) . 'Mapping'); |
|
| 305 | 305 | |
| 306 | 306 | return json_encode($result); |
| 307 | 307 | } |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | */ |
| 397 | 397 | public function searchOrcidAction($searchTerm, $type = 'person') { |
| 398 | 398 | $orcidUserDataService = new OrcidDataService(); |
| 399 | - $methodName = 'search'.ucfirst($type).'Request'; |
|
| 399 | + $methodName = 'search' . ucfirst($type) . 'Request'; |
|
| 400 | 400 | $result = $orcidUserDataService->{$methodName}($searchTerm); |
| 401 | 401 | |
| 402 | 402 | return json_encode($result); |
@@ -413,10 +413,10 @@ discard block |
||
| 413 | 413 | */ |
| 414 | 414 | public function getOrcidDataAction($dataId, $groupId, $groupIndex, $fieldIndex, $pageId, $type = 'person') { |
| 415 | 415 | $orcidDataService = new OrcidDataService(); |
| 416 | - $methodName = 'get'.ucfirst($type).'Data'; |
|
| 416 | + $methodName = 'get' . ucfirst($type) . 'Data'; |
|
| 417 | 417 | $orcidData = $orcidDataService->{$methodName}($dataId); |
| 418 | 418 | |
| 419 | - $result = $this->getApiMappingArray($groupId, $orcidData, $groupIndex, $fieldIndex, $pageId, 'getOrcid'.ucfirst($type).'Mapping'); |
|
| 419 | + $result = $this->getApiMappingArray($groupId, $orcidData, $groupIndex, $fieldIndex, $pageId, 'getOrcid' . ucfirst($type) . 'Mapping'); |
|
| 420 | 420 | |
| 421 | 421 | return json_encode($result); |
| 422 | 422 | } |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | public function generateApiTokenAction($feUser) { |
| 553 | 553 | $currentUser = $this->security->getUser(); |
| 554 | 554 | if ($currentUser->getUid() === $feUser) { |
| 555 | - $string = md5(substr(md5(time()), 0, 14)).date("Y-m-dH:i:s"); |
|
| 555 | + $string = md5(substr(md5(time()), 0, 14)) . date("Y-m-dH:i:s"); |
|
| 556 | 556 | $hash = hash('sha256', $string); |
| 557 | 557 | |
| 558 | 558 | $currentUser->setApiToken($hash); |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | public function setObjectIdentifier($objectIdentifier) |
| 355 | 355 | { |
| 356 | 356 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 357 | - $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
|
| 357 | + $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier; |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | /** |
@@ -536,14 +536,14 @@ discard block |
||
| 536 | 536 | |
| 537 | 537 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 538 | 538 | |
| 539 | - $files = array(); |
|
| 539 | + $files = array (); |
|
| 540 | 540 | |
| 541 | 541 | if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) { |
| 542 | 542 | foreach ($this->getFile() as $file) { |
| 543 | 543 | |
| 544 | 544 | if (!$file->isFileGroupDeleted()) { |
| 545 | 545 | |
| 546 | - $tmpFile = array( |
|
| 546 | + $tmpFile = array ( |
|
| 547 | 547 | 'path' => $file->getUrl(), |
| 548 | 548 | 'type' => $file->getContentType(), |
| 549 | 549 | 'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()), |
@@ -587,12 +587,12 @@ discard block |
||
| 587 | 587 | |
| 588 | 588 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 589 | 589 | |
| 590 | - $files = array(); |
|
| 590 | + $files = array (); |
|
| 591 | 591 | |
| 592 | 592 | if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) { |
| 593 | 593 | foreach ($this->getFile() as $file) { |
| 594 | 594 | |
| 595 | - $tmpFile = array( |
|
| 595 | + $tmpFile = array ( |
|
| 596 | 596 | 'path' => $file->getUrl(), |
| 597 | 597 | 'type' => $file->getContentType(), |
| 598 | 598 | 'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()), |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | */ |
| 746 | 746 | public function getCreator() |
| 747 | 747 | { |
| 748 | - return $this->creator? $this->creator : 0; |
|
| 748 | + return $this->creator ? $this->creator : 0; |
|
| 749 | 749 | } |
| 750 | 750 | |
| 751 | 751 | /** |
@@ -900,7 +900,7 @@ discard block |
||
| 900 | 900 | |
| 901 | 901 | foreach ($availableProperties as $propertyName) { |
| 902 | 902 | if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName) |
| 903 | - && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 903 | + && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 904 | 904 | |
| 905 | 905 | $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName); |
| 906 | 906 | \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue); |
@@ -922,7 +922,7 @@ discard block |
||
| 922 | 922 | */ |
| 923 | 923 | public function getDocumentIdentifier() |
| 924 | 924 | { |
| 925 | - return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid(); |
|
| 925 | + return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid(); |
|
| 926 | 926 | } |
| 927 | 927 | |
| 928 | 928 | /** |
@@ -955,8 +955,8 @@ discard block |
||
| 955 | 955 | public function getPublicationYear() |
| 956 | 956 | { |
| 957 | 957 | $internalFormat = new \EWW\Dpf\Helper\InternalFormat($this->getXmlData()); |
| 958 | - $year = $internalFormat->getPublishingYear(); |
|
| 959 | - return $year? $year : ""; |
|
| 958 | + $year = $internalFormat->getPublishingYear(); |
|
| 959 | + return $year ? $year : ""; |
|
| 960 | 960 | } |
| 961 | 961 | |
| 962 | 962 | /* |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $name['family'] = $family->item(0)->nodeValue; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - $given = $xpath->query('givenName', $person); |
|
| 50 | + $given = $xpath->query('givenName', $person); |
|
| 51 | 51 | if ($given->length > 0) { |
| 52 | 52 | $name['given'] = $given->item(0)->nodeValue; |
| 53 | 53 | } |