Passed
Pull Request — master (#123)
by Sebastian
12:38 queued 02:07
created
Classes/Controller/View3DController.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             }
56 56
 
57 57
             if ($this->settings['useInternalProxy']) {
58
-                $absoluteUri = !empty($this->settings['forceAbsoluteUrl']) ? true : false;
58
+                $absoluteUri = !empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE;
59 59
                 
60 60
                 $model = $this->uriBuilder->reset()
61 61
                     ->setTargetPageUid($GLOBALS['TSFE']->id)
Please login to merge, or discard this patch.
Classes/Controller/TableOfContentsController.php 2 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  * @subpackage dlf
25 25
  * @access public
26 26
  */
27
-class TableOfContentsController extends AbstractController
28
-{
27
+class TableOfContentsController extends AbstractController {
29 28
     /**
30 29
      * This holds the active entries according to the currently selected page
31 30
      *
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      *
40 39
      * @return void
41 40
      */
42
-    public function mainAction()
43
-    {
41
+    public function mainAction() {
44 42
         // Load current document.
45 43
         $this->loadDocument($this->requestData);
46 44
         if ($this->isDocMissing()) {
@@ -63,8 +61,7 @@  discard block
 block discarded – undo
63 61
      * @access protected
64 62
      * @return array HMENU array
65 63
      */
66
-    protected function makeMenuArray()
67
-    {
64
+    protected function makeMenuArray() {
68 65
         // Set default values for page if not set.
69 66
         // $this->requestData['page'] may be integer or string (physical structure @ID)
70 67
         if (
@@ -140,8 +137,7 @@  discard block
 block discarded – undo
140 137
      *
141 138
      * @return array HMENU array for menu entry
142 139
      */
143
-    protected function getMenuEntry(array $entry, $recursive = false)
144
-    {
140
+    protected function getMenuEntry(array $entry, $recursive = false) {
145 141
         $entry = $this->resolveMenuEntry($entry);
146 142
 
147 143
         $entryArray = [];
@@ -235,8 +231,7 @@  discard block
 block discarded – undo
235 231
      * @param array $entry
236 232
      * @return array
237 233
      */
238
-    protected function resolveMenuEntry($entry)
239
-    {
234
+    protected function resolveMenuEntry($entry) {
240 235
         // If the menu entry points to the parent document,
241 236
         // resolve to the parent UID set on indexation.
242 237
         $doc = $this->document->getDoc();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
             }
100 100
             // Go through table of contents and create all menu entries.
101 101
             foreach ($this->document->getDoc()->tableOfContents as $entry) {
102
-                $menuArray[] = $this->getMenuEntry($entry, true);
102
+                $menuArray[] = $this->getMenuEntry($entry, TRUE);
103 103
             }
104 104
         } else {
105 105
             // Go through table of contents and create top-level menu entries.
106 106
             foreach ($this->document->getDoc()->tableOfContents as $entry) {
107
-                $menuArray[] = $this->getMenuEntry($entry, false);
107
+                $menuArray[] = $this->getMenuEntry($entry, FALSE);
108 108
             }
109 109
             // Build table of contents from database.
110 110
             $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         'pagination' => '',
124 124
                         'targetUid' => $resArray['uid']
125 125
                     ];
126
-                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false);
126
+                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE);
127 127
                 }
128 128
             }
129 129
         }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      *
141 141
      * @return array HMENU array for menu entry
142 142
      */
143
-    protected function getMenuEntry(array $entry, $recursive = false)
143
+    protected function getMenuEntry(array $entry, $recursive = FALSE)
144 144
     {
145 145
         $entry = $this->resolveMenuEntry($entry);
146 146
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         }
199 199
         // Build sub-menu if available and called recursively.
200 200
         if (
201
-            $recursive === true
201
+            $recursive === TRUE
202 202
             && !empty($entry['children'])
203 203
         ) {
204 204
             // Build sub-menu only if one of the following conditions apply:
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                     if (in_array($child['id'], $this->activeEntries)) {
217 217
                         $entryArray['ITEM_STATE'] = 'ACT';
218 218
                     }
219
-                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true);
219
+                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE);
220 220
                 }
221 221
             }
222 222
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 2 patches
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 ($this->isDocMissingOrEmpty()) {
@@ -118,8 +116,7 @@  discard block
 block discarded – undo
118 116
      *
119 117
      * @return array URL and MIME type of fulltext file
120 118
      */
121
-    protected function getFulltext($page)
122
-    {
119
+    protected function getFulltext($page) {
123 120
         $fulltext = [];
124 121
         // Get fulltext link.
125 122
         $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['fileGrpFulltext']);
@@ -159,8 +156,7 @@  discard block
 block discarded – undo
159 156
      *
160 157
      * @return void
161 158
      */
162
-    protected function addViewerJS()
163
-    {
159
+    protected function addViewerJS() {
164 160
         // Viewer configuration.
165 161
         $viewerConfiguration = '$(document).ready(function() {
166 162
                 if (dlfUtils.exists(dlfViewer)) {
@@ -187,8 +183,7 @@  discard block
 block discarded – undo
187 183
      * @return array An array containing the IRIs of the AnnotationLists / AnnotationPages as well as
188 184
      *               some information about the canvas.
189 185
      */
190
-    protected function getAnnotationContainers($page)
191
-    {
186
+    protected function getAnnotationContainers($page) {
192 187
         if ($this->document->getDoc() instanceof IiifManifest) {
193 188
             $canvasId = $this->document->getDoc()->physicalStructure[$page];
194 189
             $iiif = $this->document->getDoc()->getIiif();
@@ -244,8 +239,7 @@  discard block
 block discarded – undo
244 239
      *
245 240
      * @return array URL and MIME type of image file
246 241
      */
247
-    protected function getImage($page)
248
-    {
242
+    protected function getImage($page) {
249 243
         $image = [];
250 244
         // Get @USE value of METS fileGrp.
251 245
         $fileGrpsImages = GeneralUtility::trimExplode(',', $this->extConf['fileGrpImages']);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                     // Configure @action URL for form.
131 131
                     $uri = $this->uriBuilder->reset()
132 132
                         ->setTargetPageUid($GLOBALS['TSFE']->id)
133
-                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false)
133
+                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE)
134 134
                         ->setArguments([
135 135
                             'eID' => 'tx_dlf_pageview_proxy',
136 136
                             'url' => $fulltext['url'],
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             if ($iiif instanceof ManifestInterface) {
196 196
                 $canvas = $iiif->getContainedResourceById($canvasId);
197 197
                 /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */
198
-                if ($canvas != null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
198
+                if ($canvas != NULL && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
199 199
                     $annotationContainers = [];
200 200
                     /*
201 201
                      *  TODO Analyzing the annotations on the server side requires loading the annotation lists / pages
@@ -205,11 +205,11 @@  discard block
 block discarded – undo
205 205
                      *  On the other hand, server connections are potentially better than client connections. Downloading annotation lists
206 206
                      */
207 207
                     foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) {
208
-                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) {
208
+                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) {
209 209
                             foreach ($textAnnotations as $annotation) {
210 210
                                 if (
211 211
                                     $annotation->getBody()->getFormat() == 'text/plain'
212
-                                    && $annotation->getBody()->getChars() != null
212
+                                    && $annotation->getBody()->getChars() != NULL
213 213
                                 ) {
214 214
                                     $annotationListData = [];
215 215
                                     $annotationListData['uri'] = $annotationContainer->getId();
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                     // Configure @action URL for form.
262 262
                     $uri = $this->uriBuilder->reset()
263 263
                         ->setTargetPageUid($GLOBALS['TSFE']->id)
264
-                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false)
264
+                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE)
265 265
                         ->setArguments([
266 266
                             'eID' => 'tx_dlf_pageview_proxy',
267 267
                             'url' => $image['url'],
Please login to merge, or discard this patch.
Classes/Controller/PageGridController.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,15 +22,13 @@  discard block
 block discarded – undo
22 22
  * @subpackage dlf
23 23
  * @access public
24 24
  */
25
-class PageGridController extends AbstractController
26
-{
25
+class PageGridController extends AbstractController {
27 26
     /**
28 27
      * The main method of the plugin
29 28
      *
30 29
      * @return void
31 30
      */
32
-    public function mainAction()
33
-    {
31
+    public function mainAction() {
34 32
         $this->loadDocument($this->requestData);
35 33
         if (
36 34
             $this->isDocMissingOrEmpty()
@@ -64,8 +62,7 @@  discard block
 block discarded – undo
64 62
      *
65 63
      * @return array The rendered entry ready for fluid
66 64
      */
67
-    protected function getEntry($number, $fileGrpThumbs)
68
-    {
65
+    protected function getEntry($number, $fileGrpThumbs) {
69 66
         // Set pagination.
70 67
         $entry['pagination'] = htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$number]]['orderlabel']);
71 68
         $entry['page'] = $number;
Please login to merge, or discard this patch.