Skip to content

Commit ceb225d

Browse files
committed
Added the missing method of the operational risk scales duplication.
1 parent 7c87a5f commit ceb225d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Entity/OperationalInstanceRiskScaleSuperClass.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ class OperationalInstanceRiskScaleSuperClass
8181
*/
8282
protected $targetedValue = -1;
8383

84+
public static function constructFromObject(
85+
OperationalInstanceRiskScaleSuperClass $operationalInstanceRiskScale
86+
): OperationalInstanceRiskScaleSuperClass {
87+
return (new static())
88+
->setBrutValue($operationalInstanceRiskScale->getBrutValue())
89+
->setNetValue($operationalInstanceRiskScale->getNetValue())
90+
->setTargetedValue($operationalInstanceRiskScale->getTargetedValue());
91+
}
92+
8493
public function getId()
8594
{
8695
return $this->id;

0 commit comments

Comments
 (0)