@@ -31,8 +31,7 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @access public |
33 | 33 | */ |
34 | -class PageViewController extends AbstractController |
|
35 | -{ |
|
34 | +class PageViewController extends AbstractController { |
|
36 | 35 | /** |
37 | 36 | * @access protected |
38 | 37 | * @var array Holds the controls to add to the map |
@@ -258,8 +257,7 @@ discard block |
||
258 | 257 | * @param $page |
259 | 258 | * @return false|int|mixed|string|null |
260 | 259 | */ |
261 | - public function convertMeasureOrPage($document, $measure = null, $page = null) |
|
262 | - { |
|
260 | + public function convertMeasureOrPage($document, $measure = null, $page = null) { |
|
263 | 261 | $return = null; |
264 | 262 | $measure2Page = array_column($document->musicalStructure, 'page'); |
265 | 263 | if ($measure) { |
@@ -370,8 +368,7 @@ discard block |
||
370 | 368 | * |
371 | 369 | * @return array URL and MIME type of fulltext file |
372 | 370 | */ |
373 | - protected function getScore(int $page, MetsDocument $specificDoc = null) |
|
374 | - { |
|
371 | + protected function getScore(int $page, MetsDocument $specificDoc = null) { |
|
375 | 372 | $score = []; |
376 | 373 | $loc = ''; |
377 | 374 | if ($specificDoc) { |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | * @property int $limit |
17 | 17 | * @property int $offset |
18 | 18 | */ |
19 | -class SolrSearchQuery extends Query |
|
20 | -{ |
|
19 | +class SolrSearchQuery extends Query { |
|
21 | 20 | /** |
22 | 21 | * @access private |
23 | 22 | * @var SolrSearch |
@@ -33,8 +32,7 @@ discard block |
||
33 | 32 | * |
34 | 33 | * @return void |
35 | 34 | */ |
36 | - public function __construct($solrSearch) |
|
37 | - { |
|
35 | + public function __construct($solrSearch) { |
|
38 | 36 | $this->solrSearch = $solrSearch; |
39 | 37 | |
40 | 38 | $this->offset = 0; |
@@ -52,8 +50,7 @@ discard block |
||
52 | 50 | */ |
53 | 51 | // TODO: Return type (array) of method SolrSearchQuery::execute() should be compatible with return type (iterable<object>&TYPO3\CMS\Extbase\Persistence\QueryResultInterface) of method TYPO3\CMS\Extbase\Persistence\QueryInterface::execute() |
54 | 52 | // @phpstan-ignore-next-line |
55 | - public function execute($returnRawQueryResult = false) |
|
56 | - { |
|
53 | + public function execute($returnRawQueryResult = false) { |
|
57 | 54 | $this->solrSearch->submit($this->offset, $this->limit); |
58 | 55 | |
59 | 56 | // solrSearch now only contains the results in range, indexed in [0, n) |
@@ -21,8 +21,7 @@ discard block |
||
21 | 21 | use Phpoaipmh\Exception\OaipmhException; |
22 | 22 | use SimpleXMLElement; |
23 | 23 | |
24 | -class OaiPmhTest extends FunctionalTestCase |
|
25 | -{ |
|
24 | +class OaiPmhTest extends FunctionalTestCase { |
|
26 | 25 | protected $disableJsonWrappedResponse = true; |
27 | 26 | |
28 | 27 | protected array $coreExtensionsToLoad = [ |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | $this->setUpOaiSolr(); |
67 | 66 | } |
68 | 67 | |
69 | - protected function setUpOaiSolr() |
|
70 | - { |
|
68 | + protected function setUpOaiSolr() { |
|
71 | 69 | // Setup Solr only once for all tests in this suite |
72 | 70 | static $solr = null; |
73 | 71 | |
@@ -87,8 +85,7 @@ discard block |
||
87 | 85 | /** |
88 | 86 | * @test |
89 | 87 | */ |
90 | - public function correctlyRespondsOnBadVerb() |
|
91 | - { |
|
88 | + public function correctlyRespondsOnBadVerb() { |
|
92 | 89 | $client = new HttpClient(); |
93 | 90 | $response = $client->get($this->baseUrl, [ |
94 | 91 | 'query' => [ |
@@ -113,8 +110,7 @@ discard block |
||
113 | 110 | /** |
114 | 111 | * @test |
115 | 112 | */ |
116 | - public function canIdentify() |
|
117 | - { |
|
113 | + public function canIdentify() { |
|
118 | 114 | $oai = Endpoint::build($this->oaiUrl); |
119 | 115 | $identity = $oai->identify(); |
120 | 116 | |
@@ -127,8 +123,7 @@ discard block |
||
127 | 123 | /** |
128 | 124 | * @test |
129 | 125 | */ |
130 | - public function identifyGivesFallbackDatestampWhenNoDocuments() |
|
131 | - { |
|
126 | + public function identifyGivesFallbackDatestampWhenNoDocuments() { |
|
132 | 127 | $oai = Endpoint::build($this->oaiUrlNoStoragePid); |
133 | 128 | $identity = $oai->identify(); |
134 | 129 | |
@@ -138,8 +133,7 @@ discard block |
||
138 | 133 | /** |
139 | 134 | * @test |
140 | 135 | */ |
141 | - public function canListMetadataFormats() |
|
142 | - { |
|
136 | + public function canListMetadataFormats() { |
|
143 | 137 | $oai = Endpoint::build($this->oaiUrl); |
144 | 138 | $formats = $oai->listMetadataFormats(); |
145 | 139 | |
@@ -154,8 +148,7 @@ discard block |
||
154 | 148 | /** |
155 | 149 | * @test |
156 | 150 | */ |
157 | - public function canListRecords() |
|
158 | - { |
|
151 | + public function canListRecords() { |
|
159 | 152 | $oai = Endpoint::build($this->oaiUrl); |
160 | 153 | $result = $oai->listRecords('mets'); |
161 | 154 | |
@@ -168,8 +161,7 @@ discard block |
||
168 | 161 | /** |
169 | 162 | * @test |
170 | 163 | */ |
171 | - public function noRecordsUntil1900() |
|
172 | - { |
|
164 | + public function noRecordsUntil1900() { |
|
173 | 165 | $this->expectException(OaipmhException::class); |
174 | 166 | $this->expectExceptionMessage('empty list'); |
175 | 167 | |
@@ -182,8 +174,7 @@ discard block |
||
182 | 174 | /** |
183 | 175 | * @test |
184 | 176 | */ |
185 | - public function canUseResumptionToken() |
|
186 | - { |
|
177 | + public function canUseResumptionToken() { |
|
187 | 178 | // NOTE: cursor and expirationDate are optional by the specification, |
188 | 179 | // but we include them in our implementation |
189 | 180 | |
@@ -241,8 +232,7 @@ discard block |
||
241 | 232 | /** |
242 | 233 | * @test |
243 | 234 | */ |
244 | - public function noResumptionTokenForCompleteList() |
|
245 | - { |
|
235 | + public function noResumptionTokenForCompleteList() { |
|
246 | 236 | $client = new HttpClient(); |
247 | 237 | |
248 | 238 | foreach (['ListIdentifiers', 'ListRecords'] as $verb) { |
@@ -264,8 +254,7 @@ discard block |
||
264 | 254 | /** |
265 | 255 | * @test |
266 | 256 | */ |
267 | - public function canListAndResumeIdentifiers() |
|
268 | - { |
|
257 | + public function canListAndResumeIdentifiers() { |
|
269 | 258 | $oai = Endpoint::build($this->oaiUrl); |
270 | 259 | $result = $oai->listIdentifiers('mets'); |
271 | 260 | |
@@ -278,18 +267,15 @@ discard block |
||
278 | 267 | self::assertEquals('oai:de:slub-dresden:db:id-476248086', $record->identifier); |
279 | 268 | } |
280 | 269 | |
281 | - protected function parseUtc(string $dateTime) |
|
282 | - { |
|
270 | + protected function parseUtc(string $dateTime) { |
|
283 | 271 | return DateTime::createFromFormat('Y-m-d\TH:i:s\Z', $dateTime); |
284 | 272 | } |
285 | 273 | |
286 | - protected function assertUtcDateString(string $dateTime) |
|
287 | - { |
|
274 | + protected function assertUtcDateString(string $dateTime) { |
|
288 | 275 | self::assertInstanceOf(DateTime::class, $this->parseUtc($dateTime)); |
289 | 276 | } |
290 | 277 | |
291 | - protected function assertInFuture(string $dateTime) |
|
292 | - { |
|
278 | + protected function assertInFuture(string $dateTime) { |
|
293 | 279 | self::assertGreaterThan(new DateTime(), $this->parseUtc($dateTime)); |
294 | 280 | } |
295 | 281 | } |
@@ -89,8 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected $httpClient; |
91 | 91 | |
92 | - public function __construct() |
|
93 | - { |
|
92 | + public function __construct() { |
|
94 | 93 | parent::__construct(); |
95 | 94 | |
96 | 95 | $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration(); |
@@ -117,8 +116,7 @@ discard block |
||
117 | 116 | $this->addSiteConfig('dlf-testing'); |
118 | 117 | } |
119 | 118 | |
120 | - protected function getDlfConfiguration() |
|
121 | - { |
|
119 | + protected function getDlfConfiguration() { |
|
122 | 120 | $dotenv = Dotenv::createImmutable('/home/runner/work/kitodo-presentation/kitodo-presentation/Build/Test/', 'test.env'); |
123 | 121 | $dotenv->load(); |
124 | 122 | |
@@ -167,8 +165,7 @@ discard block |
||
167 | 165 | ]; |
168 | 166 | } |
169 | 167 | |
170 | - protected function addSiteConfig($identifier) |
|
171 | - { |
|
168 | + protected function addSiteConfig($identifier) { |
|
172 | 169 | $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml'); |
173 | 170 | $siteConfig['base'] = $this->baseUrl; |
174 | 171 | $siteConfig['languages'][0]['base'] = $this->baseUrl; |
@@ -182,8 +179,7 @@ discard block |
||
182 | 179 | $finder->getAllSites(false); // useCache = false |
183 | 180 | } |
184 | 181 | |
185 | - protected function initializeRepository(string $className, int $storagePid) |
|
186 | - { |
|
182 | + protected function initializeRepository(string $className, int $storagePid) { |
|
187 | 183 | $repository = GeneralUtility::makeInstance($className); |
188 | 184 | $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); |
189 | 185 | $querySettings->setStoragePageIds([$storagePid]); |
@@ -192,8 +188,7 @@ discard block |
||
192 | 188 | return $repository; |
193 | 189 | } |
194 | 190 | |
195 | - protected function importSolrDocuments(Solr $solr, string $path) |
|
196 | - { |
|
191 | + protected function importSolrDocuments(Solr $solr, string $path) { |
|
197 | 192 | $jsonDocuments = json_decode(file_get_contents($path), true); |
198 | 193 | |
199 | 194 | $updateQuery = $solr->service->createUpdate(); |
@@ -212,8 +207,7 @@ discard block |
||
212 | 207 | $solr->service->update($updateQuery); |
213 | 208 | } |
214 | 209 | |
215 | - protected function initLanguageService(string $locale) |
|
216 | - { |
|
210 | + protected function initLanguageService(string $locale) { |
|
217 | 211 | // create mock backend user and set language |
218 | 212 | // which is loaded by LanguageServiceFactory as default value in backend mode |
219 | 213 | $backendUser = GeneralUtility::makeInstance(BackendUserAuthentication::class); |
@@ -224,8 +218,7 @@ discard block |
||
224 | 218 | /** |
225 | 219 | * Assert that $sub is recursively contained within $super. |
226 | 220 | */ |
227 | - protected function assertArrayMatches(array $sub, array $super, string $message = '') |
|
228 | - { |
|
221 | + protected function assertArrayMatches(array $sub, array $super, string $message = '') { |
|
229 | 222 | self::assertEquals($sub, ArrayUtility::intersectRecursive($super, $sub), $message); |
230 | 223 | } |
231 | 224 | } |
@@ -27,8 +27,7 @@ |
||
27 | 27 | * |
28 | 28 | * @internal |
29 | 29 | */ |
30 | -class UpdateSolrSchema implements UpgradeWizardInterface |
|
31 | -{ |
|
30 | +class UpdateSolrSchema implements UpgradeWizardInterface { |
|
32 | 31 | |
33 | 32 | /** |
34 | 33 | * Return the identifier for this wizard |