@@ -12,4 +12,4 @@ |
||
12 | 12 | |
13 | 13 | namespace chillerlan\OAuth; |
14 | 14 | |
15 | -class OAuthException extends \Exception{} |
|
15 | +class OAuthException extends \Exception {} |
@@ -12,6 +12,6 @@ |
||
12 | 12 | |
13 | 13 | namespace chillerlan\OAuth\Core; |
14 | 14 | |
15 | -interface TokenExpires{ |
|
15 | +interface TokenExpires { |
|
16 | 16 | |
17 | 17 | } |
@@ -14,4 +14,4 @@ |
||
14 | 14 | |
15 | 15 | use chillerlan\OAuth\OAuthException; |
16 | 16 | |
17 | -class ProviderException extends OAuthException{} |
|
17 | +class ProviderException extends OAuthException {} |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | namespace chillerlan\OAuth\Core; |
14 | 14 | |
15 | -interface TokenRefresh{ |
|
15 | +interface TokenRefresh { |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param \chillerlan\OAuth\Core\AccessToken|null $token |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | namespace chillerlan\OAuth\Core; |
14 | 14 | |
15 | -interface OAuth1Interface extends OAuthInterface{ |
|
15 | +interface OAuth1Interface extends OAuthInterface { |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @return \chillerlan\OAuth\Core\AccessToken |
@@ -12,6 +12,6 @@ |
||
12 | 12 | |
13 | 13 | namespace chillerlan\OAuth\Core; |
14 | 14 | |
15 | -interface AccessTokenForRefresh{ |
|
15 | +interface AccessTokenForRefresh { |
|
16 | 16 | |
17 | 17 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | namespace chillerlan\OAuth\Core; |
14 | 14 | |
15 | -interface ClientCredentials{ |
|
15 | +interface ClientCredentials { |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param array $scopes |
@@ -138,11 +138,9 @@ |
||
138 | 138 | |
139 | 139 | if($expires === 0 || $expires === $this::EOL_NEVER_EXPIRES){ |
140 | 140 | $this->expires = $this::EOL_NEVER_EXPIRES; |
141 | - } |
|
142 | - elseif($expires > $now){ |
|
141 | + } elseif($expires > $now){ |
|
143 | 142 | $this->expires = $expires; |
144 | - } |
|
145 | - elseif($expires > 0 && $expires < $this::EXPIRY_MAX){ |
|
143 | + } elseif($expires > 0 && $expires < $this::EXPIRY_MAX){ |
|
146 | 144 | $this->expires = $now + $expires; |
147 | 145 | } |
148 | 146 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @property int $expires |
30 | 30 | * @property string $provider |
31 | 31 | */ |
32 | -class AccessToken extends SettingsContainerAbstract{ |
|
32 | +class AccessToken extends SettingsContainerAbstract { |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Denotes an unknown end of life time. |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * |
85 | 85 | * @param iterable|null $properties |
86 | 86 | */ |
87 | - public function __construct(iterable $properties = null){ |
|
87 | + public function __construct(iterable $properties = null) { |
|
88 | 88 | parent::__construct($properties); |
89 | 89 | |
90 | 90 | $this->setExpiry($this->expires); |
@@ -109,19 +109,19 @@ discard block |
||
109 | 109 | public function setExpiry(int $expires = null):AccessToken{ |
110 | 110 | $now = time(); |
111 | 111 | |
112 | - if($expires!== null){ |
|
112 | + if ($expires !== null) { |
|
113 | 113 | $expires = intval($expires); |
114 | 114 | } |
115 | 115 | |
116 | 116 | $this->expires = $this::EOL_UNKNOWN; |
117 | 117 | |
118 | - if($expires === 0 || $expires === $this::EOL_NEVER_EXPIRES){ |
|
118 | + if ($expires === 0 || $expires === $this::EOL_NEVER_EXPIRES) { |
|
119 | 119 | $this->expires = $this::EOL_NEVER_EXPIRES; |
120 | 120 | } |
121 | - elseif($expires > $now){ |
|
121 | + elseif ($expires > $now) { |
|
122 | 122 | $this->expires = $expires; |
123 | 123 | } |
124 | - elseif($expires > 0 && $expires < $this::EXPIRY_MAX){ |
|
124 | + elseif ($expires > 0 && $expires < $this::EXPIRY_MAX) { |
|
125 | 125 | $this->expires = $now + $expires; |
126 | 126 | } |
127 | 127 |
@@ -14,4 +14,4 @@ |
||
14 | 14 | |
15 | 15 | use chillerlan\OAuth\OAuthException; |
16 | 16 | |
17 | -class OAuthStorageException extends OAuthException{} |
|
17 | +class OAuthStorageException extends OAuthException {} |