@@ -81,7 +81,7 @@ public function supportQuery(ExchangeRateQuery $exchangeQuery, bool $ignoreSuppo
8181 *
8282 * @return int|false
8383 */
84- private static function detectPeriodicity (string $ baseCurrency , \DateTimeInterface $ date = null )
84+ private static function detectPeriodicity (string $ baseCurrency , ? \DateTimeInterface $ date = null )
8585 {
8686 return array_reduce (
8787
@@ -115,7 +115,7 @@ static function ($periodicity, $entry) use ($date) {
115115 *
116116 * @return bool
117117 */
118- private static function supportQuoteCurrency (string $ quoteCurrency , \DateTimeInterface $ date = null ): bool
118+ private static function supportQuoteCurrency (string $ quoteCurrency , ? \DateTimeInterface $ date = null ): bool
119119 {
120120 if ($ date ) {
121121 $ date = $ date ->format ('Y-m-d ' );
@@ -167,7 +167,7 @@ public function getName(): string
167167 * @throws UnsupportedDateException
168168 * @throws UnsupportedExchangeQueryException
169169 */
170- private function doCreateRate (ExchangeRateQuery $ exchangeQuery , \DateTimeInterface $ requestedDate = null ): ExchangeRate
170+ private function doCreateRate (ExchangeRateQuery $ exchangeQuery , ? \DateTimeInterface $ requestedDate = null ): ExchangeRate
171171 {
172172 $ currencyPair = $ exchangeQuery ->getCurrencyPair ();
173173 $ baseCurrency = $ currencyPair ->getBaseCurrency ();
@@ -224,7 +224,7 @@ private function doCreateRate(ExchangeRateQuery $exchangeQuery, \DateTimeInterfa
224224 *
225225 * @return string
226226 */
227- private function buildUrl (string $ baseCurrency , \DateTimeInterface $ requestedDate = null ): string
227+ private function buildUrl (string $ baseCurrency , ? \DateTimeInterface $ requestedDate = null ): string
228228 {
229229 $ data = isset ($ requestedDate ) ? ['ondate ' => $ requestedDate ->format ('Y-m-d ' )] : [];
230230 $ data += ['periodicity ' => (int ) self ::detectPeriodicity ($ baseCurrency , $ requestedDate )];
0 commit comments