Setup pint & run code style fix

This commit is contained in:
gdarko
2024-01-29 04:46:01 -06:00
parent 8de34efd8c
commit 4ab92473e9
406 changed files with 1616 additions and 2026 deletions

View File

@@ -2,14 +2,14 @@
namespace InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
use InvoiceShelf\Http\Controllers\Controller;
use InvoiceShelf\Models\CompanySetting;
use InvoiceShelf\Models\Currency;
use InvoiceShelf\Models\ExchangeRateLog;
use InvoiceShelf\Models\ExchangeRateProvider;
use InvoiceShelf\Traits\ExchangeRateProvidersTrait;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
class GetExchangeRateController extends Controller
{
@@ -18,7 +18,6 @@ class GetExchangeRateController extends Controller
/**
* Handle the incoming request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function __invoke(Request $request, Currency $currency)
@@ -27,14 +26,14 @@ class GetExchangeRateController extends Controller
$baseCurrency = Currency::findOrFail($settings['currency']);
$query = ExchangeRateProvider::whereJsonContains('currencies', $currency->code)
->where('active', true)
->get()
->toArray();
->where('active', true)
->get()
->toArray();
$exchange_rate = ExchangeRateLog::where('base_currency_id', $currency->id)
->where('currency_id', $baseCurrency->id)
->orderBy('created_at', 'desc')
->value('exchange_rate');
->where('currency_id', $baseCurrency->id)
->orderBy('created_at', 'desc')
->value('exchange_rate');
if ($query) {
$filter = Arr::only($query[0], ['key', 'driver', 'driver_config']);