Completed
Push — master ( 213e17...484033 )
by
unknown
21s queued 14s
created
Classes/Controller/MetadataController.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class MetadataController extends AbstractController
33
-{
32
+class MetadataController extends AbstractController {
34 33
     /**
35 34
      * @var CollectionRepository
36 35
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
     /**
40 39
      * @param CollectionRepository $collectionRepository
41 40
      */
42
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
43
-    {
41
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
44 42
         $this->collectionRepository = $collectionRepository;
45 43
     }
46 44
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
     /**
53 51
      * @param MetadataRepository $metadataRepository
54 52
      */
55
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
56
-    {
53
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
57 54
         $this->metadataRepository = $metadataRepository;
58 55
     }
59 56
 
@@ -65,16 +62,14 @@  discard block
 block discarded – undo
65 62
     /**
66 63
      * @param StructureRepository $structureRepository
67 64
      */
68
-    public function injectStructureRepository(StructureRepository $structureRepository)
69
-    {
65
+    public function injectStructureRepository(StructureRepository $structureRepository) {
70 66
         $this->structureRepository = $structureRepository;
71 67
     }
72 68
 
73 69
     /**
74 70
      * @return string|void
75 71
      */
76
-    public function mainAction()
77
-    {
72
+    public function mainAction() {
78 73
         $this->cObj = $this->configurationManager->getContentObject();
79 74
 
80 75
         // Load current document.
@@ -130,8 +125,7 @@  discard block
 block discarded – undo
130 125
      *
131 126
      * @return string The metadata array ready for output
132 127
      */
133
-    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false)
134
-    {
128
+    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) {
135 129
         if ($useOriginalIiifManifestMetadata) {
136 130
             $iiifData = [];
137 131
             foreach ($metadataArray as $metadata) {
@@ -250,8 +244,7 @@  discard block
 block discarded – undo
250 244
                     }
251 245
 
252 246
                     if (is_array($metadataArray[$i][$metadataName])) {
253
-                        $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value)
254
-                        {
247
+                        $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value) {
255 248
                             return !empty($value);
256 249
                         }));
257 250
                     }
@@ -273,8 +266,7 @@  discard block
 block discarded – undo
273 266
      *
274 267
      * @return array metadata
275 268
      */
276
-    private function getMetadata()
277
-    {
269
+    private function getMetadata() {
278 270
         $metadata = [];
279 271
         if ($this->settings['rootline'] < 2) {
280 272
             // Get current structure's @ID.
@@ -312,8 +304,7 @@  discard block
 block discarded – undo
312 304
      *
313 305
      * @return array metadata
314 306
      */
315
-    private function getMetadataForIds($id, $metadata)
316
-    {
307
+    private function getMetadataForIds($id, $metadata) {
317 308
         $useOriginalIiifManifestMetadata = $this->settings['originalIiifMetadata'] == 1 && $this->document->getDoc() instanceof IiifManifest;
318 309
         foreach ($id as $sid) {
319 310
             if ($useOriginalIiifManifestMetadata) {
Please login to merge, or discard this patch.
Classes/Controller/AbstractController.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * @param DocumentRepository $documentRepository
46 46
      */
47
-    public function injectDocumentRepository(DocumentRepository $documentRepository)
48
-    {
47
+    public function injectDocumentRepository(DocumentRepository $documentRepository) {
49 48
         $this->documentRepository = $documentRepository;
50 49
     }
51 50
 
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
      * @access protected
86 85
      * @return void
87 86
      */
88
-    protected function initialize()
89
-    {
87
+    protected function initialize() {
90 88
         $this->requestData = GeneralUtility::_GPmerged('tx_dlf');
91 89
         if (empty($this->requestData['page'])) {
92 90
             $this->requestData['page'] = 1;
@@ -112,8 +110,7 @@  discard block
 block discarded – undo
112 110
      *
113 111
      * @return void
114 112
      */
115
-    protected function loadDocument($requestData)
116
-    {
113
+    protected function loadDocument($requestData) {
117 114
         // Try to get document format from database
118 115
         if (!empty($requestData['id'])) {
119 116
 
@@ -186,8 +183,7 @@  discard block
 block discarded – undo
186 183
      *
187 184
      * @return null|string|array
188 185
      */
189
-    protected function getParametersSafely($parameterName)
190
-    {
186
+    protected function getParametersSafely($parameterName) {
191 187
         if ($this->request->hasArgument($parameterName)) {
192 188
             return $this->request->getArgument($parameterName);
193 189
         }
@@ -201,8 +197,7 @@  discard block
 block discarded – undo
201 197
      *
202 198
      * @return void
203 199
      */
204
-    public function __construct()
205
-    {
200
+    public function __construct() {
206 201
         $this->initialize();
207 202
     }
208 203
 }
Please login to merge, or discard this patch.
Classes/Format/TeiHeader.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
      *
33 33
      * @return void
34 34
      */
35
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata)
36
-    {
35
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
37 36
         $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0');
38 37
     }
39 38
 }
Please login to merge, or discard this patch.
Classes/Format/Alto.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@  discard block
 block discarded – undo
33 33
      *
34 34
      * @return string The raw unformatted fulltext
35 35
      */
36
-    public function getRawText(\SimpleXMLElement $xml)
37
-    {
36
+    public function getRawText(\SimpleXMLElement $xml) {
38 37
         $rawText = '';
39 38
         $xml->registerXPathNamespace('alto', 'http://www.loc.gov/standards/alto/ns-v2#');
40 39
         // Get all (presumed) words of the text.
@@ -54,8 +53,7 @@  discard block
 block discarded – undo
54 53
      *
55 54
      * @return string The unformatted fulltext in MiniOCR format
56 55
      */
57
-    public function getTextAsMiniOcr(\SimpleXMLElement $xml)
58
-    {
56
+    public function getTextAsMiniOcr(\SimpleXMLElement $xml) {
59 57
         $xml->registerXPathNamespace('alto', 'http://www.loc.gov/standards/alto/ns-v2#');
60 58
 
61 59
         // get all text blocks
@@ -99,8 +97,7 @@  discard block
 block discarded – undo
99 97
      *
100 98
      * @return string The parsed word extracted from attribute
101 99
      */
102
-    private function getWord($attributes)
103
-    {
100
+    private function getWord($attributes) {
104 101
         return htmlspecialchars((string) $attributes['CONTENT']) . ' ';
105 102
     }
106 103
 
@@ -113,8 +110,7 @@  discard block
 block discarded – undo
113 110
      *
114 111
      * @return string The parsed word coordinates extracted from attribute
115 112
      */
116
-    private function getCoordinates($attributes)
117
-    {
113
+    private function getCoordinates($attributes) {
118 114
         return (string) $attributes['HPOS'] . ' ' . (string) $attributes['VPOS'] . ' ' . (string) $attributes['WIDTH'] . ' ' . (string) $attributes['HEIGHT'];
119 115
     }
120 116
 }
Please login to merge, or discard this patch.
Classes/Format/Mods.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
      *
33 33
      * @return void
34 34
      */
35
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata)
36
-    {
35
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) {
37 36
         $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3');
38 37
         // Get "author" and "author_sorting".
39 38
         $authors = $xml->xpath('./mods:name[./mods:role/mods:roleTerm[@type="code" and @authority="marcrelator"]="aut"]');
Please login to merge, or discard this patch.
Classes/Controller/Backend/NewTenantController.php 1 patch
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@  discard block
 block discarded – undo
44 44
  * @subpackage dlf
45 45
  * @access public
46 46
  */
47
-class NewTenantController extends AbstractController
48
-{
47
+class NewTenantController extends AbstractController {
49 48
     /**
50 49
      * @var int
51 50
      */
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
     /**
86 85
      * @param FormatRepository $formatRepository
87 86
      */
88
-    public function injectFormatRepository(FormatRepository $formatRepository)
89
-    {
87
+    public function injectFormatRepository(FormatRepository $formatRepository) {
90 88
         $this->formatRepository = $formatRepository;
91 89
     }
92 90
 
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
     /**
99 97
      * @param MetadataRepository $metadataRepository
100 98
      */
101
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
102
-    {
99
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
103 100
         $this->metadataRepository = $metadataRepository;
104 101
     }
105 102
 
@@ -111,8 +108,7 @@  discard block
 block discarded – undo
111 108
     /**
112 109
      * @param StructureRepository $structureRepository
113 110
      */
114
-    public function injectStructureRepository(StructureRepository $structureRepository)
115
-    {
111
+    public function injectStructureRepository(StructureRepository $structureRepository) {
116 112
         $this->structureRepository = $structureRepository;
117 113
     }
118 114
 
@@ -124,8 +120,7 @@  discard block
 block discarded – undo
124 120
     /**
125 121
      * @param SolrCoreRepository $solrCoreRepository
126 122
      */
127
-    public function injectSolrCoreRepository(SolrCoreRepository $solrCoreRepository)
128
-    {
123
+    public function injectSolrCoreRepository(SolrCoreRepository $solrCoreRepository) {
129 124
         $this->solrCoreRepository = $solrCoreRepository;
130 125
     }
131 126
 
@@ -133,8 +128,7 @@  discard block
 block discarded – undo
133 128
      * Initialization for all actions
134 129
      *
135 130
      */
136
-    protected function initializeAction()
137
-    {
131
+    protected function initializeAction() {
138 132
         $this->pid = (int) GeneralUtility::_GP('id');
139 133
 
140 134
         $frameworkConfiguration = $this->configurationManager->getConfiguration($this->configurationManager::CONFIGURATION_TYPE_FRAMEWORK);
@@ -155,8 +149,7 @@  discard block
 block discarded – undo
155 149
     /**
156 150
      * Action adding formats records
157 151
      */
158
-    public function addFormatAction()
159
-    {
152
+    public function addFormatAction() {
160 153
         // Include formats definition file.
161 154
         $formatsDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/FormatDefaults.php');
162 155
 
@@ -193,8 +186,7 @@  discard block
 block discarded – undo
193 186
     /**
194 187
      * Action adding metadata records
195 188
      */
196
-    public function addMetadataAction()
197
-    {
189
+    public function addMetadataAction() {
198 190
         // Include metadata definition file.
199 191
         $metadataDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/MetadataDefaults.php');
200 192
 
@@ -268,8 +260,7 @@  discard block
 block discarded – undo
268 260
     /**
269 261
      * Action adding Solr core records
270 262
      */
271
-    public function addSolrCoreAction()
272
-    {
263
+    public function addSolrCoreAction() {
273 264
         $doPersist = false;
274 265
 
275 266
         // load language file in own array
@@ -298,8 +289,7 @@  discard block
 block discarded – undo
298 289
     /**
299 290
      * Action adding structure records
300 291
      */
301
-    public function addStructureAction()
302
-    {
292
+    public function addStructureAction() {
303 293
         // Include structure definition file.
304 294
         $structureDefaults = include(ExtensionManagementUtility::extPath('dlf') . 'Resources/Private/Data/StructureDefaults.php');
305 295
 
@@ -351,8 +341,7 @@  discard block
 block discarded – undo
351 341
      * @param ViewInterface $view
352 342
      * @return void
353 343
      */
354
-    protected function initializeView(ViewInterface $view)
355
-    {
344
+    protected function initializeView(ViewInterface $view) {
356 345
         /** @var BackendTemplateView $view */
357 346
         parent::initializeView($view);
358 347
         if ($this->actionMethodName == 'indexAction') {
@@ -370,8 +359,7 @@  discard block
 block discarded – undo
370 359
      * @access public
371 360
      *
372 361
      */
373
-    public function indexAction()
374
-    {
362
+    public function indexAction() {
375 363
         $recordInfos = [];
376 364
 
377 365
         if ($this->pageInfo['doktype'] != 254) {
@@ -401,8 +389,7 @@  discard block
 block discarded – undo
401 389
      * @access public
402 390
      *
403 391
      */
404
-    public function errorAction()
405
-    {
392
+    public function errorAction() {
406 393
     }
407 394
 
408 395
     /**
@@ -414,8 +401,7 @@  discard block
 block discarded – undo
414 401
      *
415 402
      * @access public
416 403
      */
417
-    protected function getLLL($index, $lang, $langArray)
418
-    {
404
+    protected function getLLL($index, $lang, $langArray) {
419 405
         if (isset($langArray[$lang][$index][0]['target'])) {
420 406
             return $langArray[$lang][$index][0]['target'];
421 407
         } else {
Please login to merge, or discard this patch.
Classes/Eid/SearchInDocument.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,16 +28,14 @@  discard block
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class SearchInDocument
32
-{
31
+class SearchInDocument {
33 32
     /**
34 33
      * The main method of the eID script
35 34
      *
36 35
      * @param ServerRequestInterface $request
37 36
      * @return ResponseInterface JSON response of search suggestions
38 37
      */
39
-    public function main(ServerRequestInterface $request)
40
-    {
38
+    public function main(ServerRequestInterface $request) {
41 39
         $output = [
42 40
             'documents' => [],
43 41
             'numFound' => 0
@@ -118,8 +116,7 @@  discard block
 block discarded – undo
118 116
      *
119 117
      * @return string SOLR query
120 118
      */
121
-    private function getQuery($fields, $parameters)
122
-    {
119
+    private function getQuery($fields, $parameters) {
123 120
         return $fields['fulltext'] . ':(' . Solr::escapeQuery((string) $parameters['q']) . ') AND ' . $fields['uid'] . ':' . $this->getUid($parameters['uid']);
124 121
     }
125 122
 
@@ -133,8 +130,7 @@  discard block
 block discarded – undo
133 130
      *
134 131
      * @return int|string uid of the document
135 132
      */
136
-    private function getUid($uid)
137
-    {
133
+    private function getUid($uid) {
138 134
         return is_numeric($uid) ? intval($uid) : $uid;
139 135
     }
140 136
 }
Please login to merge, or discard this patch.
Classes/Eid/PageViewProxy.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
  * @subpackage dlf
35 35
  * @access public
36 36
  */
37
-class PageViewProxy
38
-{
37
+class PageViewProxy {
39 38
     /**
40 39
      * @var RequestFactory
41 40
      */
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      */
47 46
     protected $extConf;
48 47
 
49
-    public function __construct()
50
-    {
48
+    public function __construct() {
51 49
         $this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
52 50
         $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
53 51
     }
@@ -173,8 +171,7 @@  discard block
 block discarded – undo
173 171
      * @param ServerRequestInterface $request
174 172
      * @return ResponseInterface
175 173
      */
176
-    public function main(ServerRequestInterface $request)
177
-    {
174
+    public function main(ServerRequestInterface $request) {
178 175
         switch ($request->getMethod()) {
179 176
             case 'OPTIONS':
180 177
                 return $this->handleOptions($request);
Please login to merge, or discard this patch.
Classes/Eid/SearchSuggest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,16 +30,14 @@
 block discarded – undo
30 30
  * @subpackage dlf
31 31
  * @access public
32 32
  */
33
-class SearchSuggest
34
-{
33
+class SearchSuggest {
35 34
     /**
36 35
      * The main method of the eID script
37 36
      *
38 37
      * @param ServerRequestInterface $request
39 38
      * @return ResponseInterface XML response of search suggestions
40 39
      */
41
-    public function main(ServerRequestInterface $request)
42
-    {
40
+    public function main(ServerRequestInterface $request) {
43 41
         $output = [];
44 42
         // Get input parameters and decrypt core name.
45 43
         $parameters = $request->getParsedBody();
Please login to merge, or discard this patch.