Skip to content

Commit 158c983

Browse files
committed
fix phpstan issues
1 parent 5518c2c commit 158c983

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/DsTrinityDataBundle.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ public function build(ContainerBuilder $container): void
1818
$container->addCompilerPass(new DataBuilderPass());
1919
}
2020

21+
public function getPath(): string
22+
{
23+
return \dirname(__DIR__);
24+
}
25+
2126
public function getProviderName(): string
2227
{
2328
return self::PROVIDER_NAME;

src/Normalizer/LocalizedResourceNormalizer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ protected function normalizeDocument(ContextDefinitionInterface $contextDefiniti
4747
// @todo: How to handle Snippets?
4848
4949
$documentLocale = $document->getProperty('language');
50+
5051
if (empty($documentLocale)) {
52+
5153
if ($this->options['skip_not_localized_documents'] === false) {
5254
throw new NormalizerException(sprintf('Cannot determinate locale aware document id "%s": no language property given.', $document->getId()));
53-
} else {
54-
return [];
5555
}
56+
57+
return [];
5658
}
5759

5860
$documentId = sprintf('%s_%s_%d', 'document', $documentLocale, $document->getId());

0 commit comments

Comments
 (0)