We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -73,7 +73,8 @@ |
||
| 73 | 73 | /** |
| 74 | 74 | * @param string $endpoint the shortname of the endpoint |
| 75 | 75 | */ |
| 76 | - public function setEndpoint($endpoint) { |
|
| 76 | + public function setEndpoint($endpoint) |
|
| 77 | + { |
|
| 77 | 78 | $this->endpoint = $endpoint; |
| 78 | 79 | } |
| 79 | 80 | |
@@ -71,7 +71,8 @@ discard block |
||
| 71 | 71 | * |
| 72 | 72 | * @return void |
| 73 | 73 | */ |
| 74 | - private function getAuthors() { |
|
| 74 | + private function getAuthors() |
|
| 75 | + { |
|
| 75 | 76 | $authors = $this->xml->xpath('./mods:name[./mods:role/mods:roleTerm[@type="code" and @authority="marcrelator"]="aut"]'); |
| 76 | 77 | |
| 77 | 78 | // Get "author" and "author_sorting" again if that was too sophisticated. |
@@ -93,7 +94,8 @@ discard block |
||
| 93 | 94 | } |
| 94 | 95 | } |
| 95 | 96 | |
| 96 | - private function getAuthorFromOrcidApi($identifier, $authors, $i) { |
|
| 97 | + private function getAuthorFromOrcidApi($identifier, $authors, $i) |
|
| 98 | + { |
|
| 97 | 99 | $orcidUrl = (string) $identifier[0]; |
| 98 | 100 | $orcidIdParts = explode('/', $orcidUrl); |
| 99 | 101 | $orcidId = trim(end($orcidIdParts)); |
@@ -115,7 +117,8 @@ discard block |
||
| 115 | 117 | } |
| 116 | 118 | } |
| 117 | 119 | |
| 118 | - private function getAuthorFromXml($authors, $i) { |
|
| 120 | + private function getAuthorFromXml($authors, $i) |
|
| 121 | + { |
|
| 119 | 122 | $this->getAuthorFromXmlDisplayForm($authors, $i); |
| 120 | 123 | |
| 121 | 124 | $nameParts = $authors[$i]->xpath('./mods:namePart'); |
@@ -158,7 +161,8 @@ discard block |
||
| 158 | 161 | } |
| 159 | 162 | } |
| 160 | 163 | |
| 161 | - private function getAuthorFromXmlDisplayForm($authors, $i) { |
|
| 164 | + private function getAuthorFromXmlDisplayForm($authors, $i) |
|
| 165 | + { |
|
| 162 | 166 | $displayForm = $authors[$i]->xpath('./mods:displayForm'); |
| 163 | 167 | if ($displayForm) { |
| 164 | 168 | $this->metadata['author'][$i] = (string) $displayForm[0]; |
@@ -172,7 +176,8 @@ discard block |
||
| 172 | 176 | * |
| 173 | 177 | * @return void |
| 174 | 178 | */ |
| 175 | - private function getHolders() { |
|
| 179 | + private function getHolders() |
|
| 180 | + { |
|
| 176 | 181 | $holders = $this->xml->xpath('./mods:name[./mods:role/mods:roleTerm[@type="code" and @authority="marcrelator"]="prv"]'); |
| 177 | 182 | |
| 178 | 183 | if (!empty($holders)) { |
@@ -189,7 +194,8 @@ discard block |
||
| 189 | 194 | } |
| 190 | 195 | } |
| 191 | 196 | |
| 192 | - private function getHolderFromViafApi($identifier, $holders, $i) { |
|
| 197 | + private function getHolderFromViafApi($identifier, $holders, $i) |
|
| 198 | + { |
|
| 193 | 199 | $viafUrl = (string) $identifier[0]; |
| 194 | 200 | $profile = new ViafProfile($viafUrl); |
| 195 | 201 | $name = $profile->getFullName(); |
@@ -204,7 +210,8 @@ discard block |
||
| 204 | 210 | } |
| 205 | 211 | } |
| 206 | 212 | |
| 207 | - private function getHolderFromXml($holders, $i) { |
|
| 213 | + private function getHolderFromXml($holders, $i) |
|
| 214 | + { |
|
| 208 | 215 | $this->getHolderFromXmlDisplayForm($holders, $i); |
| 209 | 216 | // Append "valueURI" to name using Unicode unit separator. |
| 210 | 217 | if (isset($holders[$i]['valueURI'])) { |
@@ -212,7 +219,8 @@ discard block |
||
| 212 | 219 | } |
| 213 | 220 | } |
| 214 | 221 | |
| 215 | - private function getHolderFromXmlDisplayForm($holders, $i) { |
|
| 222 | + private function getHolderFromXmlDisplayForm($holders, $i) |
|
| 223 | + { |
|
| 216 | 224 | // Check if there is a display form. |
| 217 | 225 | $displayForm = $holders[$i]->xpath('./mods:displayForm'); |
| 218 | 226 | if ($displayForm) { |
@@ -227,7 +235,8 @@ discard block |
||
| 227 | 235 | * |
| 228 | 236 | * @return void |
| 229 | 237 | */ |
| 230 | - private function getPlaces() { |
|
| 238 | + private function getPlaces() |
|
| 239 | + { |
|
| 231 | 240 | $places = $this->xml->xpath('./mods:originInfo[not(./mods:edition="[Electronic ed.]")]/mods:place/mods:placeTerm'); |
| 232 | 241 | // Get "place" and "place_sorting" again if that was to sophisticated. |
| 233 | 242 | if (empty($places)) { |
@@ -251,7 +260,8 @@ discard block |
||
| 251 | 260 | * |
| 252 | 261 | * @return void |
| 253 | 262 | */ |
| 254 | - private function getYears() { |
|
| 263 | + private function getYears() |
|
| 264 | + { |
|
| 255 | 265 | // Get "year_sorting". |
| 256 | 266 | if (($years_sorting = $this->xml->xpath('./mods:originInfo[not(./mods:edition="[Electronic ed.]")]/mods:dateOther[@type="order" and @encoding="w3cdtf"]'))) { |
| 257 | 267 | foreach ($years_sorting as $year_sorting) { |