Skip to content

Commit

Permalink
change to use InputQuantityValue
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored Jul 26, 2023
1 parent 58a38c2 commit ec46463
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Mapping/Operator/Factory/InputQuantityValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class InputQuantityValue extends QuantityValue
* @param mixed $inputData
* @param bool $dryRun
*
* @return \Pimcore\Model\DataObject\Data\QuantityValue
* @return \Pimcore\Model\DataObject\Data\InputQuantityValue
*/
public function process($inputData, bool $dryRun = false)

Check failure on line 29 in src/Mapping/Operator/Factory/InputQuantityValue.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8.0, lowest, false)

Return type (Pimcore\Model\DataObject\Data\InputQuantityValue) of method Pimcore\Bundle\DataImporterBundle\Mapping\Operator\Factory\InputQuantityValue::process() should be compatible with return type (Pimcore\Model\DataObject\Data\QuantityValue|null) of method Pimcore\Bundle\DataImporterBundle\Mapping\Operator\Factory\QuantityValue::process()

Check failure on line 29 in src/Mapping/Operator/Factory/InputQuantityValue.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8.2, highest, true)

Return type (Pimcore\Model\DataObject\Data\InputQuantityValue) of method Pimcore\Bundle\DataImporterBundle\Mapping\Operator\Factory\InputQuantityValue::process() should be compatible with return type (Pimcore\Model\DataObject\Data\QuantityValue|null) of method Pimcore\Bundle\DataImporterBundle\Mapping\Operator\Factory\QuantityValue::process()
{
return new \Pimcore\Model\DataObject\Data\QuantityValue(
return new \Pimcore\Model\DataObject\Data\InputQuantityValue(
$inputData[0] ?? null,
$inputData[1] ?? null
);
Expand Down Expand Up @@ -63,7 +63,7 @@ public function evaluateReturnType(string $inputType, int $index = null): string
*/
public function generateResultPreview($inputData)
{
if ($inputData instanceof \Pimcore\Model\DataObject\Data\QuantityValue) {
if ($inputData instanceof \Pimcore\Model\DataObject\Data\InputQuantityValue) {
return 'InputQuantityValue: ' .
$inputData->getValue() . ' ' .
($inputData->getUnit() ? $inputData->getUnit()->getAbbreviation() : '');
Expand Down

0 comments on commit ec46463

Please sign in to comment.