Passed
Pull Request — master (#103)
by Alexander
03:32
created
Classes/ViewHelpers/JsFooterViewHelper.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,13 +19,11 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function initializeArguments()
28 28
     {
29 29
         parent::initializeArguments();
30
-        $this->registerArgument('inlineCode', 'string', 'Inline JavaScript', true);
30
+        $this->registerArgument('inlineCode', 'string', 'Inline JavaScript', TRUE);
31 31
     }
32 32
 
33 33
     /**
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
                 $fulltext['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpFulltext]);
147 147
                 break;
148 148
             } else {
149
-                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"');
149
+                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"');
150 150
             }
151 151
         }
152 152
         if (empty($fulltext)) {
153
-            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpFulltext'] . '"');
153
+            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpFulltext'].'"');
154 154
         }
155 155
         return $fulltext;
156 156
     }
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
         $viewerConfiguration = '$(document).ready(function() {
169 169
                 if (dlfUtils.exists(dlfViewer)) {
170 170
                     tx_dlf_viewer = new dlfViewer({
171
-                        controls: ["' . implode('", "', $this->controls) . '"],
172
-                        div: "' . $this->settings['elementId'] . '",
173
-                        images: ' . json_encode($this->images) . ',
174
-                        fulltexts: ' . json_encode($this->fulltexts) . ',
175
-                        annotationContainers: ' . json_encode($this->annotationContainers) . ',
176
-                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . '
171
+                        controls: ["' . implode('", "', $this->controls).'"],
172
+                        div: "' . $this->settings['elementId'].'",
173
+                        images: ' . json_encode($this->images).',
174
+                        fulltexts: ' . json_encode($this->fulltexts).',
175
+                        annotationContainers: ' . json_encode($this->annotationContainers).',
176
+                        useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).'
177 177
                     });
178 178
                 }
179 179
             });';
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
                 $image['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpImages]);
272 272
                 break;
273 273
             } else {
274
-                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"');
274
+                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"');
275 275
             }
276 276
         }
277 277
         if (empty($image)) {
278
-            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->settings['fileGrpImages'] . '"');
278
+            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->settings['fileGrpImages'].'"');
279 279
         }
280 280
         return $image;
281 281
     }
Please login to merge, or discard this patch.
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 (
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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']);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         // Load current document.
71 71
         $this->loadDocument($this->requestData);
72 72
         if (
73
-            $this->document === null
73
+            $this->document === NULL
74 74
             || $this->document->getDoc()->numPages < 1
75 75
         ) {
76 76
             // Quit without doing anything if required variables are not set.
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                     // Configure @action URL for form.
134 134
                     $uri = $this->uriBuilder->reset()
135 135
                         ->setTargetPageUid($GLOBALS['TSFE']->id)
136
-                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false)
136
+                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE)
137 137
                         ->setArguments([
138 138
                             'eID' => 'tx_dlf_pageview_proxy',
139 139
                             'url' => $fulltext['url'],
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             if ($iiif instanceof ManifestInterface) {
198 198
                 $canvas = $iiif->getContainedResourceById($canvasId);
199 199
                 /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */
200
-                if ($canvas != null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
200
+                if ($canvas != NULL && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
201 201
                     $annotationContainers = [];
202 202
                     /*
203 203
                      *  TODO Analyzing the annotations on the server side requires loading the annotation lists / pages
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
                      *  On the other hand, server connections are potentially better than client connections. Downloading annotation lists
208 208
                      */
209 209
                     foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) {
210
-                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) {
210
+                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) {
211 211
                             foreach ($textAnnotations as $annotation) {
212 212
                                 if (
213 213
                                     $annotation->getBody()->getFormat() == 'text/plain'
214
-                                    && $annotation->getBody()->getChars() != null
214
+                                    && $annotation->getBody()->getChars() != NULL
215 215
                                 ) {
216 216
                                     $annotationListData = [];
217 217
                                     $annotationListData['uri'] = $annotationContainer->getId();
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                     // Configure @action URL for form.
260 260
                     $uri = $this->uriBuilder->reset()
261 261
                         ->setTargetPageUid($GLOBALS['TSFE']->id)
262
-                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false)
262
+                        ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? TRUE : FALSE)
263 263
                         ->setArguments([
264 264
                             'eID' => 'tx_dlf_pageview_proxy',
265 265
                             'url' => $image['url'],
Please login to merge, or discard this patch.