1 | <?php |
||
24 | final class ExchangeRateContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var SharedStorageInterface |
||
28 | */ |
||
29 | private $sharedStorage; |
||
30 | |||
31 | /** |
||
32 | * @var FactoryInterface |
||
33 | */ |
||
34 | private $exchangeRateFactory; |
||
35 | |||
36 | /** |
||
37 | * @var RepositoryInterface |
||
38 | */ |
||
39 | private $exchangeRateRepository; |
||
40 | |||
41 | /** |
||
42 | * @param SharedStorageInterface $sharedStorage |
||
43 | * @param FactoryInterface $exchangeRateFactory |
||
44 | * @param RepositoryInterface $exchangeRateRepository |
||
45 | */ |
||
46 | public function __construct( |
||
55 | |||
56 | /** |
||
57 | * @Given /^the store (?:|also )has an exchange rate ([0-9\.]+) with source (currency "[^"]+") and target (currency "[^"]+")$/ |
||
58 | */ |
||
59 | public function thereIsAnExchangeRateWithSourceCurrencyAndTargetCurrency( |
||
68 | |||
69 | /** |
||
70 | * @param CurrencyInterface $sourceCurrency |
||
71 | * @param CurrencyInterface $targetCurrency |
||
72 | * @param float $ratio |
||
73 | * |
||
74 | * @return ExchangeRateInterface |
||
75 | */ |
||
76 | private function createExchangeRate(CurrencyInterface $sourceCurrency, CurrencyInterface $targetCurrency, $ratio = 1.00) |
||
86 | |||
87 | /** |
||
88 | * @param ExchangeRateInterface $exchangeRate |
||
89 | */ |
||
90 | private function saveExchangeRate(ExchangeRateInterface $exchangeRate) |
||
95 | } |
||
96 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.