1919class BillingRegistry implements BillingRegistryInterface
2020{
2121 /** @var TariffTypeDefinitionInterface[] */
22- private array $ tariffTypes = [];
22+ private array $ tariffTypeDefinitions = [];
2323 private bool $ locked = false ;
2424
25- public function addTariffType (TariffTypeDefinitionInterface $ tariffType ): void
25+ public function addTariffType (TariffTypeDefinitionInterface $ tariffTypeDefinition ): void
2626 {
2727 if ($ this ->locked ) {
2828 throw new BillingRegistryLockedException ("BillingRegistry is locked and cannot be modified. " );
2929 }
3030
31- $ this ->tariffTypes [] = $ tariffType ;
31+ $ this ->tariffTypeDefinitions [] = $ tariffTypeDefinition ;
3232 }
3333
3434 public function lock (): void
@@ -38,8 +38,8 @@ public function lock(): void
3838
3939 public function priceTypes (): \Generator
4040 {
41- foreach ($ this ->tariffTypes as $ tariffType ) {
42- foreach ($ tariffType ->withPrices () as $ priceTypeDefinition ) {
41+ foreach ($ this ->tariffTypeDefinitions as $ tariffTypeDefinition ) {
42+ foreach ($ tariffTypeDefinition ->withPrices () as $ priceTypeDefinition ) {
4343 yield $ priceTypeDefinition ;
4444 }
4545 }
@@ -146,7 +146,7 @@ private function findBehaviorInPriceType(
146146
147147 public function getBehaviors (string $ behaviorClassWrapper ): \Generator
148148 {
149- foreach ($ this ->tariffTypes as $ tariffType ) {
149+ foreach ($ this ->tariffTypeDefinitions as $ tariffType ) {
150150 foreach ($ tariffType ->withBehaviors () as $ behavior ) {
151151 if ($ behavior instanceof $ behaviorClassWrapper ) {
152152 yield $ behavior ;
0 commit comments