Passed
Push — master ( 2bb952...ced49e )
by smiley
01:32
created
src/Storage/OAuthStorageInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 use chillerlan\OAuth\Core\AccessToken;
16 16
 
17
-interface OAuthStorageInterface{
17
+interface OAuthStorageInterface {
18 18
 
19 19
 	/**
20 20
 	 * @param string                             $service
Please login to merge, or discard this patch.
src/OAuthOptionsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\OAuth;
14 14
 
15
-trait OAuthOptionsTrait{
15
+trait OAuthOptionsTrait {
16 16
 
17 17
 	/**
18 18
 	 * @var string
Please login to merge, or discard this patch.
examples/OAuth1Testprovider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 use chillerlan\OAuth\Core\OAuth1Provider;
16 16
 
17
-class OAuth1Testprovider extends OAuth1Provider{
17
+class OAuth1Testprovider extends OAuth1Provider {
18 18
 
19 19
 	protected $apiURL          = 'https://api.example.com';
20 20
 	protected $requestTokenURL = 'https://example.com/oauth/request_token';
Please login to merge, or discard this patch.
examples/TestEndpoints.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 use chillerlan\HTTP\MagicAPI\EndpointMap;
16 16
 
17
-class TestEndpoints extends EndpointMap{
17
+class TestEndpoints extends EndpointMap {
18 18
 
19 19
 	protected $test = [
20 20
 		'path'          => '/test/%1$s',
Please login to merge, or discard this patch.
examples/OAuth2Testprovider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	protected $authURL        = 'https://example.com/oauth2/authorize';
25 25
 	protected $accessTokenURL = 'https://example.com/oauth2/token';
26 26
 	protected $userRevokeURL  = 'https://account.example.com/apps/';
27
-	protected $endpointMap     = TestEndpoints::class;
27
+	protected $endpointMap = TestEndpoints::class;
28 28
 	protected $authHeaders    = ['foo' => 'bar'];
29 29
 	protected $apiHeaders     = ['foo' => 'bar'];
30 30
 
Please login to merge, or discard this patch.
src/Core/OAuth2Interface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 use Psr\Http\Message\UriInterface;
16 16
 
17
-interface OAuth2Interface extends OAuthInterface{
17
+interface OAuth2Interface extends OAuthInterface {
18 18
 
19 19
 	const HEADER_OAUTH              = 0;
20 20
 	const HEADER_BEARER             = 1;
Please login to merge, or discard this patch.
src/OAuthOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
36 36
  * @property bool       $ssl_verifypeer
37 37
  * @property string     $curlHandle
38 38
  */
39
-class OAuthOptions extends SettingsContainerAbstract{
39
+class OAuthOptions extends SettingsContainerAbstract {
40 40
 	use OAuthOptionsTrait, HTTPOptionsTrait;
41 41
 }
Please login to merge, or discard this patch.
src/Core/AccessToken.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,11 +123,9 @@
 block discarded – undo
123 123
 
124 124
 		if($expires === 0 || $expires === self::EOL_NEVER_EXPIRES){
125 125
 			$this->expires = self::EOL_NEVER_EXPIRES;
126
-		}
127
-		elseif($expires > $now){
126
+		} elseif($expires > $now){
128 127
 			$this->expires = $expires;
129
-		}
130
-		elseif($expires > 0 && $expires < self::EXPIRY_MAX){
128
+		} elseif($expires > 0 && $expires < self::EXPIRY_MAX){
131 129
 			$this->expires = $now + $expires;
132 130
 		}
133 131
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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.
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @param iterable|null $properties
85 85
 	 */
86
-	public function __construct(iterable $properties = null){
86
+	public function __construct(iterable $properties = null) {
87 87
 		parent::__construct($properties);
88 88
 
89 89
 		$this->setExpiry($this->expires);
@@ -108,19 +108,19 @@  discard block
 block discarded – undo
108 108
 	public function setExpiry(int $expires = null):AccessToken{
109 109
 		$now = \time();
110 110
 
111
-		if($expires!== null){
111
+		if ($expires !== null) {
112 112
 			$expires = \intval($expires);
113 113
 		}
114 114
 
115 115
 		$this->expires = self::EOL_UNKNOWN;
116 116
 
117
-		if($expires === 0 || $expires === self::EOL_NEVER_EXPIRES){
117
+		if ($expires === 0 || $expires === self::EOL_NEVER_EXPIRES) {
118 118
 			$this->expires = self::EOL_NEVER_EXPIRES;
119 119
 		}
120
-		elseif($expires > $now){
120
+		elseif ($expires > $now) {
121 121
 			$this->expires = $expires;
122 122
 		}
123
-		elseif($expires > 0 && $expires < self::EXPIRY_MAX){
123
+		elseif ($expires > 0 && $expires < self::EXPIRY_MAX) {
124 124
 			$this->expires = $now + $expires;
125 125
 		}
126 126
 
Please login to merge, or discard this patch.
src/Storage/OAuthStorageAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	 * @param \chillerlan\Settings\SettingsContainerInterface|null $options
31 31
 	 * @param \Psr\Log\LoggerInterface|null                        $logger
32 32
 	 */
33
-	public function __construct(SettingsContainerInterface $options = null, LoggerInterface $logger = null){
33
+	public function __construct(SettingsContainerInterface $options = null, LoggerInterface $logger = null) {
34 34
 		$this->options = $options ?? new OAuthOptions;
35 35
 
36 36
 		$this->setLogger($logger ?? new NullLogger);
Please login to merge, or discard this patch.