Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 182690...aedf9a )
by Sebastian
03:49
created
Classes/Plugin/ListView.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             if ((!empty($this->piVars['order']) && $this->piVars['order'] != $listMetadata['options']['order'])
448 448
                 || (isset($this->piVars['asc']) && $this->piVars['asc'] != $listMetadata['options']['order.asc'])) {
449 449
                 // Update list's metadata.
450
-                $listMetadata['options']['params']['sort'] = [$this->piVars['order']."_sorting" => (boolean) $this->piVars['asc']?'asc':'desc'];
450
+                $listMetadata['options']['params']['sort'] = [$this->piVars['order']."_sorting" => (boolean) $this->piVars['asc'] ? 'asc' : 'desc'];
451 451
                 $listMetadata['options']['order'] = $this->piVars['order'];
452 452
                 $listMetadata['options']['order.asc'] = (boolean) $this->piVars['asc'];
453 453
                 // Reset pointer.
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                     return $content;
466 466
                 }
467 467
                 // Set search parameters.
468
-                $solr->cPid =  $listMetadata['options']['pid'];
468
+                $solr->cPid = $listMetadata['options']['pid'];
469 469
                 $solr->params = $listMetadata['options']['params'];
470 470
                 // Perform search.
471 471
                 $this->list = $solr->search();
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             $markerArray['###LISTTHUMBNAIL###'] = '';
506 506
         }
507 507
         if ($currentEntry) {
508
-            $currentEntry =  ($this->piVars['pointer'] * $this->conf['limit']) + 1;
508
+            $currentEntry = ($this->piVars['pointer'] * $this->conf['limit']) + 1;
509 509
             $lastEntry = ($this->piVars['pointer'] * $this->conf['limit']) + $this->conf['limit'];
510 510
             $markerArray['###COUNT###'] = htmlspecialchars(sprintf($this->pi_getLL('count'), $currentEntry, $lastEntry < $this->list->metadata['options']['numberOfToplevelHits'] ? $lastEntry : $this->list->metadata['options']['numberOfToplevelHits'], $this->list->metadata['options']['numberOfToplevelHits']));
511 511
         } else {
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -161,11 +161,14 @@  discard block
 block discarded – undo
161 161
                             'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
162 162
                         ];
163 163
                         $value = $this->cObj->typoLink(htmlspecialchars($value), $conf);
164
-                    } elseif ($index_name == 'owner' && !empty($value)) { // Translate name of holding library.
164
+                    } elseif ($index_name == 'owner' && !empty($value)) {
165
+// Translate name of holding library.
165 166
                         $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_libraries', $this->conf['pages']));
166
-                    } elseif ($index_name == 'type' && !empty($value)) { // Translate document type.
167
+                    } elseif ($index_name == 'type' && !empty($value)) {
168
+// Translate document type.
167 169
                         $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages']));
168
-                    } elseif ($index_name == 'language' && !empty($value)) { // Translate ISO 639 language code.
170
+                    } elseif ($index_name == 'language' && !empty($value)) {
171
+// Translate ISO 639 language code.
169 172
                         $value = htmlspecialchars(Helper::getLanguageName($value));
170 173
                     } elseif (!empty($value)) {
171 174
                         $value = htmlspecialchars($value);
@@ -328,16 +331,19 @@  discard block
 block discarded – undo
328 331
                                 'additionalParams' => \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($this->prefixId, $additionalParams, '', TRUE, FALSE)
329 332
                             ];
330 333
                             $value = $this->cObj->typoLink(htmlspecialchars($value), $conf);
331
-                        } elseif ($index_name == 'owner' && !empty($value)) { // Translate name of holding library.
334
+                        } elseif ($index_name == 'owner' && !empty($value)) {
335
+// Translate name of holding library.
332 336
                             $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_libraries', $this->conf['pages']));
333
-                        } elseif ($index_name == 'type' && !empty($value)) { // Translate document type.
337
+                        } elseif ($index_name == 'type' && !empty($value)) {
338
+// Translate document type.
334 339
                             $_value = $value;
335 340
                             $value = htmlspecialchars(Helper::translate($value, 'tx_dlf_structures', $this->conf['pages']));
336 341
                             // Add page number for single pages.
337 342
                             if ($_value == 'page') {
338 343
                                 $value .= ' '.intval($subpart['page']);
339 344
                             }
340
-                        } elseif ($index_name == 'language' && !empty($value)) { // Translate ISO 639 language code.
345
+                        } elseif ($index_name == 'language' && !empty($value)) {
346
+// Translate ISO 639 language code.
341 347
                             $value = htmlspecialchars(Helper::getLanguageName($value));
342 348
                         } elseif (!empty($value)) {
343 349
                             $value = htmlspecialchars($value);
Please login to merge, or discard this patch.
Classes/Common/Helper.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -580,18 +580,18 @@
 block discarded – undo
580 580
         return $original;
581 581
     }
