Completed
Push — master ( e93629...dcd410 )
by
unknown
19s queued 15s
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/TableOfContentsController.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class TableOfContentsController extends AbstractController
27
-{
26
+class TableOfContentsController extends AbstractController {
28 27
     /**
29 28
      * This holds the active entries according to the currently selected page
30 29
      *
@@ -43,8 +42,7 @@  discard block
 block discarded – undo
43 42
      *
44 43
      * @return array HMENU array for menu entry
45 44
      */
46
-    protected function getMenuEntry(array $entry, $recursive = false)
47
-    {
45
+    protected function getMenuEntry(array $entry, $recursive = false) {
48 46
         $entryArray = [];
49 47
         // Set "title", "volume", "type" and "pagination" from $entry array.
50 48
         $entryArray['title'] = !empty($entry['label']) ? $entry['label'] : $entry['orderlabel'];
@@ -131,8 +129,7 @@  discard block
 block discarded – undo
131 129
      *
132 130
      * @return void
133 131
      */
134
-    public function mainAction()
135
-    {
132
+    public function mainAction() {
136 133
         $this->view->assign('toc', $this->makeMenuArray());
137 134
     }
138 135
 
@@ -142,8 +139,7 @@  discard block
 block discarded – undo
142 139
      * @access public
143 140
      * @return array HMENU array
144 141
      */
145
-    public function makeMenuArray()
146
-    {
142
+    public function makeMenuArray() {
147 143
         // Load current document.
148 144
         $this->loadDocument($this->requestData);
149 145
         if (
Please login to merge, or discard this patch.