Skip to content

Commit

Permalink
Codacy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrizzor committed Jun 18, 2024
1 parent 4c6b57a commit 709711b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
7 changes: 2 additions & 5 deletions Classes/Common/MetsDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -932,13 +932,10 @@ private function getAdditionalMetadataFromDatabase(int $cPid, string $dmdId)
)
)
->where(
$queryBuilder->expr()->eq('tx_dlf_metadata.pid', intval($cPid)),
// $queryBuilder->expr()->eq('tx_dlf_metadata.l18n_parent', 0),
// $queryBuilder->expr()->eq('tx_dlf_metadataformat_joins.pid', intval($cPid)),
$queryBuilder->expr()->eq('tx_dlf_metadata.pid', (int) $cPid),
$queryBuilder->expr()->gt('tx_dlf_metadataformat_joins.subentries', 0),
$queryBuilder->expr()->eq('tx_dlf_subentries_joins.l18n_parent', 0),
$queryBuilder->expr()->eq('tx_dlf_subentries_joins.pid', intval($cPid))
// $queryBuilder->expr()->eq('tx_dlf_formats_joins.type', $queryBuilder->createNamedParameter($this->dmdSec[$dmdId]['type']))
$queryBuilder->expr()->eq('tx_dlf_subentries_joins.pid', (int) $cPid)
)
->orderBy('tx_dlf_subentries_joins.sorting')
->execute();
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/MetadataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected function printMetadata(array $metadata): void
$metadata[$i][$name] = is_array($value)
? implode($this->settings['separator'], $value)
: $value;

if ($metadata[$i][$name] === 'Array') {
$metadata[$i][$name] = [];
foreach ($value as $subKey => $subValue) {
Expand Down Expand Up @@ -384,7 +384,7 @@ private function parseMetadata(int $i, string $name, $value, array &$metadata) :
$langValue = Helper::getLanguageName($langValue);
}
} elseif (!empty($value)) {
$metadata[$i][$name][0] = $metadata[$i][$name][0];
$metadata[$i][$name][0] = $metadata[$i][$name][0];
}
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/MetadataSubentryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
class MetadataSubentryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{

}
}
6 changes: 4 additions & 2 deletions Classes/ViewHelpers/IsArrayViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

namespace Kitodo\Dlf\ViewHelpers;

use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;

Expand All @@ -32,9 +33,10 @@ public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
) {
)
{
$subject = $arguments['subject'];
if (null === $subject) {
if ($subject === null) {
$subject = $renderChildrenClosure();
}

Expand Down

0 comments on commit 709711b

Please sign in to comment.