@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getDescription(): string |
56 | 56 | { |
57 | - return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to' . |
|
58 | - ' make use of the Extbase naming scheme. Therefore it updates the field values' . |
|
57 | + return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to'. |
|
58 | + ' make use of the Extbase naming scheme. Therefore it updates the field values'. |
|
59 | 59 | ' "pi_flexform" within the tt_content table'; |
60 | 60 | } |
61 | 61 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | foreach ($fields as $field) { |
171 | 171 | // change the index attribute if it doesn't start with 'settings.' yet |
172 | 172 | if (strpos($field['index'], 'settings.') === false) { |
173 | - $field['index'] = 'settings.' . $field['index']; |
|
173 | + $field['index'] = 'settings.'.$field['index']; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 |
@@ -26,8 +26,7 @@ |
||
26 | 26 | * |
27 | 27 | * @internal |
28 | 28 | */ |
29 | -class MigrateSettings implements UpgradeWizardInterface |
|
30 | -{ |
|
29 | +class MigrateSettings implements UpgradeWizardInterface { |
|
31 | 30 | |
32 | 31 | /** |
33 | 32 | * Return the identifier for this wizard |
@@ -108,11 +108,11 @@ discard block |
||
108 | 108 | |
109 | 109 | // exit if at least one update statement is not successful |
110 | 110 | if (!((bool) $updateResult)) { |
111 | - return false; |
|
111 | + return FALSE; |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | - return true; |
|
115 | + return TRUE; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function updateNecessary(): bool |
128 | 128 | { |
129 | - $oldSettingsFound = false; |
|
129 | + $oldSettingsFound = FALSE; |
|
130 | 130 | |
131 | 131 | $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content'); |
132 | 132 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | // Update the found record sets |
145 | 145 | while ($record = $statement->fetchAssociative()) { |
146 | 146 | $oldSettingsFound = $this->checkForOldSettings($record['pi_flexform']); |
147 | - if ($oldSettingsFound === true) { |
|
147 | + if ($oldSettingsFound === TRUE) { |
|
148 | 148 | // We found at least one field to be updated --> break here |
149 | 149 | break; |
150 | 150 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | foreach ($fields as $field) { |
189 | 189 | // change the index attribute if it doesn't start with 'settings.' yet |
190 | - if (strpos($field['index'], 'settings.') === false) { |
|
190 | + if (strpos($field['index'], 'settings.') === FALSE) { |
|
191 | 191 | $field['index'] = 'settings.' . $field['index']; |
192 | 192 | } |
193 | 193 | } |
@@ -16,10 +16,10 @@ |
||
16 | 16 | |
17 | 17 | if (!empty($matches)) { |
18 | 18 | $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]); |
19 | - if ($root !== false) { |
|
19 | + if ($root !== FALSE) { |
|
20 | 20 | putenv('TYPO3_PATH_ROOT=' . $root); |
21 | 21 | putenv('TYPO3_PATH_APP=' . $root); |
22 | 22 | } |
23 | 23 | } |
24 | 24 | |
25 | -return false; |
|
25 | +return FALSE; |
@@ -15,10 +15,10 @@ |
||
15 | 15 | preg_match("@.*/(?:acceptance|functional-[a-z\d]+)@", $_SERVER['REQUEST_URI'], $matches); |
16 | 16 | |
17 | 17 | if (!empty($matches)) { |
18 | - $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]); |
|
18 | + $root = realpath($_SERVER['DOCUMENT_ROOT'].$matches[0]); |
|
19 | 19 | if ($root !== false) { |
20 | - putenv('TYPO3_PATH_ROOT=' . $root); |
|
21 | - putenv('TYPO3_PATH_APP=' . $root); |
|
20 | + putenv('TYPO3_PATH_ROOT='.$root); |
|
21 | + putenv('TYPO3_PATH_APP='.$root); |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 |
@@ -5,12 +5,10 @@ |
||
5 | 5 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
6 | 6 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
7 | 7 | |
8 | -class PageViewProxyDisabledTest extends FunctionalTestCase |
|
9 | -{ |
|
8 | +class PageViewProxyDisabledTest extends FunctionalTestCase { |
|
10 | 9 | protected $disableJsonWrappedResponse = true; |
11 | 10 | |
12 | - protected function queryProxy(array $query, string $method = 'GET') |
|
13 | - { |
|
11 | + protected function queryProxy(array $query, string $method = 'GET') { |
|
14 | 12 | $query['eID'] = 'tx_dlf_pageview_proxy'; |
15 | 13 | |
16 | 14 | return $this->httpClient->request($method, '', [ |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | class PageViewProxyDisabledTest extends FunctionalTestCase |
9 | 9 | { |
10 | - protected $disableJsonWrappedResponse = true; |
|
10 | + protected $disableJsonWrappedResponse = TRUE; |
|
11 | 11 | |
12 | 12 | protected function queryProxy(array $query, string $method = 'GET') |
13 | 13 | { |
@@ -8,8 +8,7 @@ |
||
8 | 8 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
9 | 9 | use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage; |
10 | 10 | |
11 | -class DocumentRepositoryTest extends FunctionalTestCase |
|
12 | -{ |
|
11 | +class DocumentRepositoryTest extends FunctionalTestCase { |
|
13 | 12 | /** |
14 | 13 | * @var DocumentRepository |
15 | 14 | */ |
@@ -31,9 +31,9 @@ |
||
31 | 31 | |
32 | 32 | $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000); |
33 | 33 | |
34 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.csv'); |
|
35 | - $this->importDataSet(__DIR__ . '/../../Fixtures/Common/pages.xml'); |
|
36 | - $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/libraries.csv'); |
|
34 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_1.csv'); |
|
35 | + $this->importDataSet(__DIR__.'/../../Fixtures/Common/pages.xml'); |
|
36 | + $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/libraries.csv'); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | // There may be a single non-signifying space after the doc-comment asterisk, |
185 | 185 | // which is not included. |
186 | - $text .= preg_replace('#\\s*/?[*/]*\\s?(.*)$#', '$1', $line) . "\n"; |
|
186 | + $text .= preg_replace('#\\s*/?[*/]*\\s?(.*)$#', '$1', $line)."\n"; |
|
187 | 187 | } |
188 | 188 | $text = trim($text); |
189 | 189 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | RST); |
205 | 205 | |
206 | 206 | // Sort tables alphabetically |
207 | - usort($tables, function ($lhs, $rhs) { |
|
207 | + usort($tables, function($lhs, $rhs) { |
|
208 | 208 | return $lhs->name <=> $rhs->name; |
209 | 209 | }); |
210 | 210 | |
@@ -214,13 +214,13 @@ discard block |
||
214 | 214 | // Set header |
215 | 215 | $header = $tableInfo->name; |
216 | 216 | if (!empty($tableInfo->feComment)) { |
217 | - $header .= ': ' . $tableInfo->feComment; |
|
217 | + $header .= ': '.$tableInfo->feComment; |
|
218 | 218 | } |
219 | 219 | $section->setHeader($header); |
220 | 220 | |
221 | 221 | // Set introductory text of subsection |
222 | 222 | if ($tableInfo->modelClass) { |
223 | - $section->addText('Extbase domain model: ``' . $tableInfo->modelClass . '``'); |
|
223 | + $section->addText('Extbase domain model: ``'.$tableInfo->modelClass.'``'); |
|
224 | 224 | } |
225 | 225 | $section->addText($tableInfo->classComment); |
226 | 226 | $section->addText($tableInfo->sqlComment); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | 'description' => 'Description', |
232 | 232 | ]]; |
233 | 233 | |
234 | - $rows = array_map(function ($column) use ($page) { |
|
234 | + $rows = array_map(function($column) use ($page) { |
|
235 | 235 | return [ |
236 | 236 | 'field' => ( |
237 | 237 | $page->format($column->name, ['bold' => $column->isPrimary]) |
@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | * @subpackage dlf |
33 | 33 | * @access public |
34 | 34 | */ |
35 | -class Generator |
|
36 | -{ |
|
35 | +class Generator { |
|
37 | 36 | /** |
38 | 37 | * @var LanguageService |
39 | 38 | */ |
@@ -57,37 +56,32 @@ discard block |
||
57 | 56 | /** |
58 | 57 | * @param LanguageService $languageService |
59 | 58 | */ |
60 | - public function injectLanguageService(LanguageService $languageService) |
|
61 | - { |
|
59 | + public function injectLanguageService(LanguageService $languageService) { |
|
62 | 60 | $this->languageService = $languageService; |
63 | 61 | } |
64 | 62 | |
65 | 63 | /** |
66 | 64 | * @param DataMapper $dataMapper |
67 | 65 | */ |
68 | - public function injectDataMapper(DataMapper $dataMapper) |
|
69 | - { |
|
66 | + public function injectDataMapper(DataMapper $dataMapper) { |
|
70 | 67 | $this->dataMapper = $dataMapper; |
71 | 68 | } |
72 | 69 | |
73 | 70 | /** |
74 | 71 | * @param SqlReader $sqlReader |
75 | 72 | */ |
76 | - public function injectSqlReader(DataMapper $sqlReader) |
|
77 | - { |
|
73 | + public function injectSqlReader(DataMapper $sqlReader) { |
|
78 | 74 | $this->sqlReader = $sqlReader; |
79 | 75 | } |
80 | 76 | |
81 | 77 | /** |
82 | 78 | * @param ConfigurationManager $configurationManager |
83 | 79 | */ |
84 | - public function injectConfigurationManager(ConfigurationManager $configurationManager) |
|
85 | - { |
|
80 | + public function injectConfigurationManager(ConfigurationManager $configurationManager) { |
|
86 | 81 | $this->configurationManager = $configurationManager; |
87 | 82 | } |
88 | 83 | |
89 | - public function __construct() |
|
90 | - { |
|
84 | + public function __construct() { |
|
91 | 85 | |
92 | 86 | } |
93 | 87 | |
@@ -205,8 +199,7 @@ discard block |
||
205 | 199 | return $result; |
206 | 200 | } |
207 | 201 | |
208 | - protected function parseDocComment($docComment) |
|
209 | - { |
|
202 | + protected function parseDocComment($docComment) { |
|
210 | 203 | // TODO: Consider using phpDocumentor (though that splits the docblock into summary and description) |
211 | 204 | |
212 | 205 | // Adopted from DocCommentParser in TYPO3 v9 |
@@ -231,8 +224,7 @@ discard block |
||
231 | 224 | /** |
232 | 225 | * Transform table structure into .rst page. |
233 | 226 | */ |
234 | - public function generatePage(array $tables) |
|
235 | - { |
|
227 | + public function generatePage(array $tables) { |
|
236 | 228 | $page = new RstSection(); |
237 | 229 | $page->setHeader('Database Tables'); |
238 | 230 | $page->addText(<<<RST |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function collectTables(): array |
99 | 99 | { |
100 | - $sqlCode = $this->sqlReader->getTablesDefinitionString(true); |
|
100 | + $sqlCode = $this->sqlReader->getTablesDefinitionString(TRUE); |
|
101 | 101 | $createTableStatements = $this->sqlReader->getCreateTableStatementArray($sqlCode); |
102 | 102 | |
103 | 103 | $tableToClassName = $this->getTableClassMap(); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | continue; |
114 | 114 | } |
115 | 115 | |
116 | - $className = $tableToClassName[$tableName] ?? null; |
|
116 | + $className = $tableToClassName[$tableName] ?? NULL; |
|
117 | 117 | |
118 | 118 | $result[] = $this->getTableInfo($table, $className); |
119 | 119 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $isPrimary = []; |
152 | 152 | if (!is_null($primaryKey = $table->getPrimaryKey())) { |
153 | 153 | foreach ($primaryKey->getUnquotedColumns() as $primaryColumn) { |
154 | - $isPrimary[$primaryColumn] = true; |
|
154 | + $isPrimary[$primaryColumn] = TRUE; |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 | |
@@ -172,14 +172,14 @@ discard block |
||
172 | 172 | $result = (object) [ |
173 | 173 | 'name' => $tableName, |
174 | 174 | 'columns' => $columns, |
175 | - 'modelClass' => null, |
|
175 | + 'modelClass' => NULL, |
|
176 | 176 | 'sqlComment' => $table->getComment() ?? '', |
177 | 177 | 'classComment' => '', |
178 | 178 | 'feComment' => $this->languageService->sL($GLOBALS['TCA'][$tableName]['ctrl']['title'] ?? ''), |
179 | 179 | ]; |
180 | 180 | |
181 | 181 | // Integrate doc-comments from model class and its fields |
182 | - if ($className !== null) { |
|
182 | + if ($className !== NULL) { |
|
183 | 183 | $reflection = new ReflectionClass($className); |
184 | 184 | |
185 | 185 | $dataMap = $this->dataMapper->getDataMap($className); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | // In that case, try to guess the column name from the property name. |
190 | 190 | |
191 | 191 | $column = $dataMap->getColumnMap($property->getName()); |
192 | - $columnName = $column === null |
|
192 | + $columnName = $column === NULL |
|
193 | 193 | ? GeneralUtility::camelCaseToLowerCaseUnderscored($property->getName()) |
194 | 194 | : $column->getColumnName(); |
195 | 195 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $lines = explode("\n", $docComment); |
216 | 216 | foreach ($lines as $line) { |
217 | 217 | // Stop parsing at first tag |
218 | - if ($line !== '' && strpos($line, '@') !== false) { |
|
218 | + if ($line !== '' && strpos($line, '@') !== FALSE) { |
|
219 | 219 | break; |
220 | 220 | } |
221 | 221 | |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | This is a reference of all database tables defined by Kitodo.Presentation. |
240 | 240 | |
241 | 241 | .. tip:: This page is auto-generated. If you would like to edit it, please use doc-comments in the model class, COMMENT fields in ``ext_tables.sql`` if the table does not have one, or TCA labels. Then, you may re-generate the page by running ``composer docs:db`` inside the Kitodo.Presentation base folder. |
242 | -RST); |
|
242 | +rst); |
|
243 | 243 | |
244 | 244 | // Sort tables alphabetically |
245 | 245 | usort($tables, function ($lhs, $rhs) { |
@@ -274,11 +274,11 @@ discard block |
||
274 | 274 | 'field' => ( |
275 | 275 | $page->format($column->name, ['bold' => $column->isPrimary]) |
276 | 276 | . "\u{00a0}\u{00a0}" |
277 | - . $page->format($column->type->getName(), ['italic' => true]) |
|
277 | + . $page->format($column->type->getName(), ['italic' => TRUE]) |
|
278 | 278 | ), |
279 | 279 | |
280 | 280 | 'description' => $page->paragraphs([ |
281 | - $page->format($column->feComment, ['italic' => true]), |
|
281 | + $page->format($column->feComment, ['italic' => TRUE]), |
|
282 | 282 | $column->fieldComment, |
283 | 283 | $column->sqlComment, |
284 | 284 | ]), |
@@ -140,11 +140,11 @@ |
||
140 | 140 | // For performance, don't download content up-front. Rather, we'll |
141 | 141 | // download and upload simultaneously. |
142 | 142 | // https://docs.guzzlephp.org/en/6.5/request-options.html#stream |
143 | - 'stream' => true, |
|
143 | + 'stream' => TRUE, |
|
144 | 144 | |
145 | 145 | // Don't throw exceptions when a non-success status code is |
146 | 146 | // received. We handle these manually. |
147 | - 'http_errors' => false, |
|
147 | + 'http_errors' => FALSE, |
|
148 | 148 | ]); |
149 | 149 | } catch (\Exception $e) { |
150 | 150 | return new JsonResponse(['message' => 'Could not fetch resource of given URL.'], 500); |
@@ -34,8 +34,7 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @access public |
36 | 36 | */ |
37 | -class PageViewProxy |
|
38 | -{ |
|
37 | +class PageViewProxy { |
|
39 | 38 | /** |
40 | 39 | * @access protected |
41 | 40 | * @var RequestFactory |
@@ -55,8 +54,7 @@ discard block |
||
55 | 54 | * |
56 | 55 | * @return void |
57 | 56 | */ |
58 | - public function __construct() |
|
59 | - { |
|
57 | + public function __construct() { |
|
60 | 58 | $this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class); |
61 | 59 | $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf', 'general'); |
62 | 60 | } |
@@ -33,13 +33,13 @@ |
||
33 | 33 | $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings); |
34 | 34 | |
35 | 35 | // Set replacements. |
36 | - $args['###TITLES###'] = $foundNumbers['titles'] . ' ' . htmlspecialchars( |
|
36 | + $args['###TITLES###'] = $foundNumbers['titles'].' '.htmlspecialchars( |
|
37 | 37 | LocalizationUtility::translate( |
38 | 38 | ($foundNumbers['titles'] > 1 ? 'titles' : 'title'), 'dlf' |
39 | 39 | ) |
40 | 40 | ); |
41 | 41 | |
42 | - $args['###VOLUMES###'] = $foundNumbers['volumes'] . ' ' . htmlspecialchars( |
|
42 | + $args['###VOLUMES###'] = $foundNumbers['volumes'].' '.htmlspecialchars( |
|
43 | 43 | LocalizationUtility::translate( |
44 | 44 | ($foundNumbers['volumes'] > 1 ? 'volumes' : 'volume'), 'dlf' |
45 | 45 | ) |
@@ -21,8 +21,7 @@ |
||
21 | 21 | * |
22 | 22 | * @access public |
23 | 23 | */ |
24 | -class StatisticsController extends AbstractController |
|
25 | -{ |
|
24 | +class StatisticsController extends AbstractController { |
|
26 | 25 | /** |
27 | 26 | * The main method of the plugin |
28 | 27 | * |
@@ -52,12 +52,12 @@ |
||
52 | 52 | $(document).ready(function() { |
53 | 53 | AudioPlayer = new dlfAudioPlayer({ |
54 | 54 | audio: { |
55 | - mimeType: "' . $this->audio['mimetype'] . '", |
|
56 | - title: "' . $this->audio['label'] . '", |
|
57 | - url: "' . $this->audio['url'] . '" |
|
55 | + mimeType: "' . $this->audio['mimetype'].'", |
|
56 | + title: "' . $this->audio['label'].'", |
|
57 | + url: "' . $this->audio['url'].'" |
|
58 | 58 | }, |
59 | 59 | parentElId: "tx-dlf-audio", |
60 | - swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')) . 'Resources/Public/JavaScript/jPlayer/jquery.jplayer.swf" |
|
60 | + swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')).'Resources/Public/JavaScript/jPlayer/jquery.jplayer.swf" |
|
61 | 61 | }); |
62 | 62 | }); |
63 | 63 | '; |
@@ -24,8 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @access public |
26 | 26 | */ |
27 | -class AudioplayerController extends AbstractController |
|
28 | -{ |
|
27 | +class AudioplayerController extends AbstractController { |
|
29 | 28 | /** |
30 | 29 | * Holds the current audio file's URL, MIME type and optional label |
31 | 30 | * |
@@ -129,7 +129,7 @@ |
||
129 | 129 | $this->raw->registerXPathNamespace('personal-details', 'http://www.orcid.org/ns/personal-details'); |
130 | 130 | $givenNames = $this->raw->xpath('./personal-details:name/personal-details:given-names'); |
131 | 131 | $familyName = $this->raw->xpath('./personal-details:name/personal-details:family-name'); |
132 | - return (string) $givenNames[0] . ' ' . (string) $familyName[0]; |
|
132 | + return (string) $givenNames[0].' '.(string) $familyName[0]; |
|
133 | 133 | } else { |
134 | 134 | $this->logger->warning('No name found for given ORCID'); |
135 | 135 | return false; |
@@ -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'); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @access private |
45 | 45 | * @var \SimpleXmlElement|false The raw ORCID profile |
46 | 46 | **/ |
47 | - private $raw = false; |
|
47 | + private $raw = FALSE; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Constructs client instance |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | public function getData() |
72 | 72 | { |
73 | 73 | $this->getRaw('person'); |
74 | - if ($this->raw !== false && !empty($this->raw)) { |
|
74 | + if ($this->raw !== FALSE && !empty($this->raw)) { |
|
75 | 75 | $data = []; |
76 | 76 | $data['address'] = $this->getAddress(); |
77 | 77 | $data['email'] = $this->getEmail(); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | return $data; |
80 | 80 | } else { |
81 | 81 | $this->logger->warning('No data found for given ORCID'); |
82 | - return false; |
|
82 | + return FALSE; |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | public function getAddress() |
94 | 94 | { |
95 | 95 | $this->getRaw('address'); |
96 | - if ($this->raw !== false && !empty($this->raw)) { |
|
96 | + if ($this->raw !== FALSE && !empty($this->raw)) { |
|
97 | 97 | $this->raw->registerXPathNamespace('address', 'http://www.orcid.org/ns/address'); |
98 | 98 | return (string) $this->raw->xpath('./address:address/address:country')[0]; |
99 | 99 | } else { |
100 | 100 | $this->logger->warning('No address found for given ORCID'); |
101 | - return false; |
|
101 | + return FALSE; |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | public function getEmail() |
113 | 113 | { |
114 | 114 | $this->getRaw('email'); |
115 | - if ($this->raw !== false && !empty($this->raw)) { |
|
115 | + if ($this->raw !== FALSE && !empty($this->raw)) { |
|
116 | 116 | $this->raw->registerXPathNamespace('email', 'http://www.orcid.org/ns/email'); |
117 | 117 | return (string) $this->raw->xpath('./email:email/email:email')[0]; |
118 | 118 | } else { |
119 | 119 | $this->logger->warning('No email found for given ORCID'); |
120 | - return false; |
|
120 | + return FALSE; |
|
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
@@ -131,14 +131,14 @@ discard block |
||
131 | 131 | public function getFullName() |
132 | 132 | { |
133 | 133 | $this->getRaw('personal-details'); |
134 | - if ($this->raw !== false && !empty($this->raw)) { |
|
134 | + if ($this->raw !== FALSE && !empty($this->raw)) { |
|
135 | 135 | $this->raw->registerXPathNamespace('personal-details', 'http://www.orcid.org/ns/personal-details'); |
136 | 136 | $givenNames = $this->raw->xpath('./personal-details:name/personal-details:given-names'); |
137 | 137 | $familyName = $this->raw->xpath('./personal-details:name/personal-details:family-name'); |
138 | 138 | return (string) $givenNames[0] . ' ' . (string) $familyName[0]; |
139 | 139 | } else { |
140 | 140 | $this->logger->warning('No name found for given ORCID'); |
141 | - return false; |
|
141 | + return FALSE; |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | { |
156 | 156 | $this->client->setEndpoint($endpoint); |
157 | 157 | $data = $this->client->getData(); |
158 | - if ($data != false) { |
|
158 | + if ($data != FALSE) { |
|
159 | 159 | $this->raw = Helper::getXmlFileAsString($data); |
160 | 160 | } |
161 | 161 | } |