| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | */ | 
| 14 | 14 | public function up() | 
| 15 | 15 |      { | 
| 16 | -        Schema::create('api_access_tokens', function (Blueprint $table) { | |
| 16 | +        Schema::create('api_access_tokens', function(Blueprint $table) { | |
| 17 | 17 |              $table->increments('id'); | 
| 18 | 18 |              $table->integer('user_id'); | 
| 19 | 19 |              $table->string('app_id', 190); | 
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | */ | 
| 14 | 14 | public function up() | 
| 15 | 15 |      { | 
| 16 | -        Schema::create('api_apps', function (Blueprint $table) { | |
| 16 | +        Schema::create('api_apps', function(Blueprint $table) { | |
| 17 | 17 |              $table->string('app_id', 190); | 
| 18 | 18 |              $table->integer('user_id'); | 
| 19 | 19 |              $table->string('app_secret'); | 
| @@ -2,6 +2,6 @@ | ||
| 2 | 2 | |
| 3 | 3 | use Yansongda\LaravelApi\Api; | 
| 4 | 4 | |
| 5 | -Route::prefix(Api::$routePrefix)->namespace('Yansongda\LaravelApi\Http\Controllers')->group(function () { | |
| 5 | +Route::prefix(Api::$routePrefix)->namespace('Yansongda\LaravelApi\Http\Controllers')->group(function() { | |
| 6 | 6 |      Route::post('token', 'TokenController@issueToken'); | 
| 7 | 7 | }); | 
| @@ -25,8 +25,8 @@ | ||
| 25 | 25 | public function issueToken(Request $request) | 
| 26 | 26 |      { | 
| 27 | 27 |          $app = App::where('app_id', $request->app_id) | 
| 28 | -                  ->where('app_secret', $request->app_secret) | |
| 29 | - ->first(); | |
| 28 | +                    ->where('app_secret', $request->app_secret) | |
| 29 | + ->first(); | |
| 30 | 30 | |
| 31 | 31 |          if (is_null($app)) { | 
| 32 | 32 |              throw new InvalidAppException('Invalid App Info'); | 
| @@ -82,7 +82,7 @@ | ||
| 82 | 82 | */ | 
| 83 | 83 | protected function registerGuard() | 
| 84 | 84 |      { | 
| 85 | -        Auth::extend('api', function ($app, $name, array $config) { | |
| 85 | +        Auth::extend('api', function($app, $name, array $config) { | |
| 86 | 86 | return new TokenGuard($app['request']); | 
| 87 | 87 | }); | 
| 88 | 88 | } | 
| @@ -80,7 +80,7 @@ | ||
| 80 | 80 | */ | 
| 81 | 81 | public static function generateAccessToken($app) | 
| 82 | 82 |      { | 
| 83 | -        if (! ($app instanceof App)) { | |
| 83 | +        if (!($app instanceof App)) { | |
| 84 | 84 |              throw new GenerateAccessTokenException('[' . get_class($app) . '] Must Be An Instance Of [Yansongda\LaravelApi\Models\App]'); | 
| 85 | 85 | } | 
| 86 | 86 | |
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | */ | 
| 60 | 60 | public function user() | 
| 61 | 61 |      { | 
| 62 | -        if (! is_null($this->user)) { | |
| 62 | +        if (!is_null($this->user)) { | |
| 63 | 63 | return $this->user; | 
| 64 | 64 | } | 
| 65 | 65 | |
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | */ | 
| 78 | 78 | public function app() | 
| 79 | 79 |      { | 
| 80 | -        if (! is_null($this->app)) { | |
| 80 | +        if (!is_null($this->app)) { | |
| 81 | 81 | return $this->app; | 
| 82 | 82 | } | 
| 83 | 83 | |
| @@ -143,7 +143,7 @@ discard block | ||
| 143 | 143 | $token = $this->request->getPassword(); | 
| 144 | 144 | } | 
| 145 | 145 | |
| 146 | -        if (! empty($token)) { | |
| 146 | +        if (!empty($token)) { | |
| 147 | 147 | return $token; | 
| 148 | 148 | } | 
| 149 | 149 | |