Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dostrog authored and actions-user committed Feb 20, 2021
1 parent 30951fe commit 9522d1a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .php_cs.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"php":"8.0.1","version":"2.18.2","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sortAlgorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline_array":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":["method"]},"single_trait_insert_per_statement":true},"hashes":{"src\/Services\/RussianCentralBank.php":4209528802,"src\/Services\/NationalBankOfUkraine.php":55360203,"src\/Contracts\/ExchangeRate.php":3902066422,"src\/Contracts\/ExchangeRateService.php":3927293648,"src\/Contracts\/CurrencyPair.php":437577022,"src\/Contracts\/ExchangeRateProvider.php":3118380280,"src\/ExchangeRate.php":4270094098,"src\/StringHelper.php":3013770134,"src\/CurrencyPair.php":4161659825,"src\/CacheHelper.php":52867920,"src\/Commands\/InstallLarate.php":50923403,"src\/Larate.php":148530204,"src\/Validation.php":3603565005,"src\/Providers\/LarateServiceProvider.php":4032296530,"src\/Facades\/LarateFacade.php":865551714,"tests\/TestCase.php":1723533337,"tests\/Feature\/LarateTest.php":93500964,"tests\/Unit\/CurrencyPairTest.php":3497513797,"tests\/Unit\/ExchangeRateTest.php":145773214,"tests\/Unit\/CacheTest.php":1165793876,"tests\/Unit\/ValidationTest.php":2683340759,"tests\/Unit\/InstallLarateTest.php":3607283650,"tests\/Unit\/RussianCentralBankTest.php":3857209726,"tests\/Unit\/StringHelperTest.php":1154401536,"tests\/Unit\/NationalBankOfUkraineTest.php":2484106296,"src\/Exceptions\/InvalidArgumentException.php":1170491362}}
{"php":"8.0.1","version":"2.18.2","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sortAlgorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline_array":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":["method"]},"single_trait_insert_per_statement":true},"hashes":{"src\/Services\/RussianCentralBank.php":1671965386,"src\/Services\/NationalBankOfUkraine.php":2535570899,"src\/Contracts\/ExchangeRate.php":3902066422,"src\/Contracts\/ExchangeRateService.php":3927293648,"src\/Contracts\/CurrencyPair.php":437577022,"src\/Contracts\/ExchangeRateProvider.php":3118380280,"src\/ExchangeRate.php":4270094098,"src\/StringHelper.php":2942084845,"src\/CurrencyPair.php":1763396578,"src\/CacheHelper.php":52867920,"src\/Commands\/InstallLarate.php":50923403,"src\/Larate.php":1802032553,"src\/Validation.php":3142905928,"src\/Providers\/LarateServiceProvider.php":2908215701,"src\/Facades\/LarateFacade.php":865551714,"tests\/TestCase.php":1723533337,"tests\/Feature\/LarateTest.php":2497438291,"tests\/Unit\/CurrencyPairTest.php":3497513797,"tests\/Unit\/ExchangeRateTest.php":145773214,"tests\/Unit\/CacheTest.php":1165793876,"tests\/Unit\/ValidationTest.php":2683340759,"tests\/Unit\/InstallLarateTest.php":3607283650,"tests\/Unit\/RussianCentralBankTest.php":2433905653,"tests\/Unit\/StringHelperTest.php":1154401536,"tests\/Unit\/NationalBankOfUkraineTest.php":1722701766,"src\/Exceptions\/InvalidArgumentException.php":1170491362,"src\/Services\/HttpService.php":2049481965}}
2 changes: 1 addition & 1 deletion src/Larate.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function createForBaseCurrency(string $baseCurrency = 'RUB', Cache
? config('larate.service.' . $baseCurrency)
: config('larate.service.RUB');

return new self( new $serviceClass,$cache ?? app()->make('cache.store') );
return new self(new $serviceClass, $cache ?? app()->make('cache.store'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Services/NationalBankOfUkraine.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Dostrog\Larate\Contracts\ExchangeRate as ExchangeRateContract;
use Dostrog\Larate\ExchangeRate;
use Dostrog\Larate\StringHelper;
use Illuminate\Support\Carbon;
use Illuminate\Http\Client\Factory;
use Illuminate\Support\Carbon;
use NumberFormatter;
use RuntimeException;
use Throwable;
Expand Down
2 changes: 1 addition & 1 deletion src/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function xmlToElement(string $string): SimpleXMLElement
} catch (Throwable $e) {
libxml_use_internal_errors($internalErrors);

throw new RuntimeException( trans('larate::error.badxml', ['message' => $e->getMessage()]) );
throw new RuntimeException(trans('larate::error.badxml', ['message' => $e->getMessage()]));
}

return $xml;
Expand Down
2 changes: 1 addition & 1 deletion src/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function validateCurrencyCode(string $currencyCode): void
'code' => [
function ($attribute, $value, $fail) use ($currencies) {
if (! $currencies->contains(new Currency($value))) {
$fail( trans('larate::validation.code', ['code' => $value]) );
$fail(trans('larate::validation.code', ['code' => $value]));
}
},
],
Expand Down
1 change: 0 additions & 1 deletion tests/Unit/RussianCentralBankTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ public function rcb_get_exchange_rate_response_failed(): void
$rcb->getExchangeRate($pair);
}


/** @test */
public function rcb_get_exchange_rate_for_past(): void
{
Expand Down

0 comments on commit 9522d1a

Please sign in to comment.