@@ -30,7 +30,7 @@ |
||
| 30 | 30 | { |
| 31 | 31 | $query = $this->createQuery(); |
| 32 | 32 | |
| 33 | - $constraints = array(); |
|
| 33 | + $constraints = array (); |
|
| 34 | 34 | $constraints[] = $query->equals('publication_identifier', $identifier); |
| 35 | 35 | $constraints[] = $query->equals('fe_user', $feUser); |
| 36 | 36 | |
@@ -19,13 +19,13 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | class MetadataGroupRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository |
| 21 | 21 | { |
| 22 | - public function findPersonGroup(){ |
|
| 22 | + public function findPersonGroup() { |
|
| 23 | 23 | |
| 24 | 24 | $query = $this->createQuery(); |
| 25 | 25 | |
| 26 | - $constraints = array(); |
|
| 27 | - $constraints[] = $query->like('group_type', '%Person%'); |
|
| 28 | - $constraints[] = $query->like('group_type', '%Fis%'); |
|
| 26 | + $constraints = array (); |
|
| 27 | + $constraints[] = $query->like('group_type', '%Person%'); |
|
| 28 | + $constraints[] = $query->like('group_type', '%Fis%'); |
|
| 29 | 29 | |
| 30 | 30 | if (count($constraints)) { |
| 31 | 31 | $query->matching( |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | $documentTypes = $this->findAll(); |
| 25 | 25 | |
| 26 | - $data = array(); |
|
| 27 | - $docTypes = array(); |
|
| 28 | - $name = array(); |
|
| 29 | - $type = array(); |
|
| 26 | + $data = array (); |
|
| 27 | + $docTypes = array (); |
|
| 28 | + $name = array (); |
|
| 29 | + $type = array (); |
|
| 30 | 30 | |
| 31 | 31 | foreach ($documentTypes as $docType) { |
| 32 | - $data[] = array( |
|
| 32 | + $data[] = array ( |
|
| 33 | 33 | "name" => $docType->getDisplayName(), |
| 34 | 34 | "type" => $docType, |
| 35 | 35 | ); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | $query = $this->createQuery(); |
| 60 | 60 | $query->matching( |
| 61 | - $query->like($externalTypesDbColumn, '%"'.$type.'"%') |
|
| 61 | + $query->like($externalTypesDbColumn, '%"' . $type . '"%') |
|
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | 64 | return $query->execute()->getFirst(); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class); |
| 42 | 42 | $clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class); |
| 43 | 43 | |
| 44 | - $namespaceConfiguration = explode(";",$clientConfigurationManager->getNamespaces()); |
|
| 44 | + $namespaceConfiguration = explode(";", $clientConfigurationManager->getNamespaces()); |
|
| 45 | 45 | |
| 46 | 46 | $xpath = new \DOMXPath($dom); |
| 47 | 47 | |
@@ -131,11 +131,11 @@ discard block |
||
| 131 | 131 | $query = $this->queryBuilder->buildQuery( |
| 132 | 132 | 1, [], 0, |
| 133 | 133 | [], [], [], null, null, |
| 134 | - 'identifier:"'.$identifier.'"' |
|
| 134 | + 'identifier:"' . $identifier . '"' |
|
| 135 | 135 | ); |
| 136 | 136 | |
| 137 | 137 | try { |
| 138 | - $results = $this->elasticSearch->search($query, 'object'); |
|
| 138 | + $results = $this->elasticSearch->search($query, 'object'); |
|
| 139 | 139 | if (is_array($results) && $results['hits']['total']['value'] > 0) { |
| 140 | 140 | $localizedIdentifiers['objectIdentifier'] = $results['hits']['hits'][0]['_id']; |
| 141 | 141 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | // check embargo |
| 264 | - if(!$this->hasActiveEmbargo($document)){ |
|
| 264 | + if (!$this->hasActiveEmbargo($document)) { |
|
| 265 | 265 | $this->removeDocument($document); |
| 266 | 266 | } else { |
| 267 | 267 | $document->setState(DocumentWorkflow::constructState(DocumentWorkflow::LOCAL_STATE_IN_PROGRESS, $document->getRemoteState())); |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | |
| 418 | 418 | if ($this->getDocumentTransferManager()->update($document)) { |
| 419 | 419 | |
| 420 | - if(!$this->hasActiveEmbargo($document)){ |
|
| 420 | + if (!$this->hasActiveEmbargo($document)) { |
|
| 421 | 421 | $this->removeDocument($document); |
| 422 | 422 | } else { |
| 423 | 423 | $document->setState(DocumentWorkflow::LOCAL_STATE_IN_PROGRESS . ':' . $document->getRemoteState()); |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | protected function hasActiveEmbargo($document) |
| 500 | 500 | { |
| 501 | 501 | $currentDate = new \DateTime('now'); |
| 502 | - if($currentDate > $document->getEmbargoDate()){ |
|
| 502 | + if ($currentDate > $document->getEmbargoDate()) { |
|
| 503 | 503 | // embargo is expired |
| 504 | 504 | return false; |
| 505 | 505 | } else { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | public function searchPersonRequest($searchTerm) { |
| 21 | 21 | $response = Request::get($this->apiUrl . '/expanded-search/?q=' . $this->searchTermReplacement($searchTerm)) |
| 22 | 22 | ->expectsJson() |
| 23 | - ->addHeader('Accept','*/*') |
|
| 23 | + ->addHeader('Accept', '*/*') |
|
| 24 | 24 | ->addHeader('Content-Type', 'application/vnd.orcid+json') |
| 25 | 25 | ->send(); |
| 26 | 26 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function getPersonData($orcidId) { |
| 31 | 31 | $response = Request::get($this->apiUrl . '/expanded-search/?q=orcid:' . $orcidId) |
| 32 | 32 | ->expectsJson() |
| 33 | - ->addHeader('Accept','*/*') |
|
| 33 | + ->addHeader('Accept', '*/*') |
|
| 34 | 34 | ->addHeader('Content-Type', 'application/vnd.orcid+json') |
| 35 | 35 | ->send(); |
| 36 | 36 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | public function searchRequest($searchTerm) { |
| 26 | 26 | $mail = $this->clientConfigurationManager->getSetting("adminEmail"); |
| 27 | - $response = Request::get($this->apiUrl . '' . $searchTerm .'?email=' . $mail) |
|
| 27 | + $response = Request::get($this->apiUrl . '' . $searchTerm . '?email=' . $mail) |
|
| 28 | 28 | ->send(); |
| 29 | 29 | if ($response->body->HTTP_status_code == 404) { |
| 30 | 30 | return ['entries' => '']; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function getDataRequest($id) { |
| 39 | 39 | $mail = $this->clientConfigurationManager->getSetting("adminEmail"); |
| 40 | - $response = Request::get($this->apiUrl . '' . $id .'?email=' . $mail) |
|
| 40 | + $response = Request::get($this->apiUrl . '' . $id . '?email=' . $mail) |
|
| 41 | 41 | ->send(); |
| 42 | 42 | |
| 43 | 43 | if ($response->body->HTTP_status_code == 404) { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | protected function getPersonRequestBody($id) { |
| 48 | 48 | $graphQl = '{ |
| 49 | - person (id:"'.$id.'") |
|
| 49 | + person (id:"'.$id . '") |
|
| 50 | 50 | { |
| 51 | 51 | _createDate |
| 52 | 52 | _createUser |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | protected function getSearchPersonBody($searchTerm) { |
| 74 | 74 | $graphQl = '{ |
| 75 | - staff(filter: {fullName: "'.$searchTerm.'"}, pageSize: 100) |
|
| 75 | + staff(filter: {fullName: "'.$searchTerm . '"}, pageSize: 100) |
|
| 76 | 76 | { |
| 77 | 77 | entries |
| 78 | 78 | { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | protected function getOrgaRequestBody($id) { |
| 99 | 99 | $graphQl = '{ |
| 100 | - organisationalUnit(id:'.$id.') { |
|
| 100 | + organisationalUnit(id:'.$id . ') { |
|
| 101 | 101 | titleDe |
| 102 | 102 | id |
| 103 | 103 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | protected function getSearchOrgaBody($searchTerm) { |
| 110 | 110 | $graphQl = '{ |
| 111 | - organisationalUnits(filter: {text: "'.$searchTerm.'"}) |
|
| 111 | + organisationalUnits(filter: {text: "'.$searchTerm . '"}) |
|
| 112 | 112 | { |
| 113 | 113 | entries |
| 114 | 114 | { |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public function getDataRequest($zdbId) { |
| 33 | - $response = Request::get($this->apiUrl . 'resource/' . $zdbId .'/') |
|
| 33 | + $response = Request::get($this->apiUrl . 'resource/' . $zdbId . '/') |
|
| 34 | 34 | ->send(); |
| 35 | 35 | |
| 36 | 36 | return $response->body; |