@@ -33,8 +33,7 @@ |
||
| 33 | 33 | * |
| 34 | 34 | * @access public |
| 35 | 35 | */ |
| 36 | -class SearchController extends AbstractController |
|
| 37 | -{ |
|
| 36 | +class SearchController extends AbstractController { |
|
| 38 | 37 | /** |
| 39 | 38 | * @access protected |
| 40 | 39 | * @var CollectionRepository |
@@ -25,8 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @access public |
| 27 | 27 | */ |
| 28 | -class AudioVideoMD implements MetadataInterface |
|
| 29 | -{ |
|
| 28 | +class AudioVideoMD implements MetadataInterface { |
|
| 30 | 29 | /** |
| 31 | 30 | * Extract some essential AudioMD/VideoMD metadata. |
| 32 | 31 | * |
@@ -147,8 +147,7 @@ |
||
| 147 | 147 | * |
| 148 | 148 | * @param \SimpleXMLElement &$xml: The XML to register the namespace for |
| 149 | 149 | */ |
| 150 | - private function registerAltoNamespace(\SimpleXMLElement &$xml) |
|
| 151 | - { |
|
| 150 | + private function registerAltoNamespace(\SimpleXMLElement &$xml) { |
|
| 152 | 151 | $namespace = $xml->getDocNamespaces(); |
| 153 | 152 | |
| 154 | 153 | if (in_array('http://www.loc.gov/standards/alto/ns-v2#', $namespace, true)) { |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class Mods implements MetadataInterface |
|
| 28 | -{ |
|
| 27 | +class Mods implements MetadataInterface { |
|
| 29 | 28 | /** |
| 30 | 29 | * @access private |
| 31 | 30 | * @var \SimpleXMLElement The metadata XML |
@@ -22,8 +22,7 @@ |
||
| 22 | 22 | * |
| 23 | 23 | * @access public |
| 24 | 24 | */ |
| 25 | -class TeiHeader implements MetadataInterface |
|
| 26 | -{ |
|
| 25 | +class TeiHeader implements MetadataInterface { |
|
| 27 | 26 | /** |
| 28 | 27 | * This extracts the essential TEIHDR metadata from XML |
| 29 | 28 | * |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @access public |
| 28 | 28 | **/ |
| 29 | -class Client |
|
| 30 | -{ |
|
| 29 | +class Client { |
|
| 31 | 30 | /** |
| 32 | 31 | * @access protected |
| 33 | 32 | * @var Logger This holds the logger |
@@ -62,8 +61,7 @@ discard block |
||
| 62 | 61 | * |
| 63 | 62 | * @return void |
| 64 | 63 | **/ |
| 65 | - public function __construct(string $viaf, RequestFactory $requestFactory) |
|
| 66 | - { |
|
| 64 | + public function __construct(string $viaf, RequestFactory $requestFactory) { |
|
| 67 | 65 | $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); |
| 68 | 66 | $this->viafUrl = 'http://viaf.org/viaf/' . $viaf; |
| 69 | 67 | $this->requestFactory = $requestFactory; |
@@ -89,8 +87,7 @@ discard block |
||
| 89 | 87 | * |
| 90 | 88 | * @return object|bool |
| 91 | 89 | **/ |
| 92 | - public function getData() |
|
| 93 | - { |
|
| 90 | + public function getData() { |
|
| 94 | 91 | $url = $this->getApiEndpoint(); |
| 95 | 92 | try { |
| 96 | 93 | $response = $this->requestFactory->request($url); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @access public |
| 28 | 28 | **/ |
| 29 | -class Profile |
|
| 30 | -{ |
|
| 29 | +class Profile { |
|
| 31 | 30 | /** |
| 32 | 31 | * @access private |
| 33 | 32 | * @var Logger This holds the logger |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | * |
| 56 | 55 | * @return void |
| 57 | 56 | **/ |
| 58 | - public function __construct(string $viaf) |
|
| 59 | - { |
|
| 57 | + public function __construct(string $viaf) { |
|
| 60 | 58 | $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); |
| 61 | 59 | $this->client = new Client($viaf, GeneralUtility::makeInstance(RequestFactory::class)); |
| 62 | 60 | } |
@@ -68,8 +66,7 @@ discard block |
||
| 68 | 66 | * |
| 69 | 67 | * @return array|false |
| 70 | 68 | **/ |
| 71 | - public function getData() |
|
| 72 | - { |
|
| 69 | + public function getData() { |
|
| 73 | 70 | $this->getRaw(); |
| 74 | 71 | if ($this->raw !== false && !empty($this->raw)) { |
| 75 | 72 | $data = []; |
@@ -89,8 +86,7 @@ discard block |
||
| 89 | 86 | * |
| 90 | 87 | * @return string|false |
| 91 | 88 | **/ |
| 92 | - public function getAddress() |
|
| 93 | - { |
|
| 89 | + public function getAddress() { |
|
| 94 | 90 | $this->getRaw(); |
| 95 | 91 | if ($this->raw !== false && !empty($this->raw->asXML())) { |
| 96 | 92 | return (string) $this->raw->xpath('./ns1:nationalityOfEntity/ns1:data/ns1:text')[0]; |
@@ -107,8 +103,7 @@ discard block |
||
| 107 | 103 | * |
| 108 | 104 | * @return string|false |
| 109 | 105 | **/ |
| 110 | - public function getFullName() |
|
| 111 | - { |
|
| 106 | + public function getFullName() { |
|
| 112 | 107 | $this->getRaw(); |
| 113 | 108 | if ($this->raw !== false && !empty($this->raw->asXML())) { |
| 114 | 109 | $rawName = $this->raw->xpath('./ns1:mainHeadings/ns1:data/ns1:text'); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @access public |
| 28 | 28 | **/ |
| 29 | -class Client |
|
| 30 | -{ |
|
| 29 | +class Client { |
|
| 31 | 30 | /** |
| 32 | 31 | * @var string constant for API hostname |
| 33 | 32 | **/ |
@@ -78,8 +77,7 @@ discard block |
||
| 78 | 77 | * |
| 79 | 78 | * @return void |
| 80 | 79 | **/ |
| 81 | - public function __construct(string $orcid, RequestFactory $requestFactory) |
|
| 82 | - { |
|
| 80 | + public function __construct(string $orcid, RequestFactory $requestFactory) { |
|
| 83 | 81 | $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); |
| 84 | 82 | $this->orcid = $orcid; |
| 85 | 83 | $this->requestFactory = $requestFactory; |
@@ -105,8 +103,7 @@ discard block |
||
| 105 | 103 | * |
| 106 | 104 | * @return object|bool |
| 107 | 105 | **/ |
| 108 | - public function getData() |
|
| 109 | - { |
|
| 106 | + public function getData() { |
|
| 110 | 107 | $url = $this->getApiEndpoint(); |
| 111 | 108 | try { |
| 112 | 109 | $response = $this->requestFactory->request($url); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @access public |
| 28 | 28 | **/ |
| 29 | -class Profile |
|
| 30 | -{ |
|
| 29 | +class Profile { |
|
| 31 | 30 | /** |
| 32 | 31 | * @access protected |
| 33 | 32 | * @var Logger This holds the logger |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | * |
| 56 | 55 | * @return void |
| 57 | 56 | **/ |
| 58 | - public function __construct(string $orcid) |
|
| 59 | - { |
|
| 57 | + public function __construct(string $orcid) { |
|
| 60 | 58 | $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class); |
| 61 | 59 | $this->client = new Client($orcid, GeneralUtility::makeInstance(RequestFactory::class)); |
| 62 | 60 | } |
@@ -68,8 +66,7 @@ discard block |
||
| 68 | 66 | * |
| 69 | 67 | * @return array|false |
| 70 | 68 | **/ |
| 71 | - public function getData() |
|
| 72 | - { |
|
| 69 | + public function getData() { |
|
| 73 | 70 | $this->getRaw('person'); |
| 74 | 71 | if ($this->raw !== false && !empty($this->raw)) { |
| 75 | 72 | $data = []; |
@@ -90,8 +87,7 @@ discard block |
||
| 90 | 87 | * |
| 91 | 88 | * @return string|false |
| 92 | 89 | **/ |
| 93 | - public function getAddress() |
|
| 94 | - { |
|
| 90 | + public function getAddress() { |
|
| 95 | 91 | $this->getRaw('address'); |
| 96 | 92 | if ($this->raw !== false && !empty($this->raw)) { |
| 97 | 93 | $this->raw->registerXPathNamespace('address', 'http://www.orcid.org/ns/address'); |
@@ -109,8 +105,7 @@ discard block |
||
| 109 | 105 | * |
| 110 | 106 | * @return string|false |
| 111 | 107 | **/ |
| 112 | - public function getEmail() |
|
| 113 | - { |
|
| 108 | + public function getEmail() { |
|
| 114 | 109 | $this->getRaw('email'); |
| 115 | 110 | if ($this->raw !== false && !empty($this->raw)) { |
| 116 | 111 | $this->raw->registerXPathNamespace('email', 'http://www.orcid.org/ns/email'); |
@@ -128,8 +123,7 @@ discard block |
||
| 128 | 123 | * |
| 129 | 124 | * @return string|false |
| 130 | 125 | **/ |
| 131 | - public function getFullName() |
|
| 132 | - { |
|
| 126 | + public function getFullName() { |
|
| 133 | 127 | $this->getRaw('personal-details'); |
| 134 | 128 | if ($this->raw !== false && !empty($this->raw)) { |
| 135 | 129 | $this->raw->registerXPathNamespace('personal-details', 'http://www.orcid.org/ns/personal-details'); |