582 582
 
583
-     /**
584
-     * Process a data and/or command map with TYPO3 core engine as admin.
585
-     *
586
-     * @access public
587
-     *
588
-     * @param array $data: Data map
589
-     * @param array $cmd: Command map
590
-     * @param boolean $reverseOrder: Should the data map be reversed?
591
-     * @param boolean $cmdFirst: Should the command map be processed first?
592
-     *
593
-     * @return array Array of substituted "NEW..." identifiers and their actual UIDs.
594
-     */
583
+        /**
584
+         * Process a data and/or command map with TYPO3 core engine as admin.
585
+         *
586
+         * @access public
587
+         *
588
+         * @param array $data: Data map
589
+         * @param array $cmd: Command map
590
+         * @param boolean $reverseOrder: Should the data map be reversed?
591
+         * @param boolean $cmdFirst: Should the command map be processed first?
592
+         *
593
+         * @return array Array of substituted "NEW..." identifiers and their actual UIDs.
594
+         */
595 595
     public static function processDBasAdmin(array $data = [], array $cmd = [], $reverseOrder = FALSE, $cmdFirst = FALSE) {
596 596
         if (TYPO3_MODE === 'BE'
597 597
             && $GLOBALS['BE_USER']->isAdmin()) {
Please login to merge, or discard this patch.
class.ext_update.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -422,7 +422,7 @@
 block discarded – undo
422 422
                 $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntriesOkay', TRUE),
423 423
                 $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntries', TRUE),
424 424
                 \TYPO3\CMS\Core\Messaging\FlashMessage::OK
425
-               );
425
+                );
426 426
         } else {
427 427
             Helper::addMessage(
428 428
                 $GLOBALS['LANG']->getLL('update.documentSetFormatForOldEntriesNotOkay', TRUE),
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -390,10 +390,10 @@
 block discarded – undo
390 390
             );
391 391
         while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
392 392
             if ($resArray['COLUMN_NAME'] == 'document_format') {
393
-                return false;
393
+                return FALSE;
394 394
             }
395 395
         }
396
-        return true;
396
+        return TRUE;
397 397
     }
398 398
     
399 399
     protected function updateDocumentAddFormat() {
Please login to merge, or discard this patch.
Classes/Common/MetsDocument.php 3 patches
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,8 +131,7 @@
 block discarded – undo
131 131
         $fileMimeType = $this->getFileMimeType($id);
132 132
         $fileLocation = $this->getFileLocation($id);
133 133
         if ($fileMimeType == "application/vnd.kitodo.iiif") {
134
-            $fileLocation = strrpos($fileLocation, "info.json") == strlen($fileLocation) - 9 ? $fileLocation :
135
-            strrpos($fileLocation, "/") == strlen($fileLocation) ? $fileLocation."info.json" : $fileLocation."/info.json";
134
+            $fileLocation = strrpos($fileLocation, "info.json") == strlen($fileLocation) - 9 ? $fileLocation : strrpos($fileLocation, "/") == strlen($fileLocation) ? $fileLocation."info.json" : $fileLocation."/info.json";
136 135
             $conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]);
137 136
             IiifHelper::setUrlReader(IiifUrlReader::getInstance());
138 137
             IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
             IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']);
139 139
             IiifHelper::setMaxThumbnailWidth($conf['iiifThumbnailWidth']);
140 140
             $service = IiifHelper::loadIiifResource($fileLocation);
141
-            if ($service != null && $service instanceof AbstractImageService) {
141
+            if ($service != NULL && $service instanceof AbstractImageService) {
142 142
                 return $service->getImageUrl();
143 143
             }
144 144
         } elseif ($fileMimeType = "application/vnd.netfpx") {
145
-            $baseURL = $fileLocation.(strpos($fileLocation, "?") === false ? "?" : "");
145
+            $baseURL = $fileLocation.(strpos($fileLocation, "?") === FALSE ? "?" : "");
146 146
             // TODO CVT is an optional IIP server capability; in theory, capabilities should be determined in the object request with '&obj=IIP-server'
147 147
             return $baseURL."&CVT=jpeg";
148 148
         }
