11<?php
2-
32namespace Teknomavi \Tcmb ;
43
54use Teknomavi \Common \Wrapper \Curl ;
@@ -93,7 +92,7 @@ private function getTcmbData(Curl $curl = null)
9392 throw new Exception \ConnectionFailed ('Sunucu Bağlantısı Kurulamadı: ' . $ curl ->error ());
9493 }
9594 $ curl ->close ();
96- $ this ->data = $ this ->formatTcmbData ((array )simplexml_load_string ($ response ));
95+ $ this ->data = $ this ->formatTcmbData ((array ) simplexml_load_string ($ response ));
9796 $ timezone = new \DateTimeZone ('Europe/Istanbul ' );
9897 $ now = new \DateTime ('now ' , $ timezone );
9998 $ expire = $ this ->data ['today ' ] == $ now ->format ('d.m.Y ' ) ? 'Tomorrow 15:30 ' : 'Today 15:30 ' ;
@@ -118,21 +117,21 @@ private function formatTcmbData($data)
118117 $ currencies = [];
119118 if (isset ($ data ['Currency ' ]) && count ($ data ['Currency ' ])) {
120119 foreach ($ data ['Currency ' ] as $ currency ) {
121- $ currency = (array )$ currency ;
120+ $ currency = (array ) $ currency ;
122121 $ currencyCode = $ currency ['@attributes ' ]['CurrencyCode ' ];
123122 if (!in_array ($ currencyCode , $ this ->ignoredCurrencies )) {
124123 $ currencies [$ currencyCode ] = [
125- self ::TYPE_ALIS => $ currency [self ::TYPE_ALIS ] / $ currency ['Unit ' ],
126- self ::TYPE_EFEKTIFALIS => $ currency [self ::TYPE_EFEKTIFALIS ] / $ currency ['Unit ' ],
127- self ::TYPE_SATIS => $ currency [self ::TYPE_SATIS ] / $ currency ['Unit ' ],
124+ self ::TYPE_ALIS => $ currency [self ::TYPE_ALIS ] / $ currency ['Unit ' ],
125+ self ::TYPE_EFEKTIFALIS => $ currency [self ::TYPE_EFEKTIFALIS ] / $ currency ['Unit ' ],
126+ self ::TYPE_SATIS => $ currency [self ::TYPE_SATIS ] / $ currency ['Unit ' ],
128127 self ::TYPE_EFEKTIFSATIS => $ currency [self ::TYPE_EFEKTIFSATIS ] / $ currency ['Unit ' ],
129128 ];
130129 }
131130 }
132131 }
133132
134133 return [
135- 'today ' => $ data ['@attributes ' ]['Tarih ' ],
134+ 'today ' => $ data ['@attributes ' ]['Tarih ' ],
136135 'currencies ' => $ currencies ,
137136 ];
138137 }
@@ -193,7 +192,7 @@ public function getCurrencyExchangeRate($currency, $type = self::TYPE_ALIS)
193192 case self ::TYPE_SATIS :
194193 case self ::TYPE_EFEKTIFALIS :
195194 case self ::TYPE_EFEKTIFSATIS :
196- return (float )$ this ->data ['currencies ' ][$ currency ][$ type ];
195+ return (float ) $ this ->data ['currencies ' ][$ currency ][$ type ];
197196 default :
198197 throw new Exception \UnknownPriceType ('Tanımlanamayan Kur Tipi: ' . $ type );
199198 }
0 commit comments