33namespace hiqdev \php \billing \product ;
44
55use hiqdev \billing \registry \behavior \PriceTypeDefinitionBehaviourCollection ;
6- use hiqdev \billing \registry \Domain \Model \Unit \Unit ;
76use hiqdev \billing \registry \invoice \InvoiceRepresentationCollection ;
87use hiqdev \billing \registry \product \Aggregate ;
98use hiqdev \billing \registry \quantity \formatter \QuantityFormatterDefinition ;
109use hiqdev \billing \registry \quantity \formatter \QuantityFormatterFactory ;
1110use hiqdev \billing \registry \quantity \FractionQuantityData ;
12- use hiqdev \billing \registry \Domain \Model \Unit \FractionUnit ;
1311use hiqdev \php \billing \product \Domain \Model \TariffTypeInterface ;
12+ use hiqdev \php \billing \product \Domain \Model \Unit \FractionUnitInterface ;
13+ use hiqdev \php \billing \product \Domain \Model \Unit \UnitInterface ;
1414use hiqdev \php \billing \quantity \QuantityFormatterInterface ;
1515use hiqdev \php \billing \type \TypeInterface ;
1616
1717class PriceTypeDefinition implements ParentNodeDefinitionInterface
1818{
19- private Unit $ unit ;
19+ private UnitInterface $ unit ;
2020
2121 private string $ description ;
2222
@@ -44,7 +44,7 @@ protected function init(): void
4444 // Hook
4545 }
4646
47- public function unit (Unit $ unit ): self
47+ public function unit (UnitInterface $ unit ): self
4848 {
4949 $ this ->unit = $ unit ;
5050
@@ -65,7 +65,7 @@ public function getDescription(): string
6565
6666 /**
6767 * @param string $formatterClass
68- * @param null|FractionUnit |string $fractionUnit
68+ * @param null|FractionUnitInterface |string $fractionUnit
6969 * @return $this
7070 */
7171 public function quantityFormatter (string $ formatterClass , $ fractionUnit = null ): self
@@ -112,7 +112,7 @@ public function hasType(TypeInterface $type): bool
112112 return $ this ->type ->equals ($ type );
113113 }
114114
115- public function getUnit (): Unit
115+ public function getUnit (): UnitInterface
116116 {
117117 return $ this ->unit ;
118118 }
0 commit comments