@@ -580,9 +580,9 @@  discard block
 block discarded – undo
580 580
         
581 581
         if ($preloadedDocument instanceof \SimpleXMLElement) {
582 582
             $this->xml = $preloadedDocument;
583
-            return true;
583
+            return TRUE;
584 584
         }
585
-        return false;
585
+        return FALSE;
586 586
     }
587 587
 
588 588
     /**
Please login to merge, or discard this patch.
Braces   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
  * @subpackage	tx_dlf
24 24
  * @access	public
25 25
  */
26
-final class MetsDocument extends Document
27
-{
26
+final class MetsDocument extends Document {
28 27
     /**
29 28
      * This holds the whole XML file as string for serialization purposes
30 29
      * @see __sleep() / __wakeup()
@@ -259,14 +258,16 @@  discard block
 block discarded – undo
259 258
             // Yes. Get the file reference.
260 259
             $details['points'] = (string) $structure->children('http://www.loc.gov/METS/')->mptr[0]->attributes('http://www.w3.org/1999/xlink')->href;
261 260
         } elseif (!empty($this->physicalStructure)
262
-            && array_key_exists($details['id'], $this->smLinks['l2p'])) { // Are there any physical elements and is this logical unit linked to at least one of them?
261
+            && array_key_exists($details['id'], $this->smLinks['l2p'])) {
262
+// Are there any physical elements and is this logical unit linked to at least one of them?
263 263
             $details['points'] = max(intval(array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, TRUE)), 1);
264 264
             if (!empty($this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$extConf['fileGrpThumbs']])) {
265 265
                 $details['thumbnailId'] = $this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$extConf['fileGrpThumbs']];
266 266
             }
267 267
             // Get page/track number of the first page/track related to this structure element.
268 268
             $details['pagination'] = $this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['orderlabel'];
269
-        } elseif ($details['id'] == $this->_getToplevelId()) { // Is this the toplevel structure element?
269
+        } elseif ($details['id'] == $this->_getToplevelId()) {
270
+// Is this the toplevel structure element?
270 271
             // Yes. Point to itself.
271 272
             $details['points'] = 1;
272 273
             if (!empty($this->physicalStructure)
@@ -491,8 +492,7 @@  discard block
 block discarded – undo
491 492
      * {@inheritDoc}
492 493
      * @see Document::getStructureDepth()
493 494
      */
494
-    public function getStructureDepth($logId)
495
-    {
495
+    public function getStructureDepth($logId) {
496 496
         return count($this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$logId.'"]/ancestor::*'));
497 497
     }
498 498
 
@@ -551,8 +551,7 @@  discard block
 block discarded – undo
551 551
      * {@inheritDoc}
552 552
      * @see Document::getParentDocumentUid()
553 553
      */
554
-    protected function getParentDocumentUidForSaving($pid, $core)
555
-    {
554
+    protected function getParentDocumentUidForSaving($pid, $core) {
556 555
         $partof = 0;
557 556
         // Get the closest ancestor of the current document which has a MPTR child.
558 557
         $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$this->_getToplevelId().'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr');
Please login to merge, or discard this patch.
Classes/Plugin/Tools/AnnotationTool.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         // Load template file.
66 66
         $this->getTemplate();
67 67
         $annotationContainers = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['annotationContainers'];
68
-        if ($annotationContainers != null && sizeof($annotationContainers)>0) {
68
+        if ($annotationContainers != null && sizeof($annotationContainers) > 0) {
69 69
             $markerArray['###ANNOTATION_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-annotations" title="" data-dic="annotations-on:'
70 70
                 .$this->pi_getLL('annotations-on', '', TRUE).';annotations-off:'
71 71
                     .$this->pi_getLL('annotations-off', '', TRUE).'">&nbsp;</a>';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         // Load template file.
66 66
         $this->getTemplate();
67 67
         $annotationContainers = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['annotationContainers'];
68
-        if ($annotationContainers != null && sizeof($annotationContainers)>0) {
68
+        if ($annotationContainers != NULL && sizeof($annotationContainers)>0) {
69 69
             $markerArray['###ANNOTATION_SELECT###'] = '<a class="select switchoff" id="tx-dlf-tools-annotations" title="" data-dic="annotations-on:'
70 70
                 .$this->pi_getLL('annotations-on', '', TRUE).';annotations-off:'
71 71
                     .$this->pi_getLL('annotations-off', '', TRUE).'">&nbsp;</a>';
Please login to merge, or discard this patch.
Classes/Plugin/Metadata.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
      *
151 151
      * @return string The metadata array ready for output
152 152
      */
153
-    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) {
153
+    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = FALSE) {
154 154
         // Load template file.
155 155
         $this->getTemplate();
156 156
         $output = '';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
                 $iiifwrap['value.']['required'] = 1;
166 166
                 $iiifwrap['value.']['wrap'] = '<dd>|</dd>';
167 167
             }
168
-            $iiifLink=[];
168
+            $iiifLink = [];
169 169
             $iiifLink['key.']['wrap'] = '<dt>|</dt>';
170 170
             $iiifLink['value.']['required'] = 1;
171 171
             $iiifLink['value.']['setContentToCurrent'] = 1;
Please login to merge, or discard this patch.
Classes/Plugin/PageView.php 3 patches
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             if ($iiif instanceof ManifestInterface) {
248 248
                 $canvas = $iiif->getContainedResourceById($canvasId);
249 249
                 /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */
250
-                if ($canvas!=null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
250
+                if ($canvas!=NULL && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
251 251
                     $annotationContainers = array();
252 252
                     /*
253 253
                      *  TODO Analyzing the annotations on the server side requires loading the annotation lists / pages
@@ -257,10 +257,10 @@  discard block
 block discarded – undo
257 257
                      *  On the other hand, server connections are potentially better than client connections. Downloading annotation lists
258 258
                      */
259 259
                     foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) {
260
-                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != null) {
260
+                        if (($textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING)) != NULL) {
261 261
                             foreach ($textAnnotations as $annotation) {
262 262
                                 if ($annotation->getBody()->getFormat() == "text/plain"
263
-                                    && $annotation->getBody()->getChars() != null) {
263
+                                    && $annotation->getBody()->getChars() != NULL) {
264 264
                                     $annotationListData = [];
265 265
                                     $annotationListData["uri"] = $annotationContainer->getId();
266 266
                                     $annotationListData["label"] = $annotationContainer->getLabelForDisplay();
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @var array
58 58
      * @access protected
59 59
      */
60
-    protected $annotationContainers = array();
60
+    protected $annotationContainers = array ();
61 61
 
62 62
     /**
63 63
      * Adds Viewer javascript
@@ -250,8 +250,8 @@  discard block
 block discarded – undo
250 250
             if ($iiif instanceof ManifestInterface) {
251 251
                 $canvas = $iiif->getContainedResourceById($canvasId);
252 252
                 /* @var $canvas \Ubl\Iiif\Presentation\Common\Model\Resources\CanvasInterface */
253
-                if ($canvas!=null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
254
-                    $annotationContainers = array();
253
+                if ($canvas != null && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
254
+                    $annotationContainers = array ();
255 255
                     /*
256 256
                      *  TODO Analyzing the annotations on the server side requires loading the annotation lists / pages
257 257
                      *  just to determine wether they contain text annotations for painting. This will take time and lead to a bad user experience.
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 }
286 286
             }
287 287
         }
288
-        return array();
288
+        return array ();
289 289
     }
290 290
 
291 291
     /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -242,8 +242,7 @@
 block discarded – undo
242 242
      * @return array     An array containing the IRIs of the AnnotationLists / AnnotationPages as well as
243 243
      *                   some information about the canvas.
244 244
      */
245
-    protected function getAnnotationContainers($page)
246
-    {
245
+    protected function getAnnotationContainers($page) {
247 246
         if ($this->doc instanceof IiifManifest) {
248 247
             $canvasId = $this->doc->physicalStructure[$page];
249 248
             $iiif = $this->doc->getIiif();
Please login to merge, or discard this patch.
ext_localconf.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
 }
15 15
 // Define constants.
16 16
 if (!defined('DEVLOG_SEVERITY_OK')) {
17
-    define ('DEVLOG_SEVERITY_OK', -1);
17
+    define('DEVLOG_SEVERITY_OK', -1);
18 18
 }
19 19
 if (!defined('DEVLOG_SEVERITY_INFO')) {
20
-    define ('DEVLOG_SEVERITY_INFO', 0);
20
+    define('DEVLOG_SEVERITY_INFO', 0);
21 21
 }
22 22
 if (!defined('DEVLOG_SEVERITY_NOTICE')) {
23
-    define ('DEVLOG_SEVERITY_NOTICE', 1);
23
+    define('DEVLOG_SEVERITY_NOTICE', 1);
24 24
 }
25 25
 if (!defined('DEVLOG_SEVERITY_WARNING')) {
26
-    define ('DEVLOG_SEVERITY_WARNING', 2);
26
+    define('DEVLOG_SEVERITY_WARNING', 2);
27 27
 }
28 28
 if (!defined('DEVLOG_SEVERITY_ERROR')) {
29
-    define ('DEVLOG_SEVERITY_ERROR', 3);
29
+    define('DEVLOG_SEVERITY_ERROR', 3);
30 30
 }
31 31
 // Register plugins.
32 32
 \Kitodo\Dlf\Hooks\ExtensionManagementUtility::addPItoST43($_EXTKEY, \Kitodo\Dlf\Plugin\AudioPlayer::class, '_audioplayer', 'list_type', TRUE);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class;
63 63
 // Register command line scripts.
64 64
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = [
65
-    function () {
65
+    function() {
66 66
         $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Kitodo\Dlf\Cli\CommandLineIndexer::class);
67 67
         $SOBE->main();
68 68
     },
Please login to merge, or discard this patch.
Classes/Common/Document.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
                     /* @var $xml \SimpleXMLElement */
449 449
                     $xml->registerXPathNamespace('mets', 'http://www.loc.gov/METS/');
450 450
                     $xpathResult = $xml->xpath('//mets:mets');
451
-                    $documentFormat = ($xpathResult !== false && count($xpathResult)>0) ? 'METS' : null;
451
+                    $documentFormat = ($xpathResult !== false && count($xpathResult) > 0) ? 'METS' : null;
452 452
                 } else {
453 453
                     // Try to load file as IIIF resource instead.
454 454
                     $contentAsJsonArray = json_decode($content, true);
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
                 return $depth;
683 683
             } elseif (array_key_exists('children', $element)) {
684 684
                 $foundInChildren = $this->getTreeDepth($element['children'], $depth + 1, $logId);
685
-                if ($foundInChildren!==false) {
685
+                if ($foundInChildren !== false) {
686 686
                     return $foundInChildren;
687 687
                 }
688 688
             }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -411,9 +411,9 @@  discard block
 block discarded – undo
411 411
             }
412 412
         }
413 413
         // Create new instance depending on format (METS or IIIF) ...
414
-        $documentFormat = null;
415
-        $xml = null;
416
-        $iiif = null;
414
+        $documentFormat = NULL;
415
+        $xml = NULL;
416
+        $iiif = NULL;
417 417
         // Try to get document format from database
418 418
         if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) {
419 419
             $whereClause = 'tx_dlf_documents.uid='.intval($uid).Helper::whereClause('tx_dlf_documents');
@@ -460,15 +460,15 @@  discard block
 block discarded – undo
460 460
                 libxml_disable_entity_loader($previousValueOfEntityLoader);
461 461
                 // Reset libxml's error logging.
462 462
                 libxml_use_internal_errors($libxmlErrors);
463
-                if ($xml !== false) {
463
+                if ($xml !== FALSE) {
464 464
                     /* @var $xml \SimpleXMLElement */
465 465
                     $xml->registerXPathNamespace('mets', 'http://www.loc.gov/METS/');
466 466
                     $xpathResult = $xml->xpath('//mets:mets');
467
-                    $documentFormat = ($xpathResult !== false && count($xpathResult)>0) ? 'METS' : null;
467
+                    $documentFormat = ($xpathResult !== FALSE && count($xpathResult)>0) ? 'METS' : NULL;
468 468
                 } else {
469 469
                     // Try to load file as IIIF resource instead.
470
-                    $contentAsJsonArray = json_decode($content, true);
471
-                    if ($contentAsJsonArray !== null) {
470
+                    $contentAsJsonArray = json_decode($content, TRUE);
471
+                    if ($contentAsJsonArray !== NULL) {
472 472
                         // Load plugin configuration.
473 473
                         $conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]);
474 474
                         IiifHelper::setUrlReader(IiifUrlReader::getInstance());
@@ -722,12 +722,12 @@  discard block
 block discarded – undo
722 722
                 return $depth;
723 723
             } elseif (array_key_exists('children', $element)) {
724 724
                 $foundInChildren = $this->getTreeDepth($element['children'], $depth + 1, $logId);
725
-                if ($foundInChildren!==false) {
725
+                if ($foundInChildren!==FALSE) {
726 726
                     return $foundInChildren;
727 727
                 }
728 728
             }
729 729
         }
730
-        return false;
730
+        return FALSE;
731 731
     }
732 732
 
733 733
     /**
Please login to merge, or discard this patch.