@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | // Get extension configuration. |
108 | 108 | $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf'); |
109 | 109 | } else { |
110 | - return false; |
|
110 | + return FALSE; |
|
111 | 111 | } |
112 | 112 | $this->storagePid = MathUtility::forceIntegerInRange((int) $storagePid, 0); |
113 | 113 | |
114 | - return true; |
|
114 | + return TRUE; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -172,10 +172,10 @@ discard block |
||
172 | 172 | */ |
173 | 173 | protected function saveToDatabase(Document $document) |
174 | 174 | { |
175 | - $success = false; |
|
175 | + $success = FALSE; |
|
176 | 176 | |
177 | 177 | $doc = $document->getDoc(); |
178 | - if ($doc === null) { |
|
178 | + if ($doc === NULL) { |
|
179 | 179 | return $success; |
180 | 180 | } |
181 | 181 | $doc->cPid = $this->storagePid; |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $document->setPartof($this->getParentDocumentUidForSaving($document)); |
268 | 268 | } |
269 | 269 | |
270 | - if ($document->getUid() === null) { |
|
270 | + if ($document->getUid() === NULL) { |
|
271 | 271 | // new document |
272 | 272 | $this->documentRepository->add($document); |
273 | 273 | } else { |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class); |
279 | 279 | $persistenceManager->persistAll(); |
280 | 280 | |
281 | - $success = true; |
|
281 | + $success = TRUE; |
|
282 | 282 | |
283 | 283 | return $success; |
284 | 284 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | { |
296 | 296 | $doc = $document->getDoc(); |
297 | 297 | |
298 | - if ($doc !== null) { |
|
298 | + if ($doc !== NULL) { |
|
299 | 299 | // Get the closest ancestor of the current document which has a MPTR child. |
300 | 300 | $parentMptr = $doc->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $doc->toplevelId . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); |
301 | 301 | if (!empty($parentMptr)) { |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | if ($parentDoc->recordId) { |
308 | 308 | $parentDocument = $this->documentRepository->findOneByRecordId($parentDoc->recordId); |
309 | 309 | |
310 | - if ($parentDocument === null) { |
|
310 | + if ($parentDocument === NULL) { |
|
311 | 311 | // create new Document object |
312 | 312 | $parentDocument = GeneralUtility::makeInstance(Document::class); |
313 | 313 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | |
320 | 320 | $success = $this->saveToDatabase($parentDocument); |
321 | 321 | |
322 | - if ($success === true) { |
|
322 | + if ($success === TRUE) { |
|
323 | 323 | // add to index |
324 | 324 | Indexer::add($parentDocument); |
325 | 325 | return $parentDocument->getUid(); |