Skip to content

Commit

Permalink
fix with php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
irfanevrens committed Jul 1, 2015
1 parent c4e0ce9 commit 886cf0a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/Exceptions/LoginError.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ public function getDescription()
*/
public function __toString()
{
return 'Name: ' . $this->getName() . ', Description: ' . $this->getDescription();
return 'Name: '.$this->getName().', Description: '.$this->getDescription();
}
}
8 changes: 4 additions & 4 deletions src/Http/CurlRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class CurlRequest implements RequestInterface
public static $curlOptions = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => RequestInterface::USER_AGENT,
CURLOPT_VERBOSE => true,
CURLOPT_HEADER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => RequestInterface::USER_AGENT,
CURLOPT_VERBOSE => true,
CURLOPT_HEADER => true,
);

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Http/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class UrlGenerator implements UrlGeneratorInterface
* Maps aliases to LinkedIn domains.
*/
public static $domainMap = array(
'api' => 'https://api.linkedin.com/',
'www' => 'https://www.linkedin.com/',
'api' => 'https://api.linkedin.com/',
'www' => 'https://www.linkedin.com/',
);

/**
* @var boolean
* @var bool
*
* Indicates if we trust HTTP_X_FORWARDED_* headers.
*/
Expand Down Expand Up @@ -178,7 +178,7 @@ protected function getHttpProtocol()
}

/**
* @param boolean $trustForwarded
* @param bool $trustForwarded
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Http/UrlGeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function getCurrentUrl();
/**
* Should we trust forwarded headers?
*
* @param boolean $trustForwarded
* @param bool $trustForwarded
*
* @return $this
*/
Expand Down
18 changes: 9 additions & 9 deletions src/LinkedIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ protected function getUserFromAvailableData()

$accessToken = $this->getAccessToken();

/**
/*
* This is true if both statements are true:
* 1: We got an access token
* 2: The access token has changed or if we don't got a user.
Expand Down Expand Up @@ -277,7 +277,7 @@ protected function getUserFromAccessToken()
try {
return $this->api('GET', '/v1/people/~:(id,firstName,lastName,headline)');
} catch (LinkedInApiException $e) {
return null;
return;
}
}

Expand All @@ -297,7 +297,7 @@ protected function getCode()
if (isset($_REQUEST['code'])) {
if ($storage->get('code') === $_REQUEST['code']) {
//we have already validated this code
return null;
return;
}

//if stored state does not exists
Expand All @@ -322,7 +322,7 @@ protected function getCode()
return $_REQUEST['code'];
}

return null;
return;
}

/**
Expand Down Expand Up @@ -399,7 +399,7 @@ protected function fetchNewAccessToken()
protected function getAccessTokenFromCode($code, $redirectUri = null)
{
if (empty($code)) {
return null;
return;
}

if ($redirectUri === null) {
Expand All @@ -423,18 +423,18 @@ protected function getAccessTokenFromCode($code, $redirectUri = null)
} catch (LinkedInApiException $e) {
// most likely that user very recently revoked authorization.
// In any event, we don't have an access token, so say so.
return null;
return;
}

if (empty($response)) {
return null;
return;
}

$tokenData = array_merge(array('access_token' => null, 'expires_in' => null), $response);
$token = new AccessToken($tokenData['access_token'], $tokenData['expires_in']);

if (!$token->hasToken()) {
return null;
return;
}

return $token;
Expand Down Expand Up @@ -606,7 +606,7 @@ public function hasError()
public function getError()
{
if (!$this->hasError()) {
return null;
return;
}

return new LoginError($_GET['error'], isset($_GET['error_description']) ? $_GET['error_description'] : null);
Expand Down

0 comments on commit 886cf0a

Please sign in to comment.