@@ -33,16 +33,14 @@ discard block |
||
33 | 33 | * @subpackage dlf |
34 | 34 | * @access public |
35 | 35 | */ |
36 | -class IndexCommand extends BaseCommand |
|
37 | -{ |
|
36 | +class IndexCommand extends BaseCommand { |
|
38 | 37 | |
39 | 38 | /** |
40 | 39 | * Configure the command by defining the name, options and arguments |
41 | 40 | * |
42 | 41 | * @return void |
43 | 42 | */ |
44 | - public function configure() |
|
45 | - { |
|
43 | + public function configure() { |
|
46 | 44 | $this |
47 | 45 | ->setDescription('Index single document into database and Solr.') |
48 | 46 | ->setHelp('') |
@@ -86,8 +84,7 @@ discard block |
||
86 | 84 | * |
87 | 85 | * @return int |
88 | 86 | */ |
89 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
90 | - { |
|
87 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
91 | 88 | $dryRun = $input->getOption('dry-run') != false ? true : false; |
92 | 89 | |
93 | 90 | $io = new SymfonyStyle($input, $output); |
@@ -32,15 +32,13 @@ discard block |
||
32 | 32 | * @subpackage dlf |
33 | 33 | * @access public |
34 | 34 | */ |
35 | -class ReindexCommand extends BaseCommand |
|
36 | -{ |
|
35 | +class ReindexCommand extends BaseCommand { |
|
37 | 36 | /** |
38 | 37 | * Configure the command by defining the name, options and arguments |
39 | 38 | * |
40 | 39 | * @return void |
41 | 40 | */ |
42 | - public function configure() |
|
43 | - { |
|
41 | + public function configure() { |
|
44 | 42 | $this |
45 | 43 | ->setDescription('Reindex a collection into database and Solr.') |
46 | 44 | ->setHelp('') |
@@ -90,8 +88,7 @@ discard block |
||
90 | 88 | * |
91 | 89 | * @return int |
92 | 90 | */ |
93 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
94 | - { |
|
91 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
95 | 92 | $dryRun = $input->getOption('dry-run') != false ? true : false; |
96 | 93 | |
97 | 94 | $io = new SymfonyStyle($input, $output); |
@@ -36,15 +36,13 @@ discard block |
||
36 | 36 | * @subpackage dlf |
37 | 37 | * @access public |
38 | 38 | */ |
39 | -class HarvestCommand extends BaseCommand |
|
40 | -{ |
|
39 | +class HarvestCommand extends BaseCommand { |
|
41 | 40 | /** |
42 | 41 | * Configure the command by defining the name, options and arguments |
43 | 42 | * |
44 | 43 | * @return void |
45 | 44 | */ |
46 | - public function configure() |
|
47 | - { |
|
45 | + public function configure() { |
|
48 | 46 | $this |
49 | 47 | ->setDescription('Harvest OAI-PMH contents into database and Solr.') |
50 | 48 | ->setHelp('') |
@@ -100,8 +98,7 @@ discard block |
||
100 | 98 | * |
101 | 99 | * @return int |
102 | 100 | */ |
103 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
104 | - { |
|
101 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
105 | 102 | $dryRun = $input->getOption('dry-run') != false ? true : false; |
106 | 103 | |
107 | 104 | $io = new SymfonyStyle($input, $output); |
@@ -265,8 +262,7 @@ discard block |
||
265 | 262 | * |
266 | 263 | * @return void |
267 | 264 | */ |
268 | - protected function handleOaiError(BaseoaipmhException $exception, SymfonyStyle $io) |
|
269 | - { |
|
265 | + protected function handleOaiError(BaseoaipmhException $exception, SymfonyStyle $io) { |
|
270 | 266 | $io->error('ERROR: Trying to retrieve data from OAI interface resulted in error:' . "\n " . $exception->getMessage()); |
271 | 267 | } |
272 | 268 | } |
@@ -23,8 +23,7 @@ |
||
23 | 23 | * Class MigrateSettings |
24 | 24 | * @internal |
25 | 25 | */ |
26 | -class MigrateSettings implements UpgradeWizardInterface |
|
27 | -{ |
|
26 | +class MigrateSettings implements UpgradeWizardInterface { |
|
28 | 27 | |
29 | 28 | /** |
30 | 29 | * Return the identifier for this wizard |
@@ -153,8 +153,7 @@ discard block |
||
153 | 153 | * @return array|int |
154 | 154 | * @throws \RuntimeException |
155 | 155 | */ |
156 | - protected function getRecordsFromTable($countOnly = false) |
|
157 | - { |
|
156 | + protected function getRecordsFromTable($countOnly = false) { |
|
158 | 157 | $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); |
159 | 158 | $allResults = []; |
160 | 159 | $numResults = 0; |
@@ -234,8 +233,7 @@ discard block |
||
234 | 233 | * @param array $row |
235 | 234 | * @throws \Exception |
236 | 235 | */ |
237 | - protected function migrateField($table, $row) |
|
238 | - { |
|
236 | + protected function migrateField($table, $row) { |
|
239 | 237 | $fieldItem = trim($row[$this->fieldsToMigrate[$table]]); |
240 | 238 | |
241 | 239 | if (empty($fieldItem) || is_numeric($fieldItem)) { |
@@ -19,13 +19,11 @@ |
||
19 | 19 | /** |
20 | 20 | * Add inline JavaScript code to footer * |
21 | 21 | */ |
22 | -class JsFooterViewHelper extends AbstractViewHelper |
|
23 | -{ |
|
22 | +class JsFooterViewHelper extends AbstractViewHelper { |
|
24 | 23 | /** |
25 | 24 | * Initialize arguments. |
26 | 25 | */ |
27 | - public function initializeArguments() |
|
28 | - { |
|
26 | + public function initializeArguments() { |
|
29 | 27 | parent::initializeArguments(); |
30 | 28 | $this->registerArgument('inlineCode', 'string', 'Inline JavaScript', true); |
31 | 29 | } |
@@ -26,8 +26,7 @@ discard block |
||
26 | 26 | * @subpackage dlf |
27 | 27 | * @access public |
28 | 28 | */ |
29 | -class PageViewController extends AbstractController |
|
30 | -{ |
|
29 | +class PageViewController extends AbstractController { |
|
31 | 30 | /** |
32 | 31 | * Holds the controls to add to the map |
33 | 32 | * |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * |
66 | 65 | * @return void |
67 | 66 | */ |
68 | - public function mainAction() |
|
69 | - { |
|
67 | + public function mainAction() { |
|
70 | 68 | // Load current document. |
71 | 69 | $this->loadDocument($this->requestData); |
72 | 70 | if ( |
@@ -121,8 +119,7 @@ discard block |
||
121 | 119 | * |
122 | 120 | * @return array URL and MIME type of fulltext file |
123 | 121 | */ |
124 | - protected function getFulltext($page) |
|
125 | - { |
|
122 | + protected function getFulltext($page) { |
|
126 | 123 | $fulltext = []; |
127 | 124 | // Get fulltext link. |
128 | 125 | $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['fileGrpFulltext']); |
@@ -162,8 +159,7 @@ discard block |
||
162 | 159 | * |
163 | 160 | * @return void |
164 | 161 | */ |
165 | - protected function addViewerJS() |
|
166 | - { |
|
162 | + protected function addViewerJS() { |
|
167 | 163 | // Viewer configuration. |
168 | 164 | $viewerConfiguration = '$(document).ready(function() { |
169 | 165 | if (dlfUtils.exists(dlfViewer)) { |
@@ -189,8 +185,7 @@ discard block |
||
189 | 185 | * @return array An array containing the IRIs of the AnnotationLists / AnnotationPages as well as |
190 | 186 | * some information about the canvas. |
191 | 187 | */ |
192 | - protected function getAnnotationContainers($page) |
|
193 | - { |
|
188 | + protected function getAnnotationContainers($page) { |
|
194 | 189 | if ($this->document->getDoc() instanceof IiifManifest) { |
195 | 190 | $canvasId = $this->document->getDoc()->physicalStructure[$page]; |
196 | 191 | $iiif = $this->document->getDoc()->getIiif(); |
@@ -246,8 +241,7 @@ discard block |
||
246 | 241 | * |
247 | 242 | * @return array URL and MIME type of image file |
248 | 243 | */ |
249 | - protected function getImage($page) |
|
250 | - { |
|
244 | + protected function getImage($page) { |
|
251 | 245 | $image = []; |
252 | 246 | // Get @USE value of METS fileGrp. |
253 | 247 | $fileGrpsImages = GeneralUtility::trimExplode(',', $this->extConf['fileGrpImages']); |
@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | * @subpackage dlf |
33 | 33 | * @access public |
34 | 34 | */ |
35 | -class SearchController extends AbstractController |
|
36 | -{ |
|
35 | +class SearchController extends AbstractController { |
|
37 | 36 | /** |
38 | 37 | * @var CollectionRepository |
39 | 38 | */ |
@@ -42,8 +41,7 @@ discard block |
||
42 | 41 | /** |
43 | 42 | * @param CollectionRepository $collectionRepository |
44 | 43 | */ |
45 | - public function injectCollectionRepository(CollectionRepository $collectionRepository) |
|
46 | - { |
|
44 | + public function injectCollectionRepository(CollectionRepository $collectionRepository) { |
|
47 | 45 | $this->collectionRepository = $collectionRepository; |
48 | 46 | } |
49 | 47 | |
@@ -55,8 +53,7 @@ discard block |
||
55 | 53 | /** |
56 | 54 | * @param MetadataRepository $metadataRepository |
57 | 55 | */ |
58 | - public function injectMetadataRepository(MetadataRepository $metadataRepository) |
|
59 | - { |
|
56 | + public function injectMetadataRepository(MetadataRepository $metadataRepository) { |
|
60 | 57 | $this->metadataRepository = $metadataRepository; |
61 | 58 | } |
62 | 59 | |
@@ -71,8 +68,7 @@ discard block |
||
71 | 68 | * |
72 | 69 | * @return void |
73 | 70 | */ |
74 | - public function searchAction() |
|
75 | - { |
|
71 | + public function searchAction() { |
|
76 | 72 | // if search was triggered, get search parameters from POST variables |
77 | 73 | $this->searchParams = $this->getParametersSafely('searchParameter'); |
78 | 74 | |
@@ -87,8 +83,7 @@ discard block |
||
87 | 83 | * |
88 | 84 | * @return void |
89 | 85 | */ |
90 | - public function mainAction() |
|
91 | - { |
|
86 | + public function mainAction() { |
|
92 | 87 | $listViewSearch = false; |
93 | 88 | // Quit without doing anything if required variables are not set. |
94 | 89 | if (empty($this->settings['solrcore'])) { |
@@ -174,8 +169,7 @@ discard block |
||
174 | 169 | * |
175 | 170 | * @return string HTML output of facets menu |
176 | 171 | */ |
177 | - protected function addFacetsMenu() |
|
178 | - { |
|
172 | + protected function addFacetsMenu() { |
|
179 | 173 | // Quit without doing anything if no facets are configured. |
180 | 174 | if (empty($this->settings['facets']) && empty($this->settings['facetCollections'])) { |
181 | 175 | return ''; |
@@ -200,8 +194,7 @@ discard block |
||
200 | 194 | * |
201 | 195 | * @return array HMENU array |
202 | 196 | */ |
203 | - public function makeFacetsMenuArray($facets) |
|
204 | - { |
|
197 | + public function makeFacetsMenuArray($facets) { |
|
205 | 198 | $menuArray = []; |
206 | 199 | // Set default value for facet search. |
207 | 200 | $search = [ |
@@ -360,8 +353,7 @@ discard block |
||
360 | 353 | * |
361 | 354 | * @return array The array for the facet's menu entry |
362 | 355 | */ |
363 | - protected function getFacetsMenuEntry($field, $value, $count, $search, &$state) |
|
364 | - { |
|
356 | + protected function getFacetsMenuEntry($field, $value, $count, $search, &$state) { |
|
365 | 357 | $entryArray = []; |
366 | 358 | // Translate value. |
367 | 359 | if ($field == 'owner_faceting') { |
@@ -412,8 +404,7 @@ discard block |
||
412 | 404 | * |
413 | 405 | * @return string The extended search form or an empty string |
414 | 406 | */ |
415 | - protected function addExtendedSearch() |
|
416 | - { |
|
407 | + protected function addExtendedSearch() { |
|
417 | 408 | // Quit without doing anything if no fields for extended search are selected. |
418 | 409 | if ( |
419 | 410 | empty($this->settings['extendedSlotCount']) |
@@ -5,10 +5,8 @@ |
||
5 | 5 | use Kitodo\Dlf\Common\Helper; |
6 | 6 | use TYPO3\TestingFramework\Core\Unit\UnitTestCase; |
7 | 7 | |
8 | -class HelperTest extends UnitTestCase |
|
9 | -{ |
|
10 | - public function assertInvalidXml($xml) |
|
11 | - { |
|
8 | +class HelperTest extends UnitTestCase { |
|
9 | + public function assertInvalidXml($xml) { |
|
12 | 10 | $result = Helper::getXmlFileAsString($xml); |
13 | 11 | $this->assertEquals(false, $result); |
14 | 12 | } |