@@ -23,28 +23,28 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function register() |
| 25 | 25 | { |
| 26 | - // |
|
| 27 | - // environment specific application initialization |
|
| 28 | - // |
|
| 29 | - switch( $this->app->environment() ) |
|
| 30 | - { |
|
| 31 | - // development env |
|
| 32 | - case 'local': |
|
| 33 | - if( $this->app->runningInConsole() ) |
|
| 34 | - { |
|
| 35 | - // Some dev tools to generate some code completion helpers (some fake php files) |
|
| 36 | - $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); |
|
| 37 | - } |
|
| 38 | - // A 'in browser' debug bar |
|
| 39 | - $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class); |
|
| 40 | - break; |
|
| 41 | - // testing env |
|
| 42 | - case '': |
|
| 43 | - break; |
|
| 44 | - // production env |
|
| 45 | - case '': |
|
| 46 | - break; |
|
| 47 | - } |
|
| 26 | + // |
|
| 27 | + // environment specific application initialization |
|
| 28 | + // |
|
| 29 | + switch( $this->app->environment() ) |
|
| 30 | + { |
|
| 31 | + // development env |
|
| 32 | + case 'local': |
|
| 33 | + if( $this->app->runningInConsole() ) |
|
| 34 | + { |
|
| 35 | + // Some dev tools to generate some code completion helpers (some fake php files) |
|
| 36 | + $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); |
|
| 37 | + } |
|
| 38 | + // A 'in browser' debug bar |
|
| 39 | + $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class); |
|
| 40 | + break; |
|
| 41 | + // testing env |
|
| 42 | + case '': |
|
| 43 | + break; |
|
| 44 | + // production env |
|
| 45 | + case '': |
|
| 46 | + break; |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | // |
| 27 | 27 | // environment specific application initialization |
| 28 | 28 | // |
| 29 | - switch( $this->app->environment() ) |
|
| 29 | + switch ($this->app->environment()) |
|
| 30 | 30 | { |
| 31 | 31 | // development env |
| 32 | 32 | case 'local': |
| 33 | - if( $this->app->runningInConsole() ) |
|
| 33 | + if ($this->app->runningInConsole()) |
|
| 34 | 34 | { |
| 35 | 35 | // Some dev tools to generate some code completion helpers (some fake php files) |
| 36 | 36 | $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function execute($request, $provider) |
| 29 | 29 | { |
| 30 | - if (! $request) { |
|
| 30 | + if (!$request) { |
|
| 31 | 31 | return $this->getAuthorizationFirst($provider); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | $tokenSecret = property_exists($userData, "tokenSecret") ? $userData->tokenSecret : null; |
| 59 | 59 | |
| 60 | - if (empty($user)) { |
|
| 60 | + if (empty($user)) { |
|
| 61 | 61 | |
| 62 | 62 | $user = User::create([ |
| 63 | 63 | 'fullname' => $userData->getName(), |
@@ -78,16 +78,16 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | private function isUsernameExists($username = null) |
| 80 | 80 | { |
| 81 | - $username = User::whereUsername($username)->first()['username']; |
|
| 81 | + $username = User::whereUsername($username)->first()[ 'username' ]; |
|
| 82 | 82 | |
| 83 | - return (! is_null($username)) ? true : false; |
|
| 83 | + return (!is_null($username)) ? true : false; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | private function isEmailExists($email = null) |
| 87 | 87 | { |
| 88 | - $email = User::whereEmail($email)->first()['email']; |
|
| 88 | + $email = User::whereEmail($email)->first()[ 'email' ]; |
|
| 89 | 89 | |
| 90 | - return (! is_null($email)) ? true : false; |
|
| 90 | + return (!is_null($email)) ? true : false; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | 'username' => $user->username, |
| 110 | 110 | ]; |
| 111 | 111 | |
| 112 | - if (! empty(array_diff($dbData, $socialData))) { |
|
| 112 | + if (!empty(array_diff($dbData, $socialData))) { |
|
| 113 | 113 | $user->avatar = $userData->getAvatar(); |
| 114 | 114 | $user->fullname = $userData->getName(); |
| 115 | 115 | $user->username = $userData->getNickName(); |