Merge pull request #13 from kitodo/scrutinizer-patch-2
Scrutinizer Auto-Fixes
This commit is contained in:
commit
269df15c3a
|
@ -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(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
namespace Kitodo\Dlf\Hooks;
|
||||
|
||||
use TYPO3\CMS\Backend\Form\Element\AbstractFormElement;
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue