Completed
Push — master ( 8e7a84...1de3f3 )
by Brian
27:15 queued 17:14
created
src/ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
     {
20 20
         parent::register();
21 21
 
22
-        if (class_exists('Laravel\Lumen\Application') && ! defined('SOCIALITEPROVIDERS_STATELESS')) {
22
+        if (class_exists('Laravel\Lumen\Application') && !defined('SOCIALITEPROVIDERS_STATELESS')) {
23 23
             define('SOCIALITEPROVIDERS_STATELESS', true);
24 24
         }
25 25
 
26
-        $this->app->singleton(ConfigRetrieverInterface::class, function () {
26
+        $this->app->singleton(ConfigRetrieverInterface::class, function() {
27 27
             return new ConfigRetriever();
28 28
         });
29 29
     }
Please login to merge, or discard this patch.
src/Helpers/ConfigRetriever.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $this->getFromEnv('KEY'),
48 48
             $this->getFromEnv('SECRET'),
49 49
             $this->getFromEnv('REDIRECT_URI'),
50
-            $this->getConfigItems($additionalConfigKeys, function ($key) {
50
+            $this->getConfigItems($additionalConfigKeys, function($key) {
51 51
                 return $this->getFromEnv(strtoupper($key));
52 52
             }));
53 53
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $this->getFromServices('client_id'),
72 72
             $this->getFromServices('client_secret'),
73 73
             $this->getFromServices('redirect'),
74
-            $this->getConfigItems($additionalConfigKeys, function ($key) {
74
+            $this->getConfigItems($additionalConfigKeys, function($key) {
75 75
                 return $this->getFromServices(strtolower($key));
76 76
             }));
77 77
     }
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
         $keyExists = array_key_exists($key, $this->servicesArray);
121 121
 
122 122
         // ADDITIONAL value is empty
123
-        if (! $keyExists && $this->isAdditionalConfig($key)) {
123
+        if (!$keyExists && $this->isAdditionalConfig($key)) {
124 124
             return;
125 125
         }
126 126
 
127 127
         // REQUIRED value is empty
128
-        if (! $keyExists) {
128
+        if (!$keyExists) {
129 129
             throw new MissingConfigException("Missing services entry for {$this->providerName}.$key");
130 130
         }
131 131
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         // REQUIRED value is empty
153 153
         if (empty($item)) {
154 154
             // If we are running in console we should spoof values to make Socialite happy...
155
-            if (! app()->runningInConsole()) {
155
+            if (!app()->runningInConsole()) {
156 156
                 throw new MissingConfigException("Configuration for $providerKey is missing.");
157 157
             }
158 158
             $item = $providerKey;
Please login to merge, or discard this patch.
src/ConfigTrait.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         // check manually if a key is given and if it exists in the config
26 26
         // this has to be done to check for spoofed additional config keys so that null isn't returned
27
-        if (! empty($key) && empty($this->config[$key])) {
27
+        if (!empty($key) && empty($this->config[$key])) {
28 28
             return $default;
29 29
         }
30 30
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     protected $config;
13 13
 
14 14
     /**
15
-     * @param \SocialiteProviders\Manager\Contracts\OAuth1\ProviderInterface|\SocialiteProviders\Manager\Contracts\OAuth2\ProviderInterface $config
15
+     * @param ConfigInterface $config
16 16
      */
17 17
     public function setConfig(ConfigInterface $config)
18 18
     {
Please login to merge, or discard this patch.
src/OAuth1/AbstractProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function user()
37 37
     {
38
-        if (! $this->hasNecessaryVerifier()) {
38
+        if (!$this->hasNecessaryVerifier()) {
39 39
             throw new \InvalidArgumentException('Invalid request. Missing OAuth verifier.');
40 40
         }
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if ($user instanceof User) {
50 50
             parse_str($token['credentialsResponseBody'], $credentialsResponseBody);
51 51
 
52
-            if (! $credentialsResponseBody || ! is_array($credentialsResponseBody)) {
52
+            if (!$credentialsResponseBody || !is_array($credentialsResponseBody)) {
53 53
                 throw new CredentialsException('Unable to parse token credentials response.');
54 54
             }
55 55
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function redirect()
85 85
     {
86
-        if (! $this->isStateless()) {
86
+        if (!$this->isStateless()) {
87 87
             $this->request->getSession()->put(
88 88
                 'oauth.temp', $temp = $this->server->getTemporaryCredentials()
89 89
             );
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     protected function getToken()
104 104
     {
105
-        if (! $this->isStateless()) {
105
+        if (!$this->isStateless()) {
106 106
             $temp = $this->request->getSession()->get('oauth.temp');
107 107
 
108 108
             return $this->server->getTokenCredentials(
Please login to merge, or discard this patch.
src/SocialiteWasCalled.php 2 patches
Doc Comments   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     /**
78 78
      * @param \Laravel\Socialite\SocialiteManager $socialite
79
-     * @param                  $providerName
79
+     * @param                  string $providerName
80 80
      * @param string           $providerClass
81 81
      * @param null|string      $oauth1Server
82 82
      *
@@ -96,7 +96,6 @@  discard block
 block discarded – undo
96 96
      *
97 97
      * @param string $providerClass must extend Laravel\Socialite\One\AbstractProvider
98 98
      * @param string $oauth1Server  must extend League\OAuth1\Client\Server\Server
99
-     * @param array  $config
100 99
      *
101 100
      * @return \Laravel\Socialite\One\AbstractProvider
102 101
      */
@@ -122,7 +121,6 @@  discard block
 block discarded – undo
122 121
      *
123 122
      * @param SocialiteManager $socialite
124 123
      * @param string           $providerClass must extend Laravel\Socialite\Two\AbstractProvider
125
-     * @param array            $config
126 124
      *
127 125
      * @return \Laravel\Socialite\Two\AbstractProvider
128 126
      */
@@ -145,7 +143,7 @@  discard block
 block discarded – undo
145 143
      *
146 144
      * @throws \SocialiteProviders\Manager\Exception\MissingConfigException
147 145
      *
148
-     * @return array
146
+     * @return Contracts\ConfigInterface
149 147
      */
150 148
     protected function getConfig($providerClass, $providerName)
151 149
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $socialite->extend(
65 65
             $providerName,
66
-            function () use ($socialite, $providerName, $providerClass, $oauth1Server) {
66
+            function() use ($socialite, $providerName, $providerClass, $oauth1Server) {
67 67
                 $provider = $this->buildProvider($socialite, $providerName, $providerClass, $oauth1Server);
68 68
                 if (defined('SOCIALITEPROVIDERS_STATELESS') && SOCIALITEPROVIDERS_STATELESS) {
69 69
                     return $provider->stateless();
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     private function isOAuth1($oauth1Server)
193 193
     {
194
-        return ! empty($oauth1Server);
194
+        return !empty($oauth1Server);
195 195
     }
196 196
 
197 197
     /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     private function classExists($providerClass)
216 216
     {
217
-        if (! class_exists($providerClass)) {
217
+        if (!class_exists($providerClass)) {
218 218
             throw new InvalidArgumentException("$providerClass doesn't exist");
219 219
         }
220 220
     }
Please login to merge, or discard this patch.