Skip to content

Commit

Permalink
Changed Namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksamson committed Sep 14, 2015
1 parent 8d52ec1 commit 5c9d7d6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ composer require lykegenes/laravel-locale-switcher

Then, add this to your Service Providers :
``` php
Lykegenes\LaravelLocaleSwitcher\ServiceProvider::class,
Lykegenes\LocaleSwitcher\ServiceProvider::class,
```

Optionally, you can publish and edit the configuration file :
``` bash
php artisan vendor:publish --provider="Lykegenes\LaravelLocaleSwitcher\ServiceProvider" --tag=config
php artisan vendor:publish --provider="Lykegenes\LocaleSwitcher\ServiceProvider" --tag=config
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"autoload": {
"psr-4": {
"Lykegenes\\LaravelLocaleSwitcher\\": "src/"
"Lykegenes\\LocaleSwitcher\\": "src/"
}
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/LocaleSwitcher.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php namespace Lykegenes\LaravelLocaleSwitcher;
<?php
namespace Lykegenes\LocaleSwitcher;

use Illuminate\Support\Facades\App;
use Illuminate\Http\Request;
Expand Down
5 changes: 3 additions & 2 deletions src/Middleware/SwitchLocale.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php namespace Lykegenes\LaravelLocaleSwitcher\Middleware;
<?php
namespace Lykegenes\LocaleSwitcher\Middleware;

use Closure;
use Lykegenes\LaravelLocaleSwitcher\LocaleSwitcher;
use Lykegenes\LocaleSwitcher\LocaleSwitcher;

class SwitchLocale
{
Expand Down
8 changes: 4 additions & 4 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php namespace Lykegenes\LaravelLocaleSwitcher;
<?php
namespace Lykegenes\LocaleSwitcher;

class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
Expand Down Expand Up @@ -27,12 +28,11 @@ public function boot()
$this->publishes([$configPath => $this->getConfigPath()], 'config');

$enabled = $this->app['config']->get('locale-switcher.enabled');
if (!$enabled)
{
if (!$enabled) {
return;
}

$this->registerMiddleware('Lykegenes\LaravelLocaleSwitcher\Middleware\SwitchLocale');
$this->registerMiddleware('Lykegenes\LocaleSwitcher\Middleware\SwitchLocale');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/LocaleSwitcherTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Lykegenes\LaravelLocaleSwitcher\LocaleSwitcher;
use Lykegenes\LocaleSwitcher\LocaleSwitcher;

class LocaleSwitcherTest extends PHPUnit_Framework_TestCase
{
Expand Down

0 comments on commit 5c9d7d6

Please sign in to comment.