Skip to content

Commit

Permalink
Merge pull request #3 from chinleung/analysis-orW9DB
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
chinleung authored Mar 3, 2020
2 parents 58d89a0 + ed0710f commit 1263384
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @param array $locales
* @return array
*/
function locales(array $locales = null) : array
function locales(array $locales = null): array
{
if (! is_null($locales)) {
config([
Expand All @@ -29,7 +29,7 @@ function locales(array $locales = null) : array
* @param string $locale
* @return string
*/
function locale(string $locale = null) : string
function locale(string $locale = null): string
{
if (! is_null($locale) && in_array($locale, locales())) {
app()->setLocale($locale);
Expand Down
14 changes: 7 additions & 7 deletions tests/HelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class HelpersTest extends TestCase
* @test
* @return void
*/
public function the_locales_helper_will_return_all_locales() : void
public function the_locales_helper_will_return_all_locales(): void
{
$this->assertCount(1, locales());
$this->assertEquals(['en'], locales());
Expand All @@ -26,7 +26,7 @@ public function the_locales_helper_will_return_all_locales() : void
* @test
* @return void
*/
public function the_locales_helper_will_return_locales_from_app_first() : void
public function the_locales_helper_will_return_locales_from_app_first(): void
{
config(['app.locales' => ['en', 'fr']]);
$this->assertCount(2, locales());
Expand All @@ -41,7 +41,7 @@ public function the_locales_helper_will_return_locales_from_app_first() : void
* @test
* @return void
*/
public function the_locale_helper_will_return_the_current_active_locale() : void
public function the_locale_helper_will_return_the_current_active_locale(): void
{
$this->assertEquals(app()->getLocale(), locale());

Expand All @@ -55,7 +55,7 @@ public function the_locale_helper_will_return_the_current_active_locale() : void
* @test
* @return void
*/
public function the_locale_helper_can_update_the_application_locale() : void
public function the_locale_helper_can_update_the_application_locale(): void
{
$this->assertEquals('en', locale());

Expand All @@ -72,7 +72,7 @@ public function the_locale_helper_can_update_the_application_locale() : void
* @test
* @return void
*/
public function the_locale_helper_will_not_update_if_locale_is_not_supported() : void
public function the_locale_helper_will_not_update_if_locale_is_not_supported(): void
{
$this->assertEquals('en', locale());
$this->assertEquals('en', locale('fr'));
Expand All @@ -85,7 +85,7 @@ public function the_locale_helper_will_not_update_if_locale_is_not_supported() :
* @test
* @return void
*/
public function the_locales_helper_can_update_the_list_of_supported_locales() : void
public function the_locales_helper_can_update_the_list_of_supported_locales(): void
{
$this->assertCount(1, locales());

Expand All @@ -100,7 +100,7 @@ public function the_locales_helper_can_update_the_list_of_supported_locales() :
* @param \Illuminate\Foundation\Application $app
* @return array
*/
protected function getPackageProviders($app) : array
protected function getPackageProviders($app): array
{
return [
LaravelLocalesServiceProvider::class,
Expand Down

0 comments on commit 1263384

Please sign in to comment.