Merge pull request #13 from kitodo/scrutinizer-patch-2

Scrutinizer Auto-Fixes
This commit is contained in:
Alexander Bigga 2021-11-27 09:40:28 +01:00 committed by GitHub
commit 269df15c3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -302,7 +302,7 @@ class NewTenantController extends AbstractController
$solrCore = $this->solrCoreRepository->findByPid($this->pid);
$solrCore2 = $this->solrCoreRepository->findByPid(0);
if (count($solrCore) > 0 OR count($solrCore2) > 0) {
if (count($solrCore) > 0 or count($solrCore2) > 0) {
if (count($solrCore) > 0) {
// Fine.
$this->addFlashMessage(

View File

@ -1,5 +1,5 @@
<?php
declare(strict_types = 1);
declare(strict_types=1);
namespace Kitodo\Dlf\Hooks;
use TYPO3\CMS\Backend\Form\Element\AbstractFormElement;

View File

@ -158,7 +158,7 @@ class FileLocationUpdater implements UpgradeWizardInterface, ChattyInterface, Lo
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$allResults = [];
$numResults = 0;
foreach(array_keys($this->fieldsToMigrate) as $table) {
foreach (array_keys($this->fieldsToMigrate) as $table) {
$queryBuilder = $connectionPool->getQueryBuilderForTable($table);
$queryBuilder->getRestrictions()->removeAll();
try {
@ -242,11 +242,11 @@ class FileLocationUpdater implements UpgradeWizardInterface, ChattyInterface, Lo
return;
}
$storageUid = (int)$this->storage->getUid();
$storageUid = (int) $this->storage->getUid();
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$fileUid = null;
$sourcePath = Environment::getPublicPath() . '/' . $fieldItem;
$sourcePath = Environment::getPublicPath() . '/' . $fieldItem;
// maybe the file was already moved, so check if the original file still exists
if (file_exists($sourcePath)) {