Skip to content

Commit

Permalink
Fix: PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
robertSt7 committed Mar 30, 2023
1 parent 5fcd81f commit 5f25d14
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions phpstan-baseline.neon
Expand Up @@ -5,6 +5,21 @@ parameters:
count: 3
path: src/DependencyInjection/Configuration.php

-
message: "#Call to static method addConfigLocationWithWriteTargetNodes() on an unknown class#"
count: 1
path: src/DependencyInjection/Configuration.php

-
message: "#Call to static method getConfigNodeFromSymfonyTree() on an unknown class#"
count: 1
path: src/DependencyInjection/PimcoreDataHubExtension.php

-
message: "#Call to static method getSymfonyConfigFiles() on an unknown class#"
count: 1
path: src/DependencyInjection/PimcoreDataHubExtension.php

-
message: "#^Constructor of class Pimcore\\\\Bundle\\\\DataHubBundle\\\\GraphQL\\\\AssetType\\\\AssetFolderType has an unused parameter \\$config\\.$#"
count: 1
Expand Down
4 changes: 3 additions & 1 deletion src/DependencyInjection/Configuration.php
Expand Up @@ -47,7 +47,9 @@ public function getConfigTreeBuilder()
$this->addConfigurationsNode($rootNode);
$this->addSupportedTypes($rootNode);

ConfigurationHelper::addConfigLocationWithWriteTargetNodes($rootNode, ['data_hub']);
if(\Pimcore\Version::getMajorVersion() >= 11) {
ConfigurationHelper::addConfigLocationWithWriteTargetNodes($rootNode, ['data_hub']);
}

return $treeBuilder;
}
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Query/Operator/Thumbnail.php
Expand Up @@ -64,7 +64,7 @@ public function getLabeledValue($element, ResolveInfo $resolveInfo = null)
if ($childResult->value instanceof Asset\Image || $childResult->value instanceof Asset\Video) {
$childValue = $result->value = $childResult->value;
$thumbnail = $childValue->getThumbnail($this->thumbnailConfig, false);
$result->value = $thumbnail->getPath(false);
$result->value = $thumbnail->getPath();
}
}

Expand Down

0 comments on commit 5f25d14

Please sign in to comment.