Passed
Pull Request — master (#123)
by
unknown
05:05
created
Classes/Updates/MigrateSettings.php 1 patch
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
 
109 109
             // exit if at least one update statement is not successful
110 110
             if (!((bool) $updateResult)) {
111
-                return false;
111
+                return FALSE;
112 112
             }
113 113
         }
114 114
 
115
-        return true;
115
+        return TRUE;
116 116
     }
117 117
 
118 118
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function updateNecessary(): bool
128 128
     {
129
-        $oldSettingsFound = false;
129
+        $oldSettingsFound = FALSE;
130 130
 
131 131
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
132 132
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         // Update the found record sets
145 145
         while ($record = $statement->fetchAssociative()) {
146 146
             $oldSettingsFound = $this->checkForOldSettings($record['pi_flexform']);
147
-            if ($oldSettingsFound === true) {
147
+            if ($oldSettingsFound === TRUE) {
148 148
                 // We found at least one field to be updated --> break here
149 149
                 break;
150 150
             }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         foreach ($fields as $field) {
189 189
             // change the index attribute if it doesn't start with 'settings.' yet
190
-            if (strpos($field['index'], 'settings.') === false) {
190
+            if (strpos($field['index'], 'settings.') === FALSE) {
191 191
                 $field['index'] = 'settings.' . $field['index'];
192 192
             }
193 193
         }
Please login to merge, or discard this patch.
Classes/Updates/FileLocationUpdater.php 1 patch
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
     public function updateNecessary(): bool
106 106
     {
107 107
         /** @var int */
108
-        $numRecords = $this->getRecordsFromTable(true);
108
+        $numRecords = $this->getRecordsFromTable(TRUE);
109 109
         if ($numRecords > 0) {
110
-            return true;
110
+            return TRUE;
111 111
         }
112
-        return false;
112
+        return FALSE;
113 113
     }
114 114
 
115 115
     /**
@@ -145,16 +145,16 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function executeUpdate(): bool
147 147
     {
148
-        $result = true;
148
+        $result = TRUE;
149 149
         try {
150 150
             /** @var int */
151
-            $numRecords = $this->getRecordsFromTable(true);
151
+            $numRecords = $this->getRecordsFromTable(TRUE);
152 152
             if ($numRecords > 0) {
153 153
                 $this->performUpdate();
154 154
             }
155 155
         } catch (\Exception $e) {
156 156
             // If something goes wrong, migrateField() logs an error
157
-            $result = false;
157
+            $result = FALSE;
158 158
         }
159 159
         return $result;
160 160
     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      *
172 172
      * @throws \RuntimeException
173 173
      */
174
-    protected function getRecordsFromTable(bool $countOnly = false)
174
+    protected function getRecordsFromTable(bool $countOnly = FALSE)
175 175
     {
176 176
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
177 177
         $allResults = [];
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     ->orderBy('uid')
199 199
                     ->execute()
200 200
                     ->fetchAllAssociative();
201
-                if ($countOnly === true) {
201
+                if ($countOnly === TRUE) {
202 202
                     $numResults += count($result);
203 203
                 } else {
204 204
                     $allResults[$table] = $result;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             }
212 212
         }
213 213
 
214
-        if ($countOnly === true) {
214
+        if ($countOnly === TRUE) {
215 215
             return $numResults;
216 216
         } else {
217 217
             return $allResults;
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      */
229 229
     protected function performUpdate(): bool
230 230
     {
231
-        $result = true;
231
+        $result = TRUE;
232 232
 
233 233
         try {
234 234
             $storages = GeneralUtility::makeInstance(StorageRepository::class)->findAll();
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                 }
242 242
             }
243 243
         } catch (\Exception $e) {
244
-            $result = false;
244
+            $result = FALSE;
245 245
         }
246 246
 
247 247
         return $result;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         $storageUid = (int) $this->storage->getUid();
271 271
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
272 272
 
273
-        $fileUid = null;
273
+        $fileUid = NULL;
274 274
         $sourcePath = Environment::getPublicPath() . '/' . $fieldItem;
275 275
 
276 276
         // maybe the file was already moved, so check if the original file still exists
Please login to merge, or discard this patch.
Classes/Pagination/PageGridPagination.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
         $previousPage = (int) (($this->paginator->getCurrentPageNumber() - 1) * $this->paginator->getPublicItemsPerPage()) - ($this->paginator->getPublicItemsPerPage() - 1);
37 37
 
38 38
         if ($previousPage > $this->paginator->getNumberOfPages()) {
39
-            return null;
39
+            return NULL;
40 40
         }
41 41
 
42 42
         return $previousPage >= $this->getFirstPageNumber()
43 43
             ? $previousPage
44
-            : null
44
+            : NULL
45 45
             ;
46 46
     }
47 47
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         return $nextPage <= $this->paginator->getNumberOfPages()
53 53
             ? $nextPage
54
-            : null
54
+            : NULL
55 55
             ;
56 56
     }
57 57
 
Please login to merge, or discard this patch.
Classes/Controller/MetadataController.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     protected function printMetadata(array $metadata): void
156 156
     {
157 157
         if ($this->useOriginalIiifManifestMetadata) {
158
-            $this->view->assign('useIiif', true);
158
+            $this->view->assign('useIiif', TRUE);
159 159
             $this->view->assign('iiifData', $this->buildIiifData($metadata));
160 160
         } else {
161 161
             // findBySettings also sorts entries by the `sorting` field
@@ -245,9 +245,9 @@  discard block
 block discarded – undo
245 245
         if (IRI::isAbsoluteIri($value) && ($scheme == 'http' || $scheme == 'https')) {
246 246
             //TODO: should really label be converted to empty string if equal to value?
247 247
             $label = $value == $label ? '' : $label;
248
-            $buildUrl = true;
248
+            $buildUrl = TRUE;
249 249
         } else {
250
-            $buildUrl = false;
250
+            $buildUrl = FALSE;
251 251
         }
252 252
 
253 253
         return [
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
     private function parseParentTitle(int $i, $value, array &$metadata) : void
389 389
     {
390 390
         if (empty(implode('', $value)) && $this->settings['getTitle'] && $this->document->getPartof()) {
391
-            $superiorTitle = AbstractDocument::getTitle($this->document->getPartof(), true);
391
+            $superiorTitle = AbstractDocument::getTitle($this->document->getPartof(), TRUE);
392 392
             if (!empty($superiorTitle)) {
393 393
                 $metadata[$i]['title'] = ['[' . $superiorTitle . ']'];
394 394
             }
Please login to merge, or discard this patch.
Classes/Controller/BasketController.php 1 patch
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
         $countDocs = 0;
192 192
         if ($basket->getDocIds()) {
193
-            $countDocs = count(json_decode($basket->getDocIds(), true));
193
+            $countDocs = count(json_decode($basket->getDocIds(), TRUE));
194 194
         }
195 195
         $this->view->assign('countDocs', $countDocs);
196 196
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         }
254 254
 
255 255
         // session does not exist
256
-        if ($basket === null) {
256
+        if ($basket === NULL) {
257 257
             // create new basket in db
258 258
             $basket = GeneralUtility::makeInstance(Basket::class);
259 259
             $basket->setSessionId($userSession->getIdentifier());
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
                 'record_id' => $this->document->getRecordId(),
389 389
             ];
390 390
         }
391
-        return false;
391
+        return FALSE;
392 392
     }
393 393
 
394 394
     /**
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         } else {
411 411
             $page = (int) $piVars['startpage'];
412 412
         }
413
-        if ($page != null || $piVars['addToBasket'] == 'list') {
413
+        if ($page != NULL || $piVars['addToBasket'] == 'list') {
414 414
             $documentItem = [
415 415
                 'id' => (int) $piVars['id'],
416 416
                 'startpage' => (int) $piVars['startpage'],
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             $this->loadDocument((int) $documentItem['id']);
434 434
             if ($this->isDocMissing()) {
435 435
                 // Quit without doing anything if required variables are not set.
436
-                return null;
436
+                return NULL;
437 437
             }
438 438
             // set endpage for toc and subentry based on logid
439 439
             if (($piVars['addToBasket'] == 'subentry') or ($piVars['addToBasket'] == 'toc')) {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             }
488 488
 
489 489
             $basket->setDocIds(json_encode($items));
490
-            if ($basket->getUid() === null) {
490
+            if ($basket->getUid() === NULL) {
491 491
                 $this->basketRepository->add($basket);
492 492
             } else {
493 493
                 $this->basketRepository->update($basket);
Please login to merge, or discard this patch.
Classes/Format/AudioVideoMD.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      *
39 39
      * @return void
40 40
      */
41
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata, bool $useExternalApis = false): void
41
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata, bool $useExternalApis = FALSE): void
42 42
     {
43 43
         $xml->registerXPathNamespace('audiomd', 'http://www.loc.gov/audioMD/');
44 44
         $xml->registerXPathNamespace('videomd', 'http://www.loc.gov/videoMD/');
Please login to merge, or discard this patch.
Classes/Format/Alto.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@
 block discarded – undo
151 151
     {
152 152
         $namespace = $xml->getDocNamespaces();
153 153
 
154
-        if (in_array('http://www.loc.gov/standards/alto/ns-v2#', $namespace, true)) {
154
+        if (in_array('http://www.loc.gov/standards/alto/ns-v2#', $namespace, TRUE)) {
155 155
             $xml->registerXPathNamespace('alto', 'http://www.loc.gov/standards/alto/ns-v2#');
156
-        } elseif (in_array('http://www.loc.gov/standards/alto/ns-v3#', $namespace, true)) {
156
+        } elseif (in_array('http://www.loc.gov/standards/alto/ns-v3#', $namespace, TRUE)) {
157 157
             $xml->registerXPathNamespace('alto', 'http://www.loc.gov/standards/alto/ns-v3#');
158
-        } elseif (in_array('http://www.loc.gov/standards/alto/ns-v4#', $namespace, true)) {
158
+        } elseif (in_array('http://www.loc.gov/standards/alto/ns-v4#', $namespace, TRUE)) {
159 159
             $xml->registerXPathNamespace('alto', 'http://www.loc.gov/standards/alto/ns-v4#');
160 160
         }
161 161
     }
Please login to merge, or discard this patch.
Classes/Format/TeiHeader.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      *
36 36
      * @return void
37 37
      */
38
-    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata, bool $useExternalApis = false): void
38
+    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata, bool $useExternalApis = FALSE): void
39 39
     {
40 40
         $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0');
41 41
     }
Please login to merge, or discard this patch.
Classes/Api/Viaf/Client.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
             $response = $this->requestFactory->request($url);
97 97
         } catch (\Exception $e) {
98 98
             $this->logger->warning('Could not fetch data from URL "' . $url . '". Error: ' . $e->getMessage() . '.');
99
-            return false;
99
+            return FALSE;
100 100
         }
101 101
         return $response->getBody()->getContents();
102 102
     }
Please login to merge, or discard this patch.