Skip to content

Commit

Permalink
Convert a lot of lingering tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Dec 27, 2014
1 parent c740048 commit 7d9ae64
Show file tree
Hide file tree
Showing 9 changed files with 549 additions and 549 deletions.
18 changes: 9 additions & 9 deletions src/AdamWathan/EloquentOAuth/OAuthIdentity.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

class OAuthIdentity extends Eloquent
{
protected static $configuredTable = 'oauth_identities';
protected static $configuredTable = 'oauth_identities';

public static function configureTable($table)
{
static::$configuredTable = $table;
}
public static function configureTable($table)
{
static::$configuredTable = $table;
}

public function getTable()
{
return static::$configuredTable;
}
public function getTable()
{
return static::$configuredTable;
}
}
46 changes: 23 additions & 23 deletions src/AdamWathan/EloquentOAuth/ProviderUserDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@
*/
class ProviderUserDetails
{
protected $details = array(
'accessToken' => null,
'userId' => null,
'nickname' => null,
'firstName' => null,
'lastName' => null,
'email' => null,
'imageUrl' => null,
);
protected $details = array(
'accessToken' => null,
'userId' => null,
'nickname' => null,
'firstName' => null,
'lastName' => null,
'email' => null,
'imageUrl' => null,
);

public function __construct($details)
{
$this->addDetails($details);
}
public function __construct($details)
{
$this->addDetails($details);
}

protected function addDetails($details = array())
{
foreach ($details as $key => $value) {
$this->details[$key] = $value;
}
}
protected function addDetails($details = array())
{
foreach ($details as $key => $value) {
$this->details[$key] = $value;
}
}

public function __get($key)
{
return isset($this->details[$key]) ? $this->details[$key] : null;
}
public function __get($key)
{
return isset($this->details[$key]) ? $this->details[$key] : null;
}
}
106 changes: 53 additions & 53 deletions src/AdamWathan/EloquentOAuth/Providers/FacebookProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,69 @@

class FacebookProvider extends Provider
{
protected $authorizeUrl = "https://www.facebook.com/dialog/oauth";
protected $accessTokenUrl = "https://graph.facebook.com/oauth/access_token";
protected $userDataUrl = "https://graph.facebook.com/me";
protected $scope = array(
protected $authorizeUrl = "https://www.facebook.com/dialog/oauth";
protected $accessTokenUrl = "https://graph.facebook.com/oauth/access_token";
protected $userDataUrl = "https://graph.facebook.com/me";
protected $scope = array(
'email',
);
);

protected function getAuthorizeUrl()
{
return $this->authorizeUrl;
}
protected function getAuthorizeUrl()
{
return $this->authorizeUrl;
}

protected function getAccessTokenBaseUrl()
{
return $this->accessTokenUrl;
}
protected function getAccessTokenBaseUrl()
{
return $this->accessTokenUrl;
}

protected function getUserDataUrl()
{
return $this->userDataUrl;
}
protected function getUserDataUrl()
{
return $this->userDataUrl;
}

protected function parseTokenResponse($response)
{
parse_str($response);
if (! isset($access_token)) {
throw new InvalidAuthorizationCodeException;
}
return $access_token;
}
protected function parseTokenResponse($response)
{
parse_str($response);
if (! isset($access_token)) {
throw new InvalidAuthorizationCodeException;
}
return $access_token;
}

protected function parseUserDataResponse($response)
{
return json_decode($response, true);
}
protected function parseUserDataResponse($response)
{
return json_decode($response, true);
}

protected function userId()
{
return $this->getProviderUserData('id');
}
protected function userId()
{
return $this->getProviderUserData('id');
}

protected function nickname()
{
return $this->getProviderUserData('username');
}
protected function nickname()
{
return $this->getProviderUserData('username');
}

protected function firstName()
{
return $this->getProviderUserData('first_name');
}
protected function firstName()
{
return $this->getProviderUserData('first_name');
}

protected function lastName()
{
return $this->getProviderUserData('last_name');
}
protected function lastName()
{
return $this->getProviderUserData('last_name');
}

protected function imageUrl()
{
return 'https://graph.facebook.com/'.$this->userId().'/picture';
}
protected function imageUrl()
{
return 'https://graph.facebook.com/'.$this->userId().'/picture';
}

protected function email()
{
return $this->getProviderUserData('email');
}
protected function email()
{
return $this->getProviderUserData('email');
}
}
Loading

0 comments on commit 7d9ae64

Please sign in to comment.