@@ -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); |
@@ -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 | } |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | |
| 51 | 51 | $name = ['family' => '', 'given' => '']; |
| 52 | 52 | |
| 53 | - $family = $xpath->query('family', $person); |
|
| 53 | + $family = $xpath->query('family', $person); |
|
| 54 | 54 | if ($family->length > 0) { |
| 55 | 55 | $name['family'] = $family->item(0)->nodeValue; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $given = $xpath->query('given', $person); |
|
| 58 | + $given = $xpath->query('given', $person); |
|
| 59 | 59 | if ($given->length > 0) { |
| 60 | 60 | $name['given'] = $given->item(0)->nodeValue; |
| 61 | 61 | } |
@@ -440,49 +440,49 @@ |
||
| 440 | 440 | * |
| 441 | 441 | * @var string |
| 442 | 442 | */ |
| 443 | - protected $personXpath = ''; |
|
| 443 | + protected $personXpath = ''; |
|
| 444 | 444 | |
| 445 | 445 | /** |
| 446 | 446 | * Person family Xpath |
| 447 | 447 | * |
| 448 | 448 | * @var string |
| 449 | 449 | */ |
| 450 | - protected $personFamilyXpath = ''; |
|
| 450 | + protected $personFamilyXpath = ''; |
|
| 451 | 451 | |
| 452 | 452 | /** |
| 453 | 453 | * Person given xpath |
| 454 | 454 | * |
| 455 | 455 | * @var string |
| 456 | 456 | */ |
| 457 | - protected $personGivenXpath = ''; |
|
| 457 | + protected $personGivenXpath = ''; |
|
| 458 | 458 | |
| 459 | 459 | /** |
| 460 | 460 | * Person role xpath |
| 461 | 461 | * |
| 462 | 462 | * @var string |
| 463 | 463 | */ |
| 464 | - protected $personRoleXpath = ''; |
|
| 464 | + protected $personRoleXpath = ''; |
|
| 465 | 465 | |
| 466 | 466 | /** |
| 467 | 467 | * Person fis identifier xpath |
| 468 | 468 | * |
| 469 | 469 | * @var string |
| 470 | 470 | */ |
| 471 | - protected $personFisIdentifierXpath = ''; |
|
| 471 | + protected $personFisIdentifierXpath = ''; |
|
| 472 | 472 | |
| 473 | 473 | /** |
| 474 | 474 | * Person affiliation xpath |
| 475 | 475 | * |
| 476 | 476 | * @var string |
| 477 | 477 | */ |
| 478 | - protected $personAffiliationXpath = ''; |
|
| 478 | + protected $personAffiliationXpath = ''; |
|
| 479 | 479 | |
| 480 | 480 | /** |
| 481 | 481 | * Person affiliation identifier xpath |
| 482 | 482 | * |
| 483 | 483 | * @var string |
| 484 | 484 | */ |
| 485 | - protected $personAffiliationIdentifierXpath = ''; |
|
| 485 | + protected $personAffiliationIdentifierXpath = ''; |
|
| 486 | 486 | |
| 487 | 487 | /** |
| 488 | 488 | * Source details xpaths (Semicolon separated) |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | |
| 51 | 51 | $name = ['family' => '', 'given' => '']; |
| 52 | 52 | |
| 53 | - $family = $xpath->query('family', $person); |
|
| 53 | + $family = $xpath->query('family', $person); |
|
| 54 | 54 | if ($family->length > 0) { |
| 55 | 55 | $name['family'] = $family->item(0)->nodeValue; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $given = $xpath->query('given', $person); |
|
| 58 | + $given = $xpath->query('given', $person); |
|
| 59 | 59 | if ($given->length > 0) { |
| 60 | 60 | $name['given'] = $given->item(0)->nodeValue; |
| 61 | 61 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $node = $this->getDataXpath()->query('/mods:mods/mods:titleInfo[1]/mods:subTitle[1]'); |
| 33 | 33 | |
| 34 | 34 | if ($node->length == 1) { |
| 35 | - $title .= " - ".$node->item(0)->nodeValue; |
|
| 35 | + $title .= " - " . $node->item(0)->nodeValue; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | return $title; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $name = ['family' => '', 'given' => '']; |
| 52 | 52 | |
| 53 | - $namePartNodes = $xpath->query('mods:namePart', $person); |
|
| 53 | + $namePartNodes = $xpath->query('mods:namePart', $person); |
|
| 54 | 54 | |
| 55 | 55 | if ($namePartNodes->length > 0) { |
| 56 | 56 | |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | |
| 51 | 51 | $name = ['family' => '', 'given' => '']; |
| 52 | 52 | |
| 53 | - $family = $xpath->query('family', $person); |
|
| 53 | + $family = $xpath->query('family', $person); |
|
| 54 | 54 | if ($family->length > 0) { |
| 55 | 55 | $name['family'] = $family->item(0)->nodeValue; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $given = $xpath->query('given', $person); |
|
| 58 | + $given = $xpath->query('given', $person); |
|
| 59 | 59 | if ($given->length > 0) { |
| 60 | 60 | $name['given'] = $given->item(0)->nodeValue; |
| 61 | 61 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | |
| 51 | 51 | $name = ['family' => '', 'given' => '']; |
| 52 | 52 | |
| 53 | - $namePartNodes = $xpath->query('Name', $person); |
|
| 53 | + $namePartNodes = $xpath->query('Name', $person); |
|
| 54 | 54 | |
| 55 | 55 | if ($namePartNodes->length > 0) { |
| 56 | 56 | $name['family'] = $namePartNodes->item(0)->nodeValue; |